Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1387
  • Last Modified:

Deploy standalone ejb modules

Hello,
We are a developer team and we work with IAS 7. In order to avoid that every developer has to deploy its enterprise application in a different virtual server I want to know how I can share a ejb module . In this way, all people would share the same enterprise applicarion in the same virtual server and each developer should only deploy the ejb module he is working with. So in this way, the shared ejbs would be in standalone module ejbs.

I can deploy a ejb module as standalone. The problem is, when I try to deploy an enterprise application where there are ejbs which reference to ejbs within the stadalone module, these references can't be resolved.

How can I resolve this problem?

Thanks in advance.
0
jdiaz
Asked:
jdiaz
1 Solution
 
jdiazAuthor Commented:
I think is not a problem of IAS. I thinkk is something I 'm doin wrong
The error is the following:

"Deployment error - Error while running ejbc -- Fatal error from
EJB compiler-- Failed to load deployment descriptor
for: 'application name'.
Cause: Error: Unresolved <ejb-link>: Sequence "

The module I deployed like standalone containts:

<session>
      <display-name>Sequence</display-name>
      <ejb-name>Sequence</ejb-name>
      <home>com.soluzionasf.j2ee.ejb.SequenceHome</home>
      <remote>com.soluzionasf.j2ee.ejb.Sequence</remote>
      <local-home>com.soluzionasf.j2ee.ejb.SequenceHomeLocal</local-home>
      <local>com.soluzionasf.j2ee.ejb.SequenceLocal</local>
      <ejb-class>com.soluzionasf.j2ee.ejb.SequenceBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
</session>


Now the module I'm deploying within an enterprise application containts:

<entity>
      <display-name>Ejemplo</display-name>
      <ejb-name>Ejemplo</ejb-name>
      <local-home>com.soluzionasf.patacs.ejemplo.ejb.EjemploLocalHome</local-home>
      <local>com.soluzionasf.patacs.ejemplo.ejb.Ejemplo</local>
      <ejb-class>com.soluzionasf.patacs.ejemplo.ejb.EjemploBean</ejb-class>
      <persistence-type>Bean</persistence-type>
      <prim-key-class>java.lang.Long</prim-key-class>
      <reentrant>False</reentrant>
      <ejb-local-ref>
        <ejb-ref-name>ejb/Sequenciador</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>com.soluzionasf.j2ee.ejb.SequenceHomeLocal</local-home>
        <local>com.soluzionasf.j2ee.ejb.SequenceLocal</local>
        <ejb-link>Sequence</ejb-link>
      </ejb-local-ref>
</entity>

But the <ejb-link>Sequence</ejb-link> can not resolve the reference.
0
 
boxy73Commented:
If you're working under IAS 7 I think this question should be posted under IAS, not weblogic. If you want to know how to do this under weblogic 7.0, I think that you can do this, but when loading your application, it cannot load references to the standalone EJB because they use different classloaders.

For doing so, add your standalong_ejb.jar to the classpath when starting your IAS and then try to deploy two apps, enterprise and standalone.

Good luck!
0
 
vzilkaCommented:
JDiaz,

To my knowledge, it is impossible in both WLS and iAS (there is no iAS 7, so I guess you either mean WebLogic Server 7.0 or Oracle9iAS 9.0.2) to use a local reference in an EJB that is not part of the same EAR file.
However, you can think of a different solution.
How about packaging all your EJBs that use local interface of one another together, and deploy them?
EJBs that call other EJBs remotly, or web applications, can use the EJB your specify in your initial context lookup() operation, and you will be able to deploy all your "common" EJBs in a single JAR file once.

If it is not clear - I'm suggesting you deploy Ejemplo and sequence together.
If that's not possible, maybe sequence should be a Java class, and not an EJB ;-)
0
 
tapasviCommented:
I guess the problem is with <ejb-link>

instead of specifying alias you should give the Fully Qualified name (as you specify in ejb-ref-name) ejb/Sequenciador

If the referring bean and referenced bean are in different jar files (God forbid !) then

<ejb-link><jar file name>#ejb/Sequenciador</ejb-link>

hope this helps.
Tapasvi

0
 
tapasviCommented:
As per following URL:

http://edocs.bea.com/wle/dd/ddref.htm#1021310

this will work even if both beans are in difference jar files within same application ear.

so no need for this:

<ejb-link><jar file name>#ejb/Sequenciador</ejb-link>

use only:
<ejb-link>ejb/Sequenciador</ejb-link>
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now