Maria Luisa Della Vedova [http://community.jboss.org/people/mldv] created the 
discussion

"how to deploy a service pojo depending on ejb timer"

To view the discussion, visit: http://community.jboss.org/message/549446#549446

--------------------------------------------------------------
I’m new to EJB3 and I’ve the following problem.
I’m using jboss5.eap.
I have a service POJO (annotated with org.jboss.ejb3.annotation.Depends, 
org.jboss.ejb3.annotation.Service, javax.ejb.Local:
@Service
@Local(MyInterfaceService.*class*)
@Depends(“EJB Global JNDI name”)
*public* *class* MyService *implements* MyInterfaceService {

 and I want to access a stateless EJB from the create() method of this Service 
POJO.

      @EJB
*private* ITimer myEJBTimer;
My EJB is a multiple Timer Object using the TimerService object.

Deploying I get the following warning and errors:
2010-06-23 13:03:04,080 WARN  [org.jboss.injection.EJBRemoteHandler] (main) 
EJBTHREE-1828: EJBInjectionContainer 
jboss.j2ee:ear=ear-name.ear,jar=jarname.jar,name=MyService,service=EJB3 is 
unconfigured, using legacy resolve
2010-06-23 13:03:04,502 ERROR 
[org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed 
to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR 
DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.j2ee:ear= ear-name.ear,jar= jarname.jar,name= 
MyService,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear= ear-name.ear,jar= jarname.jar,name= 
MyService,service=EJB3>" (should be in state "Described", but is actually in 
state "** UNRESOLVED Demands 'EJB Global JNDI name' **")
I understand that my stateless EJB will not yet be bound before my Service POJO 
create method is called.
I’ve tried several way of writing the annotation, with and without parameters 
with no success.
Obviously if I change my code into
            InitialContext ctx = *new* InitialContext();
            myEJBTimer = (ITimer) ctx.lookup("'EJB Global JNDI name' ");
I have no problems
My question is: Is it possible to make my code work with annotation?
Thanks.
ml

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/549446#549446]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to