• 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

How to access PersistenceUnit from servlet?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello to all,
I have been trying to access a persistence unit from a servlet in JBoss 4.2.2, but I always get a "not bound" exception.

My directories are as follows:
.ear
-META-INF
--MANIFEST.MF
--application.xml
-.jar (persitence.xml)
-.war (web.xml, jboss-app.xml)

In my web.xml I have:


and in my servlet (inside the .war file) I have:


However, by looking at JMX Console I don't see the persistence/context being created, and when I try to lookup the manager, I get "persistence not bound".

Am I missing something here?

Regards
 
Alejandro Dominguez
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind, I upgraded to JBoss 5 (RC1) and it works perfectly

Nice to see a popular request being taken care of!
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic