users@glassfish.java.net

[gf-users] Re: Glassfish JDBC Connection Pool property question

From: Noah White <emailnbw_at_gmail.com>
Date: Fri, 11 Jul 2014 17:10:19 -0400

Hi Reza:

So I have some EJBs which are annotated with @TransactionAttribute(TransactionAttribute.NOT_SUPPORTED) , they make read-only calls to the DB, and they run without throwing any exceptions whether or not this box is checked off so my question is basically two fold:

1. Whats the purpose of this setting? (The User’s Guide doesn’t give anymore detail then the GUI does)
2. What are the expectations in this case? (So I can determine if this is expected or a bug)

Thanks,

-Noah

On Jul 11, 2014, at 4:56 PM, Reza Rahman <Reza.Rahman_at_oracle.com> wrote:

> The best approach is probably to write a test and see what happens. My guess is that the entity manager will throw an exception if you try to do anything that requires an active transaction. Otherwise you'll probably be fine.
>
> On 7/11/2014 4:44 PM, Noah White wrote:
>> In the a JDBC Connection Pool there’s a Transaction section which has a property called “Non Transactional Connection” and a check box next to the word “Enabled”. The caption to this property says, “Returns non-transactional connections”.
>>
>> If the Enabled box is NOT checked off, what happens with respect to EJB’s that have methods annotated with @TransactionAttribute(TransactionAttribute.NOT_SUPPORTED) or .NEVER and whose injected EntityManager is associated with a Persistence units what is a JTA resources that uses this connection pool?
>>
>> -Noah
>