Solved

Deploy standalone ejb modules

Posted on 2003-11-13
7
1,372 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

630 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