• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Confusion about GlassFish Server Startup and Java EE application start-up

 
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Source:Ivan Krizsan's OCPEJBD 6 (CX-311-093) study notes

4.2.1. Singleton Session Bean Eager Initialization



Tools used:Eclipse Helios with GlassFish Server Open Source Edition 3.0.1
Web Project Name:StatefulSession1Web

I was trying the Eager initialization in eclipse and modified the SingletonSessionBeanA class adding the @Startup annotation
Then, I just started the GlassFish Server(it was stopped earlier) and in the server.logs,the following messages were also seen:

INFO: Portable JNDI names for EJB StatefulSession4Bean : [java:global/StatefulSession1Web/StatefulSession4Bean, java:global/StatefulSession1Web/StatefulSession4Bean!com.ivan.scbcd6.StatefulSession4Bean]
INFO: Portable JNDI names for EJB SingletonSessionBeanB : [java:global/StatefulSession1Web/SingletonSessionBeanB, java:global/StatefulSession1Web/SingletonSessionBeanB!com.ivan.scbcd6.SingletonSessionBeanB]
INFO: Portable JNDI names for EJB SingletonSessionBeanA : [java:global/StatefulSession1Web/SingletonSessionBeanA, java:global/StatefulSession1Web/SingletonSessionBeanA!com.ivan.scbcd6.SingletonSessionBeanA]
INFO: *** SingletonSessionBeanA - Initialized

INFO: Loading application StatefulSession1Web at /StatefulSession1Web
INFO: Loading application StatefulSession1Web at /StatefulSession1Web



Question 1: Why is the web-project also getting started on starting the server as I didn't explicitly run the project on the server ?
Question 2 :Why is SingletonSessionBeanA getting initialized as it should be initialized at application start-up and not server start-up ?
 
Mohit G Gupta
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please advise on the query I have posted.
 
Mohit G Gupta
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please advise on the query I have posted ?
 
Mohit G Gupta
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please advise on the query I have posted or guide me to the correct forum to post the query ?
 
Mohit G Gupta
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving the Post to different Forum
 
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic