Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@Startup annotation

 
Laura Barroso
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm looking information about the @Startup annotation but I have not success...does anyone know how to use this annotation???
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Startup is a new concept introduced in EJB3.1 spec. The spec will have more details about its usage.
 
Laura Barroso
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering if there is any other similar annotation for ejb 3.0... ???
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are Bean Lifecycle Callbacks. For example, Stateless session beans have PostConstruct and PreDestroy while Statefull session beans have those, plus PrePassivate and PostActivate. Do these give you what you want?
 
Laura Barroso
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, they don't...What I'm looking for is an annotation that gives me the oportunity for make a call to a business function that I have in my app, but I only need to make this call when I'm deploying my app, the problem now with @Startup is that is only available in ejb 3.1 and my app is in ejb 3.0, so I'm looking for alternatives...One friend of mine says that maybe I could resolve my problem with @Service, but I haven't found much information, does anyone have an example or doc about this annotation???
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Laura Barroso wrote:One friend of mine says that maybe I could resolve my problem with @Service, but I haven't found much information, does anyone have an example or doc about this annotation???


JBoss specific EJB3.0 @Service allows that to be done. See chapter "Service POJOs (JBoss extension of EJB3)" in the JBoss EJB3 tutorial
 
Laura Barroso
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect! just one more question... what library should I include in my code in order to get this annotation work...because netBeans doesn't appear to recognize org.jboss.annotation.Service or org.jboss.annotation.ejb.Management...so what libraries should I include???
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have JBoss AS installed? The jar will be available in JBOSS_HOME/client folder. The jar is named jboss-ejb3-ext-api.jar.
 
Laura Barroso
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
problem solve, thank you very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic