开发者

Deploying annotated EJB 3.0 beans from third party jar to JDeveloper embedded oc4j container

开发者 https://www.devze.com 2022-12-09 23:09 出处:网络
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 I configure the web application project to deploy the

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 I configure the web application project to deploy the beans to the embedded OC4J container when I run the application?

The jar file is referenced 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.

JDeveloper 10.1.3.4

Windows Vista


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

0

精彩评论

暂无评论...
验证码 换一张
取 消