Solved

Deploy standalone ejb modules

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java applets work on wired network, but not on wireless 12 125
getSandwich  java challenge 22 98
Usiing_selfsigned_ssl_certificate 5 103
Logs to delete in Windows VCenter server ? 11 514
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

805 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