My application has only EJB project and no Web tier.
I want to implement spring declarative transaction management using AOP.
How to load the spring context xml?
I am NOT using EJBs (Session beans) for Transaction Management. I want to use Spring POJO Declarative Transaction Management using AOP. Only entry point to the application is MDB.
Since there is not web project, I am not sure how to load the application context xml where the transaction attributes are defined and let the container be aware of it.
you can try this, have a web.xml and define a servlet in it like:
then define a main class like:
SCJP 6
gokul maha
Greenhorn
Joined: Jun 27, 2006
Posts: 25
posted
0
Thanks Vivek. But want to know, Can we use web.xml in EJB project?
How this web.xml will be triggered. I dont have any web module/project at all. My application is triggered using MDB.
Also, there are other ways to do this as well. You can have a main method to load the Spring beans. Where to trigger it from can be a bit tricky...
gokul maha
Greenhorn
Joined: Jun 27, 2006
Posts: 25
posted
0
Thanks. I will try this option.
Once loaded using the above method, the container will take care of the transaction using the attributes in the context xml right ?