Forums Register Login

Transaction and Websphere - problems

+Pie Number of slices to send: Send
Hi

I'am trying to use transaction in my webService which is installed on Websphere Application Server.

I've found pice of code

Code which is connect to the database is working when i not use transaction.

When I invoke my service (with this code) i have error:
javax.naming.NameNotFoundException: Name "comp/env/UserTransaction" not found in context "java:"

What should I do else to start use transaction in my webService?

thanks
rafal
+Pie Number of slices to send: Send
The exception message suggests strongly that the JNDI name is wrong.
Try "java:comp/UserTransaction".
+Pie Number of slices to send: Send
First thanks for replay

I have one JNDI which i have defined in my web.xml file


In Webshere i configured this JNDI too (it was necessary) by
Resources -> JDBC Providers -> ...

I am using it to connect to the Oracle database and it works fine.

The JNDI name is wrong so where should i define them?
How should look inscription im my web.xml for this JNDI?

Thanks
Rafal
+Pie Number of slices to send: Send
I was trying to say that you are looking up the UserTransaction in a wrong place.
+Pie Number of slices to send: Send
Thanks Edvins Reisons - it works!
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 4269 times.
Similar Threads
Transaction and Websphere - problems
UserTransaction object in remote client
Accessing UserTransaction object on JBoss 4.0.1 from remote client
EJB transaction issue
UserTransaction in Hibernate
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:00:06.