wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Confusion about GlassFish Server Startup and Java EE application start-up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Confusion about GlassFish Server Startup and Java EE application start-up" Watch "Confusion about GlassFish Server Startup and Java EE application start-up" New topic
Author

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

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634


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 ?

OCPJP 6.0 93%
OCPJWCD 5.0 98%
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Can someone please advise on the query I have posted.
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

Can someone please advise on the query I have posted ?
Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

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

Joined: May 18, 2010
Posts: 634

Moving the Post to different Forum
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confusion about GlassFish Server Startup and Java EE application start-up
 
Similar Threads
Call EJB from Application Client
[Spring Security] problem with UserDetailsService implementation
Glassfish 3 and Remote EJB Access
Resource injection for env entry in the field
JNDI lookup between GlassFish 3.1 and JBoss AS 7.1