• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

@Startup annotation

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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???
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was wondering if there is any other similar annotation for ejb 3.0... ???
 
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
problem solve, thank you very much
 
Crusading Chameleon likes the size of this ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic