users@glassfish.java.net

Re: Custom MBeans and JPA. It's possible?

From: <glassfish_at_javadesktop.org>
Date: Tue, 07 Jul 2009 13:42:36 PDT

Hi,

I'm also very interested in a solution for this kind of problem. I'm trying to create an MBean wich utilizes JPA. I've put my MBean classes into the mydomain/applications/mbeans folder. I tried several places for the META-INF/persistence.xml and the entity classes. But depending on where I've put them whether the persistence.xml could not be found or I got a class not found exception for the entity class when my MBean tried to retrieve an object from the result list of the query. The strange thing about this is in my last setup: the named query could be created, which means the JPA must have found the entity class. But when trying to instantiate an object of that type within my MBean I get this class not found exception.

So I'm really interested how to correctly package/deploy a MBean that utilizes JPA - I didn't find a soltution while searching the internet for hours.

Thanks for any hint,

Sven
[Message sent by forum member 'hanisch' (hanisch)]

http://forums.java.net/jive/thread.jspa?messageID=354536