• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB creation time

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, this is my "little" problem:

I created a session bean:


I created a WS, and I want that it reads the DB at startup:


The problems is that labelFacade is null during WS instance initializer...
I tried to load the bean at startup (changing it to @Singleton @startup, but nothing change...)

Some suggestion? Tnks

PS I'm using Glassfish 3.1

Note that if I call synch(labelfacade) after MyWS is loaded, it works fine.



SOLVED!

I call Sync with PostConstruct clause:

@PostConstruct
public void applicationStartup() {
synch(labelfacade);
}
 
reply
    Bookmark Topic Watch Topic
  • New Topic