Deploying and Consuming EJBs in Java Studio Creator
Refreshing the EJB API: after deploying a new version of the EJB API to the app server, you will want to update the references in Creator, and also in the projects that use that EJB API. The steps to do this are:
- When deploying the EJB API using deploytool, re-create the Client Jar, and make sure you save it in the same location that you told Creator to use for its EJB set reference. Then, right-click in Creator on the EJB set in question and click refresh.
- The above will update the reference that Creator has, but will not affect the projects that use it.
- To update the projects that consume this EJB set, I keep a page around that is empty and essentially unused. To update the EJB reference, remove the client jar from the Library References section in the Project Navigator pane for the project. Then, drag one of the beans from the set into the empty page, and this will re-create the client jar reference using the new details. You then can delete the EJB reference from the page; the libraries will remain pointing to the new details. The empty page can be used time and again for this purpose.
This article has covered in general the steps necessary to create an API based on Session EJBs suitable for use in a Creator project, and further, the consumption of that API using Creator. Examples were kept general when given, but tended towards explanation using the JDeveloper IDE that is what we use internally at NewEnergy Associates. It is hoped that these examples will provide enough insight to provide clues to accomplishing the same in other tools.
For Further Information
http://www.informit.com/articles/article.asp?p=21630&rl=1—Creating Session EJBs
http://www.oracle.com/technology/obe/obe9051jdev/EJBtoJSP/defaultejb.htm—Oracle JDeveloper-specific EJB creation.
http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/aboutdeployment.html—Sun guide to deployment
About the Author
Dick Wall is a Lead Systems Engineer at NewEnergy Associates, a Siemens Company based in Atlanta, GA that provides energy IT and consulting solutions for decision support and energy operations. He can be reached for comment on this and other matters at firstname.lastname@example.org.
Page 2 of 2