My project initially develop using with out persistence unit and project is spring,Struts2 hibernate intergration one. Now I need to use jboss connection pool and persistence unit.I need to handle transaction by conatainer also not like in the code i posted(dao). Please change my code to meet that requirement.
current spring.xml
You need to look up the data source from JNDI instead of DriverManagedDataSource. Also you should use the JTATransactionManager. JTA transaction Manager will use the transaction manager provided by JBoss
Jayesh A Lalwani wrote:You need to look up the data source from JNDI instead of DriverManagedDataSource. Also you should use the JTATransactionManager. JTA transaction Manager will use the transaction manager provided by JBoss
can you give me sample code or replace my code with changes...
I have tried several and non of them succeed..
thanks.
For looking up your data source from JNDI, you have to do
Replace JNDI-name with the name of your JNDI data source.
For using the JBoss transaction manager, do
These setting are pretty much what you find all over the net. If you have tried them already, and they are not working, you will have to figure out what the problem is by looking at the error messages.
Jayesh A Lalwani wrote:For looking up your data source from JNDI, you have to do
Replace JNDI-name with the name of your JNDI data source.
For using the JBoss transaction manager, do
These setting are pretty much what you find all over the net. If you have tried them already, and they are not working, you will have to figure out what the problem is by looking at the error messages.
this is my spring xml after make changes you have mentioned.
There is no session factory bean and I cant set session factory to DAO class as i done earlier.
soo how to change my DAO class and annotate with Transactional.