• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
Moving the Post to different Forum
 
He baked a muffin that stole my car! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic