Solved

Deploy standalone ejb modules

Posted on 2003-11-13
7
1,347 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
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 Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

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…
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now