Skip to main content

InvocationException on getting connection from pool

2 replies [Last post]
Joined: 2003-07-01

Hi all,

Firstly, thanks to all involved for glassfish, its looking really good.

I'm attempting to deploy an app that worked fine under Tomcat 5, and fine under Jboss 3/4.

I used the admin webapp to create a DataSource, and publish it as a JNDI resource.
The application seems to find the resource, but appears to be attempting to initiate a transaction, which, firstly, I do not wish to initiate, and secondly, is not supported by by my JDBC driver (JTDS).
I've also hacked around in domains//config/domain.xml, and found the following line:-

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-03-28


Try setting non-component to true in your connection pool
settings. The exception that you see is because the Pool
tries to get the Transaction from the InvocationContext that
is normally associated with a component. In your case the
getConnection request is happening inside the hibernate
container and hence there is no j2ee Component whose
InvocationContext the transaction can be fetched from -
leading to the exception that you see.
Another way to fix this is to create a DataSource with the
jndiname suffixed with the string "__pm", e.g "jdbc/foo__pm"
Suffixing the __pm string behaves in a similar manner to
setting the non-component attribute to true.


Joined: 2003-07-01

Yes, that seemed to work, as did suffixing the DS name.
Out of interest, does __pm mean 'privately managed'? ;)

I still seem to have stacks of other unrelated problems deploying this hibernate app, but i'll persevere.

Thanks for the advice.