[jboss-user] [Beginner's Corner] - Re: @Service annotated bean lifecycle methods
piotrekde
do-not-reply at jboss.com
Sun Feb 20 14:44:13 EST 2011
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 at nitrogen:~> cat jboss\ service\ logs |grep 'Starting service bean'
msc at 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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110220/983117fc/attachment.html
More information about the jboss-user
mailing list