dev@glassfish.java.net

Re: Problems with container persistence.xml processing and non-jta connection pooling.

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Wed, 31 Jan 2007 22:35:03 +0530

Andrei Ilitchev wrote:
> While fixing issue 2106 I ran upon the following problems in container:
> 1. Even though no non-jta data source was specified in persistence.xml
> a non-jta data source was created and passed to TopLink to be used for
> reading.
> That doesn't seem to be spec. complient.
Reading the following javadocs comment as specified in section #7.1.4 of
JPA spec, I think it is perfectly fine for a container to supply a
non-jta-data-source object even if user did not specify a value in p.xml.
/**
 * @return The non-JTA-enabled data source to be used by the
 * persistence provider for accessing data outside a JTA
 * transaction.
 * The data source corresponds to the named <non-jta-data-source>
 * element in the persistence.xml file or provided at
 * deployment or by the container.
 */
public DataSource getNonJtaDataSource();

> 2. Non-jta connection pool produces connections with autoCommit set to
> false.
> 3. After connection obtained from non-jta data source is closed it
> still holds the locks.
Jagadish, can you comment on #2 & #3? FYI, we use
/ConnectorRuntime.getRuntime().lookupNonTxResource(DSName)/ to get hold
of this data source.

Thanks,
Sahoo
>
> For more details please see
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=2106
>
> Thanks,
>
> Andrei
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>