Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java EE Enterprise Application Client + Hibernate Question  RSS feed

 
Nicolas Cova
Greenhorn
Posts: 3
Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good afternoon everybody,

I'm in a bit of trouble here. I need to develop a Java EE 6 Enterprise Application consisting of only one Enterprise Application Client. My problem is that the Application Client needs Hibernate to have access to some information on a local database. I noticed that if I import the Hibernate libraries, the application client won't deploy on my application server (I'm using Glassfish V3, btw). But if I remove the Hibernate libraries (and comment the lines of code that try to access the database), my application deploys perfectly fine.

So my question is: can you use Hibernate with an Enterprise Application Cliente to access a database (as if it were a plain Java SE app)??? Or is the use of Hibernate limited only to Java EE Web Applications?

Thank you in advance.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36396
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nicolas,
Yes, You can use Hibernate in the application to access a database local to the client.
 
Nicolas Cova
Greenhorn
Posts: 3
Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Jeanne. And how do I do that? I'm importing all of the right Hibernate libraries into my application client and when I try to deploy the client on Glassfish it throws a DeploymentException. Do I have to import the Hibernate libraries or do I have to use javax.persistence.* instead?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!