All Examples All WebLogic Enterprise Connectivity Examples
This example demonstrates how to use WebLogic Enterprise Connectivity to access a WebLogic Enterprise CORBA object from a stateless Enterprise JavaBean (EJB) on WebLogic Server. There are two ways to run this example:
The remaining steps are performed at run time.
The HTML client sends a request and input string to the ejbSimpapp servlet. The servlet sends the request and input string to the EJB.
Install and set up WebLogic Server, JDK, and WebLogic Enterprise. See Platform Support for WebLogic Enterprise Connectivity for information about the supported versions for each of these products.
See the Java Simpapp Sample Application in the WebLogic Enterprise documentation. If you are viewing this document on the Web, see the WebLogic Enterprise documentation on the Web. If you are viewing this document from the documentation CD, see the WebLogic Enterprise documentation on the CD. To get to the Java Simpapp Sample Application, click J2EE Topics, scroll down and click Sample Applications, then click Java Simpapp Sample Application.
The build procedure for the Java version of the Simpapp sample generates the client stubs and puts them in your working directory. Client stubs provide the programming interface for CORBA object operations.
You can use the C++ version of the Simpapp sample, which uses C++ client stubs instead of Java client stubs. If you use the C++ version, you must run the idltojava compiler on the simple.idl file to generate Java client stubs.
For information about manually generating client stubs, see Creating CORBA Client Applications in the WebLogic Enterprise documentation. If you are viewing this document on the Web, see the WebLogic Enterprise documentation on the Web. If you are viewing this document from the documentation CD, see the WebLogic Enterprise documentation on the CD. To get to the Creating CORBA Client Applications, click CORBA Topics, and then scroll down and click Creating CORBA Client Applications.
WebLogic Enterprise provides the idltojava compiler. You must run the idltojava compiler on a computer with a C++ development environment, because it runs the C precompiler on the .idl source.
Run the build.cmd (Windows NT) or build.sh (UNIX) command in the SERVER_CLASSES directory. On UNIX, you might need to change the permissions on the build.sh file.
Additionally, to let everyone request HTML files by way of the servlet, add the following line to the weblogic.properties file:
For information about the weblogic.properties file, see HTTP- and servlet-related properties in the WebLogic Administrator's Guide.
You can uncomment and edit the weblogic.CORBA.connectionPool.simplepool property in the weblogic.properties file. See the Administrators Guide Setting up WebLogic Enterprise Connectivity.
See Enterprise JavaBeans (WebLogic EJB) in the Administrator's Guide.
Add this .jar file to the JAVACLASSPATH environment variable in the startWebLogic.cmd file (NT) or the startWebLogic.sh file (UNIX).
Depending on the location of ejbSimpapp.html, the URL might be something like http://localhost:7001/ejbSimpapp.html.
In your development shell, execute the following command:
java examples.wlec.ejb.simpapp.Client [url] [user] [password]
The parameters are optional, but if any are supplied, they are interpreted in this order:
For more information, see Client.
The Java application will generate output similar to the following:
Beginning simpapp.Client... Start of Conversion for: It Works Converting to lower case: It Works ...Converted: it works Converting to upper case: It Works ...Converted: IT WORKS Removing Converter End simpapp.Client...
Copyright © 2000 BEA Systems, Inc. All rights reserved.
Last updated 3/8/00