persistence@glassfish.java.net

RE: [Fwd: Re: persistence-api changes for new packaging proposal]

From: Mike Keith <michael.keith_at_ORACLE.COM>
Date: Thu, 1 Dec 2005 09:43:10 -0500


Yes, the Container may choose to ignore an empty persistence.xml
file, or it may have its own vendor defaults that it assumes, or it may
choose to throw an exception.
Portable applications should not use an empty persistence.xml file.

-Mike

> -----Original Message-----
> From: Sanjeeb.Sahoo_at_Sun.COM [mailto:Sanjeeb.Sahoo_at_Sun.COM]On Behalf Of
> Sanjeeb Kumar Sahoo
> Sent: Thursday, December 01, 2005 7:26 AM
> To: Mike Keith
> Cc: Marina Vatkina; persistence_at_glassfish.dev.java.net;
> ejb3-toplink_at_Sun.COM; ejb3-toplink_ww_at_oracle.com
> Subject: Re: [Fwd: Re: persistence-api changes for new packaging
> proposal]
>
>
> Hi Mike,
> Mike Keith wrote:
>
> >There is no spec meaning to a persistence.xml file with no
> persistence
> >units defined in it. It would only be ignored.
> >
> >
> Ignored by whom? By container? The provider typically does not read
> persistence.xml, does it?
> So in essence, a portable application should not use an empty
> persistence.xml, right? Please confirm.
>
> Thanks,
> Sahoo
>
> >We let the schema allow an empty file because the Container vendors
> >wanted to be allowed to assign their own defaults.
> >
> >
> >
> >>-----Original Message-----
> >>From: Marina.Vatkina_at_Sun.COM
> >>[mailto:Marina.Vatkina_at_Sun.COM]On Behalf Of
> >>Marina Vatkina
> >>Sent: Thursday, October 20, 2005 4:30 PM
> >>To: Mike Keith
> >>Cc: Sanjeeb Kumar Sahoo; persistence_at_glassfish.dev.java.net;
> >>ejb3-toplink_at_Sun.COM; ejb3-toplink_ww_at_oracle.com
> >>Subject: Re: [Fwd: Re: persistence-api changes for new packaging
> >>proposal]
> >>
> >>
> >>Mike,
> >>
> >>The current spec proposal says (6.2.1 persistence.xml file):
> >>"The persistence element consists of one or more
> >>persistence-unit elements."
> >>
> >>What are the minimum requirements for persistence.xml?
> >>
> >>thanks,
> >>-marina
> >>
> >>Mike Keith wrote:
> >>
> >>
> >>
> >>>If a persistence-unit is specified then its name must be present.
> >>>However, there is no requirement that the file contain one or more
> >>>persistence-units.
> >>>
> >>>
> >>>
> >>>>-----Original Message-----
> >>>>From: Sanjeeb Kumar Sahoo [mailto:Sanjeeb.Sahoo_at_Sun.COM]
> >>>>Sent: Thursday, October 20, 2005 3:41 PM
> >>>>To: Mike Keith
> >>>>Cc: persistence_at_glassfish.dev.java.net; ejb3-toplink_at_Sun.COM;
> >>>>ejb3-toplink_ww_at_oracle.com
> >>>>Subject: Re: [Fwd: Re: persistence-api changes for new packaging
> >>>>proposal]
> >>>>
> >>>>
> >>>>Hi Mike,
> >>>> Thanks for sending that schema. One minor comment:
> >>>>Since name of a persistence-unit is no more optional, should
> >>>>minOccurs
> >>>>be 1 for persistence-unit?
> >>>>
> >>>>Thanks,
> >>>>Sahoo
> >>>>
> >>>>Mike Keith wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Sahoo, the latest updated persistence.xsd is attached.
> >>>>>
> >>>>>-Mike
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>-----Original Message-----
> >>>>>>From: Sanjeeb Kumar Sahoo [mailto:Sanjeeb.Sahoo_at_Sun.COM]
> >>>>>>Sent: Thursday, October 20, 2005 2:08 PM
> >>>>>>To: persistence_at_glassfish.dev.java.net; ejb3-toplink_at_sun.com;
> >>>>>>ejb3-toplink_ww_at_oracle.com
> >>>>>>Subject: [Fwd: Re: persistence-api changes for new
> >>>>>>
> >>>>>>
> >>>>packaging proposal]
> >>>>
> >>>>
> >>>>>>Hi Team,
> >>>>>> This is my plans for making changes in glassfish to
> >>>>>>
> >>>>>>
> >>the latest
> >>
> >>
> >>>>>>packaging changes:
> >>>>>>
> >>>>>>1) I will use the latest proposal (the one sent by Linda
> >>>>>>
> >>>>>>
> >>>>yesterday). I
> >>>>
> >>>>
> >>>>>>will update persistence.xsd so that CTS tests can be
> >>>>>>
> >>>>>>
> >>>>migrated from par
> >>>>
> >>>>
> >>>>>>to jar as well as to new schema at the same time.
> >>>>>>
> >>>>>>2) Not all features from the new packaging spec will be
> >>>>>>supported in the
> >>>>>>initial check in. We will support the persistence unit
> >>>>>>
> >>>>>>
> >>to be part of
> >>
> >>
> >>>>>>ejb-jar (stand alone as well as embedded), embedded war
> >>>>>>
> >>>>>>
> >>and embedded
> >>
> >>
> >>>>>>library jar. The rest will be implemented subsequently.
> >>>>>>
> >>>>>>3) To minimize the amount of changes in one check in, we will
> >>>>>>not update
> >>>>>>the javax.persistence.spi interfaces in the first check in.
> >>>>>>So to start
> >>>>>>with we don't have to change the part of TopLink
> >>>>>>
> >>>>>>
> >>Essential that runs
> >>
> >>
> >>>>>>inside container. All the supported features would work
> >>>>>>
> >>>>>>
> >>>>fine. Once the
> >>>>
> >>>>
> >>>>>>first phase of container changes are made, in the
> >>>>>>
> >>>>>>
> >>second phase both
> >>
> >>
> >>>>>>container and TopLink Essential will be modified to use
> >>>>>>
> >>>>>>
> >>the new SPI.
> >>
> >>
> >>>>>>I hope to check in the first set of changes by Monday
> >>>>>>
> >>>>>>
> >>(subject to
> >>
> >>
> >>>>>>getting review comments from all reviewers).
> >>>>>>The second phase of changes would include update to the SPIs.
> >>>>>>This will
> >>>>>>be done mid next week (*Tom, please confirm, whether this is
> >>>>>>OK with you
> >>>>>>or not*). This will be transparent to users.
> >>>>>>
> >>>>>>Thanks,
> >>>>>>Sahoo
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>
> >>
>
>