persistence@glassfish.java.net

Re: [Issue 78] TopLink expects PU names to be unique across applications.

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Thu, 08 Dec 2005 22:22:00 +0530

Hi Tom,

1) I am not able to find where the spec says that a provider has to
redeploy when the same named PU is passed? deployment/redployment is
container's responsibility. Container calls emf.close() in case of
redeployment and provider can get the name from the emf.

2) Why should a PU name be unique across applications in an appserver?
It is always private to an application. Since right now TopLink
Essential is storing the pu names in a singleton object which is loaded
by system class loader, the names have to be unique. This is a P2 bug in
our system because users are forced to use different names in their
persistence.xml. It also results in random behavior. That's why I am
saying, we should at least stop using that singleton.

Thanks,
Sahoo

Tom Ware wrote:

> The problem is that based on the information available, there is no
> way to uniquely identify the PU and since the spec says that if we
> call this method with the same PU, we have to redeploy, there is know
> way to know which path to take. I have been told the spec comittee is
> discussing this.
>
> -Tom
>
> Sanjeeb Kumar Sahoo wrote:
>
>> Hi Tom,
>> I don't know what is the confusion here. Any way, can't we at least
>> fix such that PU names does not have to be unique across the JVM?
>>
>> Thanks,
>> Sahoo
>> tware_at_dev.java.net wrote:
>>
>>
>>
>>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=78
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------- Additional comments from tware_at_dev.java.net Thu Dec 8
>>> 13:57:26 +0000 2005 -------
>>> The spec will be providing clarification about this issue. We will
>>> make changes when the new information is available.
>>>
>>>
>>>
>>
>>
>>
>>
>