openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: svn commit: r513183 - in /incubator/openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ openjpa-persistence/src/main/java/org/apache/openjpa/persistence/
Date Thu, 01 Mar 2007 15:52:12 GMT
The difference is that in an appserver environment, this will return a
non-finalizing EM by default, but in a Java SE environment, it will
return a finalizing EM by default. See the last bit of my last comment
in OPENJPA-160.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
> Sent: Wednesday, February 28, 2007 10:42 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: svn commit: r513183 - in 
> /incubator/openjpa/trunk: 
> openjpa-kernel/src/main/java/org/apache/openjpa/conf/ 
> openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ 
> openjpa-persistence/src/main/java/org/apache/openjpa/persistence/
> 
> Hi Patrick,
> 
> I don't quite understand the code that follows. What is the  
> difference between this code and simply defaulting the value to non- 
> finalizing impl?
> 
> Craig
> 
> On Feb 28, 2007, at 10:31 PM, pcl@apache.org wrote:
> 
> >          PersistenceUnitInfo pui, Map m) {
> >          PersistenceProductDerivation pd = new  
> > PersistenceProductDerivation();
> >          try {
> > +            // if the BrokerImpl hasn't been specified, 
> switch to the
> > +            // non-finalizing one, since anything claiming 
> to be a  
> > container
> > +            // should be doing proper resource management.
> > +            if (!Configurations.containsProperty(BrokerValue.KEY,
> > +                pui.getProperties())
> > +                && !Configurations.containsProperty 
> > (BrokerValue.KEY, m)) {
> > +                m.put(BrokerValue.KEY,  
> > BrokerValue.NON_FINALIZING_ALIAS);
> > +            }
> > +
> >              ConfigurationProvider cp = pd.load(pui, m);
> >              if (cp == null)
> >                  return null;
> 
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
> 
> 

Mime
View raw message