Skip to main content

Java EE Application Client + Hibernate.

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
nicolascova
Offline
Joined: 2010-12-06

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.

PS: I do not want to develop a Enterprise Web Application, like I said, I need an Enterprise Application Client to be able to use Hibernate.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
wendyru
Offline
Joined: 2004-03-04

Actually, you can use any lib as you like .But hibernate is too huge for App client .
As I know, there's a performance issue in ACC Booter in glassfish where you load above 20M jar from server.

nicolascova
Offline
Joined: 2010-12-06

Thank you wendyru. But exactly which Hibernate libraries should I import and from where? I mean, if I copy Hibernate's jars and place them on the domain's lib directory, my application client doesn't find them. If I install the Glassfish Hibernate plugin, my client won't find those libraries either (the ones placed in Glassfish's lib directory).
What really bothers me is that my client actually imports 4 other libraries besides Hibernate, and those libraries are place inside the domain's lib directory and IT DOES FIND THEM. So, am I missing something?
(I know Hibernate might be too big for an App client, but I'm forced by a customer to use it.)