Hi Wolfgang,
unfortunately, it did not work. Here it was I tried:
From the JMX Console, I got the String for @Depends:
@Depends(value="jboss.j2ee:jar=GVCC.jar,name=GvccBean,service=EJB3")
I've put that in the SLSB (1) that tries to make a DI on the other SLSB (2).
I've stopped JBoss AS, deleted the respective jars and deployed first SLSB (2), i.e. the one without dependency. I then read the String on the JMX Console. When I deploy the jar containing SLSB(1), I get the following msg on the console:
ERROR Re: 5.1.0.GA - Problems with Dependency Injection Error installing to Start: name=jboss.j2ee:jar=AnagraficaUnificata.jar,name=AnaUniEJB,service=EJB3 state=Create
java.lang.NullPointerException
and, further
ERROR Re: 5.1.0.GA - Problems with Dependency Injection Error installing to Start: name=jboss.j2ee:jar=AnagraficaUnificata.jar,name=AnaUniEJB,service=EJB3 state=Create
java.lang.NullPointerException
...
Caused by: java.lang.RuntimeException: javax.naming.NameNotFoundException: env not bound
I use eclipse IDE, the build path is project independent. Instead, I've copied & pasted the packages from Project 2 (JAR2 = SLSB2) containing the interfaces of SLSB2 into Project 1 (JAR1 = SLSB1). It's just for a proof of concept, I guess one can use maven to manage such dependencies in production use.
Thanks for caring,