Tuesday, April 29, 2008

EJB 3 In Action Code Examples on WebLogic 10

In my previous blog, I made the code examples available for first four chapters of EJB 3 In Action for WebLogic 10. However I did not provide you instructions to run these examples (Chapter 2-4) for WebLogic 10.

Chapter 2 example has a stateless session bean, stateful session bean, an MDB and a JPA Entity. The JPA persistence unit requires a JDBC DataSource and the Stateful/MDB uses a JMS queue.

Chapter 3 depends upon a JDBC DataSource and Chapter 4 uses JDBC DataSource and a JMS Queue.

I’ve provided a build script to configure these resources on the default examplesServer that gets created when you install WebLogic 10.

  1. Download examples from here and unzip to a directory say c:\ejb3inaction\weblogic
  1. Set the environment variables for your server as follows:


  1. Change to your directory to the directory

cd c:\ejb3inaction\weblogic

ant CreateResources

This will configure resources such as JDBC DataSource, JMS Connection Factory, Queues, etc.

4. To deploy the application, you can use WLS Admin Console. If you prefer you can use ant to deploy the application for a specific chapter.

cd chapter2

  1. To run the application client:

ant run

Hope this helps! I'm working on porting rest of the examples and will make these available sooner.

No comments: