piotrekde [http://community.jboss.org/people/piotrekde] created the discussion

"Re: @Service annotated bean lifecycle methods"

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

--------------------------------------------------------------
Thanks Jaikiran for the answer. I tried to simplify this issue as most as it is 
possible. So here is my service bean:

@Service
public class RemoteTrafficManagerBean implements RemoteTrafficManager {
 
    public void start() throws Exception {
        System.out.println("Starting service bean");
        clearStatistics();
    }
 
    public void create() throws Exception {
        System.out.println("Creating service bean");
    }
 
    (... some other methods ...)
 
    public void someBusinessMethod() {
     (...)
    }
}


Logs are otputed to the standard out to make sure that it is no logging issue. 
RemoteTrafficManager is injected into another session bean using @EJB 
annotation. Also, someBusinessMethod is called from this bean. I am sure that 
RemoteTrafficManagerBean was instantiated, because some additional logging is 
flushed into console from its business methods (they do not work appropriately 
because initialization has not been done). 

I 've put logging from all levels into file:

msc@nitrogen:~> cat jboss\ service\ logs |grep 'Starting service bean'
msc@nitrogen:~> cat jboss\ service\ logs |grep 'Creating service bean'

But there is no entry about starting/creating RemoteTrafficManagerBean. I use 
JBoss 5.0.0 with HornetQ.
--------------------------------------------------------------

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

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to