Then the mbean and ejb need to be in the same deployment unit so that
the classes are available to both. Without this you can redeploy the ejb
independent of the service and end up with inconsistent class types. So
use a sar containing the ejb-jar, or an ear containing both the sar and ejb-jar.
By using explicit references to the ejb classes you have strongly coupled
the service to the ejb in the Java type system.

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx

----- Original Message ----- 
From: "Dave Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 11, 2002 10:46 AM
Subject: [JBoss-dev] Dependencies jboss 3.2 beta


> I have a -service.xml file that has an mbean that depends on an ejb. My
> line looks like 
> 
> <depends>jboss.j2ee:jndiName=cadex/Transferhead,service=EJB</depends>
> 
> 
> Now the problem is that some off the method signatures in the MBean
> contain references to the EJB and thus when the Mbean is created I am
> getting a java.lang.NoClassDefFoundError. Now I can hack around this but
> it does not make sense to have dependencies if you have to hack around
> them.
> 
> A quick peek at the code shows the create method is being called and
> then the create method in the service control checks to see if the mbean
> has dependices and should be created/started. This seems backward.
> Should we not first check to see the dependices are met and if they are
> not simply register the name and do not try to instaniate the class.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to