Skip to main content

what is actually happening in deployement?

3 replies [Last post]
newdixieland
Offline
Joined: 2009-04-05

Hi,

I am trying to find out how the inner workings of deployment functions.. I would like to come to understand exactly what is going on with regards to

1. how are entitybeans are loaded?

2. how the entities get mapped with JPA, and how this functions in a generic manner so the it works with different JPA providers?

3. how and when the database scheme gets updated?

Any help would be grateful, source to look at or any general direction.. i am current looking through glassfish source, however thought if one of you expert devs know it could save me a load of time..

cheers,

dixie.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
newdixieland
Offline
Joined: 2009-04-05

Hi Sahoo,

thanks very much for the information and link to the class.. Will have a look through the class and read chapter 7, and will be back probably to ask more questions..

thanks again,

dixie.

Sahoo

There are two entities involved here: container (or the application
server) and persistence provider. When user deploys an application to a
container, the container reads only persistence.xml file and in turn
calls the persistence provider for necessary JPA related deployment
activities like processing of ORM annotations, orm xml files, db schema
generation etc. JPA deployment is initiated using a standard SPI defined
by JPA spec. See chapter #7 (Container Provider Contracts for Deployment
and Bootstrapping) of JPA 1.0 spec. It is this SPI that makes it
possible for different providers to work in the same application server.
DB schema generation is done using a provider specific manner, as that
is not covered by the SPI.

I suggest you take a look at chapter #7 first. For implementation
details, you can start looking at PersistenceUnitLoaderImpl.java [1] and
then ask us questions. Once you visit that class, you can browse related
classes like PersistenceUnitDescriptor, PersistenceUnitInfo, etc.

Thanks,
Sahoo

glassfish@javadesktop.org wrote:
> Hi,
>
> I am trying to find out how the inner workings of deployment functions.. I would like to come to understand exactly what is going on with regards to
>
> [b]1. how are entitybeans are loaded?
>
> 2. how the entities get mapped with JPA, and how this functions in a generic manner so the it works with different JPA providers?
>
> 3. how and when the database scheme gets updated?[/b]
>
> Any help would be grateful, source to look at or any general direction.. i am current looking through glassfish source, however thought if one of you expert devs know it could save me a load of time..
>
> cheers,
>
> dixie.
> [Message sent by forum member 'newdixieland' (newdixieland)]
>
> http://forums.java.net/jive/thread.jspa?messageID=345882
>
> ---------------------------------------------------------------------
> 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

I forgot to include a pointer to the following source code:

http://fisheye5.cenqua.com/browse/glassfish/appserv-core/src/java/com/su...

Sahoo wrote:
> There are two entities involved here: container (or the application
> server) and persistence provider. When user deploys an application to
> a container, the container reads only persistence.xml file and in turn
> calls the persistence provider for necessary JPA related deployment
> activities like processing of ORM annotations, orm xml files, db
> schema generation etc. JPA deployment is initiated using a standard
> SPI defined by JPA spec. See chapter #7 (Container Provider Contracts
> for Deployment and Bootstrapping) of JPA 1.0 spec. It is this SPI that
> makes it possible for different providers to work in the same
> application server. DB schema generation is done using a provider
> specific manner, as that is not covered by the SPI.
>
> I suggest you take a look at chapter #7 first. For implementation
> details, you can start looking at PersistenceUnitLoaderImpl.java [1]
> and then ask us questions. Once you visit that class, you can browse
> related classes like PersistenceUnitDescriptor, PersistenceUnitInfo, etc.
>
> Thanks,
> Sahoo
>
> glassfish@javadesktop.org wrote:
>> Hi,
>>
>> I am trying to find out how the inner workings of deployment
>> functions.. I would like to come to understand exactly what is going
>> on with regards to
>> [b]1. how are entitybeans are loaded?
>>
>> 2. how the entities get mapped with JPA, and how this functions in a
>> generic manner so the it works with different JPA providers?
>>
>> 3. how and when the database scheme gets updated?[/b]
>>
>> Any help would be grateful, source to look at or any general
>> direction.. i am current looking through glassfish source, however
>> thought if one of you expert devs know it could save me a load of time..
>>
>> cheers,
>>
>> dixie.
>> [Message sent by forum member 'newdixieland' (newdixieland)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=345882
>>
>> ---------------------------------------------------------------------
>> 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