Assignment 4 due May 9.
Resources:
Basics
cd ~/weblogic/weblogic700/samples/server/config/examples
startExamplesServer.sh
To use the management console go to: http://<machine>.cs.uchicago.edu:7001/console where <machine> is the host where you started your Weblogic server. You'll need to enable applets for full functionality.
A number of bean examples are already deployed.
To cleanly stop the server don't use Ctrl-C but:
Deploy a Stateless EJB
/stage/classes/current/51024-1/labs/lab6/HelloWorldExample
- mkdir ~/<YOUR_DIR>
- cp -r /stage/classes/current/51024-1/labs/lab6/HelloWorldExample ~/<YOUR_DIR>/
cd ~/<YOUR_DIR>/HelloWorldExample/
make
It will also compile your client and put all .class file in the ~/weblogic/weblogic700//samples/server/stage/examples/clientclasses/examples/helloworld/ directory ( which is already in your CLASSPATH).
For this example you do not need to modify the deployment descriptors: ejb-jar.xml and weblogic-ejb-jar.xml but please take a look.
- Auto-deployment is on by default. This means that at startup, and whenever you add a file to the applications directory the server tries to load your bean. You can turn auto-deployment off by starting the server in production mode with -Dweblogic.ProductionModeEnabled=true. The Makefile copied the bean jar file already to the applications directory so for the config you are using right now you do not have to do anyting.
- If your server is started you can use the management console to load the bean and edit deployment descriptors if you need. (Note however that these changes are not persistent)
- Also, if your server is started, you can also use Weblogic's deployment tool from the command line.
Info on deploying applications. More info on editing deployment descriptors.
java -Djava.naming.factory.initial=weblogic.jndi.WLInitialContextFactory -Djava.naming.provider.url=t3://localhost:7001 examples.helloworld.HelloClient
Also take a look at the server's output to see the sequence of methods called.
A stateful session example is available here:
/stage/classes/current/51024-1/labs/lab6/Count
Assignment 4 (due May 9, 11:59 pm). Create and deploy your own Stateless EJB
Now that you have successfully deployed your first EJB next step is to create a bean yourself. Implement and deploy the calculator from Lab 5 and 6 as an EJB.
Submission Requirements:
- tar and gzip your ear file, source code, makefile, and a readme file
- Email the tarball to ta-51024 with 'CSPP51024 A4' as the subject