All Examples All WebLogic Enterprise Connectivity Examples
WebLogic Enterprise Connectivity EJB Simpapp Example
package examples.wlec.ejb.simpapp
Deployment
About This Example
This example demonstrates how to use WebLogic Enterprise Connectivity (WLEC) to access a WebLogic EnterpriseTM (WLE) CORBA object from a stateless Enterprise JavaBean (EJB) on WebLogic ServerTM (WLS). The example combines a WLS EJB and the WLE Simpapp example. There are two ways to run this example:
The following figure illustrates the WLEC EJB Simpapp example.
When you run the WLEC EJB Simpapp example, the following events occur:
The remaining steps are performed at run time.
or
If you are running this example from an Internet client, the Internet client sends a request and input string to the ejbSimpapp servlet. The servlet sends the request and input string to the EJB.
If you are running the example that uses the Java application, the application displays the output.
How To Use This Example
This section describes how to set up and run the EJB Simpapp example.
Prerequisites
Install and set up the following:
See Platform Support for WebLogic Enterprise Connectivity for information about the supported versions for each of these products.
Setting Up the Example
See the Java Simpapp Sample Application in the WLE documentation:
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.
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.
weblogic.httpd.register.ejbSimpappServlet=examples.wlec.ejb.simpapp.ejbSimpappServlet
weblogic.allow.execute.weblogic.servlet.ejbSimpappServlet=everyone
Additionally, to let everyone request HTML files by way of the servlet, add the following line to the weblogic.properties file:
weblogic.allow.execute.servlet.file=everyone
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 Setting Up WebLogic Enterprise Connectivity.
See Enterprise JavaBeans (WebLogic EJB) in the Administrator's Guide.
Running the Example
If you are going to start WLS by running startweblogic, set JAVACLASSPATH in the startweblogic.cmd file (NT) or the startweblogic.sh file (UNIX). Otherwise, set JAVACLASSPATH by means of another method such as the command line or the NT System Properties dialog.
For information about setting classpaths for WLS, see Setting Up and Starting WebLogic Server.
Depending on the location of ejbSimpapp.html, the URL might be something like http://localhost:7001/ejbSimpapp.html.
To run the example from the Java application:
java examples.wlec.ejb.simpapp.Client [url] [user] [password]
The parameters are optional, but if any are supplied, they are interpreted in this order:
url
user
password
For more information, see the Client class.
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...
Related Documents
For information about WLS EJBs:
For information about WLE CORBA objects:
For information about the WLE Simpapp example:
See also Using WebLogic Enterprise Connectivity.
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|