openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: NullPointerException into JDBCStoreQuery
Date Wed, 05 Dec 2012 02:48:12 GMT
It seems to me that there are two possible use cases here.

1.) The Broker has been serialized and deserialized. In this case the code
expects that the LifeCycleEventManager will be serialized with the Broker
and the saved LCEventManager should be used from that point on (or at least
until free() is called).

To investigate this case it'd be handy to serialize/deserialize the broker
and see if the LCEventManager is preserved. If not then perhaps it's a bug
in serialization. If it is preserved then the lack of a null check isn't
(necessarily) a red flag.

2.) The LCEventManager becomes null after doing two bulk delete operations
(this was mentioned in the original email). Unless the extension to slice
or your testcase are serializing the broker this is a different issue.

In either case I'd suggest creating a repeatable testcase, or steps to
reproduce with 'vanilla' OpenJPA and opening a JIRA.

-mike


On Tue, Dec 4, 2012 at 10:30 AM, Fabio Martelli <fabio.martelli@gmail.com>wrote:

>
> Il giorno 04/dic/2012, alle ore 17.05, Rick Curtis ha scritto:
>
> > I'm not certain the null check is the correct change.... Why aren't we
> > getting a LifeCycleEventManager on deserialization?
>
> Hi Rick,
> BrokerImpl initialize LifecycleEventManager into the initialize method.
>
> From my PPOV, the piece of code that suggest what I wrote in my email is
> the following
>
> ....
> if (!fromDeserialization) {
>             _lifeEventManager = _conf.getLifecycleEventManagerInstance();
>             .....
> }
> .....
>
> Now, fromDeserialization is a method's parameter so someone could provide
> a "true" value for it.
>
> In particular, the following chain seems to provide a "true" value for
>  fromDeserialization parameter
>
>         BrokerImpl.readObject —> AbstractBrokerFactory.initializeBroker —>
> BrokerImpl.initialize
>
> Please tell me if I wrong or  I missed something.
>
> Best regards,
> F.
>
> Now, since initialize can be called by BrokerFactory.initializeBroker
>
> > Thanks,
> > Rick
> >
> > On Tue, Dec 4, 2012 at 3:49 AM, Fabio Martelli <fabio.martelli@gmail.com
> >wrote:
> >
> >> JDBCStoreQuery
> >
> >
> >
> >
> > --
> > *Rick Curtis*
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message