Skip to main content

Shared JPA entity library

4 replies [Last post]
mossp
Offline
Joined: 2010-04-09
Points: 0

Hi,

We have just started using Glassfish 3 and are looking to build a number of JSF web apps and EJB's as part of a larger application. Each of the modules (either local EJBs within the web app WAR's or remote EJB's for common/shared functionality) will utilise the same Oracle database and as such we would like to build a single JPA entity model which all the applications couple share (to make maintainance easier). Our reason for keeping the application as a set of smaller "modules" is to make version control/deployment/concurrent development easier (hopefully).

My question is - what is the best way to go about this, I have tried budling the "entities.jar" (the one with our shared entity classes) into the domains/domain1/lib and it did not seem to work (JSF through exception about unknown entity class)?
thanks,
Pete

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Martin, Ray

I have very strong interest in sharing a JPA module between many
applications. I am running v2 - haven't gotten to v3 just yet.

I have not been able to build a EJB module in Netbeans and utilize that
module in a number of web services. Right now I have multiple copies of
the JPA module - maintenance nightmare.

Any info about sharing JPA modules will be appreciated. Maybe you are
referring only to the v3 environment???

Thanx.

-----Original Message-----
From: Sanjeeb.Sahoo@Sun.COM [mailto:Sanjeeb.Sahoo@Sun.COM] On Behalf Of
Sahoo
Sent: Friday, April 09, 2010 10:43 AM
To: users@glassfish.dev.java.net
Subject: Re: Shared JPA entity library

Currently there is no such notion of standalone entities jar deployment.

I am investigating a similar feature. Hopefully by next week, I will
have a better answer for you. At the moment, the only way a PU can be
shared by multiple modules is by packing all the modules and pu in an
ear file, but I guess that's not what you want for reasons like
concurrent development.

Thanks,
Sahoo

glassfish@javadesktop.org wrote:
> Hi,
>
> We have just started using Glassfish 3 and are looking to build a
number of JSF web apps and EJB's as part of a larger application. Each
of the modules (either local EJBs within the web app WAR's or remote
EJB's for common/shared functionality) will utilise the same Oracle
database and as such we would like to build a single JPA entity model
which all the applications couple share (to make maintainance easier).
Our reason for keeping the application as a set of smaller "modules" is
to make version control/deployment/concurrent development easier
(hopefully).
>
> My question is - what is the best way to go about this, I have tried
budling the "entities.jar" (the one with our shared entity classes) into
the domains/domain1/lib and it did not seem to work (JSF through
exception about unknown entity class)?
> thanks,
> Pete
> [Message sent by forum member 'mossp']
>
> http://forums.java.net/jive/thread.jspa?messageID=396092
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Sahoo

Yes, I am referring to v3 env only.

Sahoo

Martin, Ray wrote:
> I have very strong interest in sharing a JPA module between many
> applications. I am running v2 - haven't gotten to v3 just yet.
>
> I have not been able to build a EJB module in Netbeans and utilize that
> module in a number of web services. Right now I have multiple copies of
> the JPA module - maintenance nightmare.
>
> Any info about sharing JPA modules will be appreciated. Maybe you are
> referring only to the v3 environment???
>
> Thanx.
>
> -----Original Message-----
> From: Sanjeeb.Sahoo@Sun.COM [mailto:Sanjeeb.Sahoo@Sun.COM] On Behalf Of
> Sahoo
> Sent: Friday, April 09, 2010 10:43 AM
> To: users@glassfish.dev.java.net
> Subject: Re: Shared JPA entity library
>
> Currently there is no such notion of standalone entities jar deployment.
>
> I am investigating a similar feature. Hopefully by next week, I will
> have a better answer for you. At the moment, the only way a PU can be
> shared by multiple modules is by packing all the modules and pu in an
> ear file, but I guess that's not what you want for reasons like
> concurrent development.
>
> Thanks,
> Sahoo
>
> glassfish@javadesktop.org wrote:
>
>> Hi,
>>
>> We have just started using Glassfish 3 and are looking to build a
>>
> number of JSF web apps and EJB's as part of a larger application. Each
> of the modules (either local EJBs within the web app WAR's or remote
> EJB's for common/shared functionality) will utilise the same Oracle
> database and as such we would like to build a single JPA entity model
> which all the applications couple share (to make maintainance easier).
> Our reason for keeping the application as a set of smaller "modules" is
> to make version control/deployment/concurrent development easier
> (hopefully).
>
>> My question is - what is the best way to go about this, I have tried
>>
> budling the "entities.jar" (the one with our shared entity classes) into
> the domains/domain1/lib and it did not seem to work (JSF through
> exception about unknown entity class)?
>
>> thanks,
>> Pete
>> [Message sent by forum member 'mossp']
>>
>> http://forums.java.net/jive/thread.jspa?messageID=396092
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Sahoo

Currently there is no such notion of standalone entities jar deployment.
I am investigating a similar feature. Hopefully by next week, I will
have a better answer for you. At the moment, the only way a PU can be
shared by multiple modules is by packing all the modules and pu in an
ear file, but I guess that's not what you want for reasons like
concurrent development.

Thanks,
Sahoo

glassfish@javadesktop.org wrote:
> Hi,
>
> We have just started using Glassfish 3 and are looking to build a number of JSF web apps and EJB's as part of a larger application. Each of the modules (either local EJBs within the web app WAR's or remote EJB's for common/shared functionality) will utilise the same Oracle database and as such we would like to build a single JPA entity model which all the applications couple share (to make maintainance easier). Our reason for keeping the application as a set of smaller "modules" is to make version control/deployment/concurrent development easier (hopefully).
>
> My question is - what is the best way to go about this, I have tried budling the "entities.jar" (the one with our shared entity classes) into the domains/domain1/lib and it did not seem to work (JSF through exception about unknown entity class)?
> thanks,
> Pete
> [Message sent by forum member 'mossp']
>
> http://forums.java.net/jive/thread.jspa?messageID=396092
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

mossp
Offline
Joined: 2010-04-09
Points: 0

thanks,

To be honest I am beginning to think that a "rethink" of my ideas might be needed - when I find myself going against the grain so much its often good to take a step back and think "why am I trying to be so different here!" ;)

thanks again,
Pete