To connect to a BEA WebLogic server:
-
In the
Connect to Naming Service dialog box, choose
WebLogic Application Server from the
Server list box.
-
From the
Factory list box, choose
weblogic.jndi.WLInitialContextFactory
-
In the
Provider Url text box, type
t3://red:7001.
The port may vary depending on the configuration of the server.
-
Click
Edit Classpath ... and specify the following server and client classpaths:
-
In the
Server Classpath text box, type the path to
weblogic.jar.
This file is provided by BEA and contains the WebLogic J2EE implementation and the implementation used for connecting to the
naming mechanism of BEA WebLogic. The file has a size of about 40 MB and you can normally find it in a lib subdirectory of
the BEA WebLogic home directory.
-
In the
Client Classpath text box, type all JAR files and classpaths that are required to connect to the EJB.
You usually put the client-side stubs and additional classpath entries into the client classpath. WebLogic servers automatically
generate the stubs when EJBs are deployed.
-
Verify your settings and click
Next.
The names of all registered EJBs and RMI objects that are hooked into your WebLogic server are browsed.
-
Choose the home interface that allows for the creation of instances of EJBs.
It is typical for EJBs to have home interfaces that are used to create EJB instances. For example, choose
ejb20-statelessSession-Traderhome to use the TraderHome interface.
-
Click
Finish.
-
In the
Load File Wizard, click
Next.
The home interface you have selected is browsed for the published methods it includes. A method named create is likely to
be among these methods. Call this method to get a valid reference to an EJB object.
-
Click
Next and select the test case where
Java Explorer should write code for the steps that are performed by the wizard.
For example, you can put the steps that are referred to as
bootstrapping into the init test case or an existing test case.
-
Click
Next.
-
Check the
Store as variable check box and type a name for the EJB reference obtained by the
Java Explorer Wizard into the
Variable name text box.
-
Click
OK.
You can now call any of the EJBs business methods.