• 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

war / glassfish: call java class on deployment, make available as a resource

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am deploying a war with webservices on Glassfish. One of these webservices needs a number documents to be indexed using apache lucene. I have a java class that indexes the documents using lucene.

How do I make sure that on deployment of the war the constructor of the java class that indexes the documents is called and that the object is then then made available as a resource to the webservice?

I suspect that this should be done by using annotations and resource injection, but I can't find a guide that is clear enough for me as a java novice. I am using netbeans as an IDE. Any pointers / help are appreciated.





 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic