[jboss-user] [JBoss Seam] - Re: @Startup help...
gavin.king@jboss.com
do-not-reply at jboss.com
Fri Jan 26 10:21:42 EST 2007
"bsmithjj" wrote : Huh?
|
| I designated an APPLICATION scoped bean as the startup object - I have the startup object get a handle to a stateless bean and invoke a method which subsequently creates timer object.
You have:
@Startup(depends={"mailReader"})
This tells seam to "start" the mailReader component before starting the "mailReaderStarter" component. But its not meaningful to "start" a stateless component. If you remove the depends, your code will probably work as written.
"bsmithjj" wrote : Going back to the start of this thread...I am trying to start an EJB Timer on startup of the application - it doesn't seem like an unreasonable thing to do - it's pretty darn simple to start a timer using Spring (via JDK Timers or Quartz) or a good-ole-fashioned ServletContextListener, etc. I hoped that Seam would be helpful in this regards since I am already using Seam in this application.
Slow down, I have a lot of posts to answer every day. I thought I had given you enough of a hint, but apparently not.
anonymous wrote : PS: It's interesting you say that:
|
| anonymous wrote : Only stateful objects can be meaningfully "created".
|
| because in this thread http://www.jboss.com/index.html?module=bb&op=viewtopic&t=98545&postdays=0&postorder=asc&start=0
| everybody seems to insist that a stateless bean must be 'created' - how confusing!?!
This is an artefact of representing something that is conceptually stateless in an object-oriented language where components have state and lifecycle.
What I shoudl have typed is: Only stateful objects can be meaningfully "started".
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006856#4006856
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006856
More information about the jboss-user
mailing list