Solved

Deploy standalone ejb modules

Posted on 2003-11-13
7
1,363 Views
Last Modified: 2013-12-10
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
Comment
Question by:jdiaz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 

Author Comment

by:jdiaz
ID: 9745941
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
 
LVL 4

Expert Comment

by:boxy73
ID: 9749002
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
 
LVL 9

Expert Comment

by:vzilka
ID: 9752201
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
 
LVL 4

Expert Comment

by:tapasvi
ID: 9947449
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
 
LVL 4

Accepted Solution

by:
tapasvi earned 500 total points
ID: 9947554
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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question