views:

295

answers:

1

Using JDeveloper as my IDE, I have a web application which calls services provided by annotated EJB 3.0 beans packaged in third party jar. How do a configure the web application project to deploy the beans to the embedded OC4J container when I run the application? The jar file is reference by the project, and I have a META-INF/application.xml referencing those jar files as EJB modules. I've set the EJB Version property to 3.0, but the Annotated EJB 3.0 Bean Classes list remains empty, presumably because I have no beans defined in the sources of the web application I'm running. When running the project, the embedded oc4j container warns that the EJB module contains no beans. I'd like to deploy the beans in the jar file, but can't figure out how.

Thanks, Steve

JDeveloper 10.1.3.4 Windows Vista

A: 

The answer came from an OTN Discussion Forum:

Re: Deploying third party EJB 3.0 jar in web application Posted: Nov 2, 2009 8:15 AM in response to: user10375549

Hi,

We've used ejb-jar.xml to register EJB3 session beans from third-party jars in JDeveloer 11g TP4 (which was using oc4j). The only difference was that beside third-party beans we had our own session beans (which didn't need to be registered in ejb-jar.xml). Here is how we did it

<session>
  <display-name>MySessionBean</display-name>
  <ejb-name>MySessionBean</ejb-name>
  <remote>some.package.MySessionBeanRemote</remote>
  <ejb-class>some.package.MySessionBean</ejb-class>
  <session-type>Stateless</session-type>
  <transaction-type>Container</transaction-type>
</session>

I hope this helps you a bit.

Pedja

Steven