-
1. Re: Stateful EJB's cached in container ignored by SEAM when injected.
maximall Dec 29, 2008 10:03 PM (in response to dmartfw)Hello,
We are developing our project using almost the same configuration as you are.
Try to add something like the listing below to your ejb-jar.xml.
<session> <ejb-name>RoadListBean</ejb-name> <ejb-local-ref> <ejb-ref-name>texdt/RoadListBean/local</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>texdt.action.RoadList</local> </ejb-local-ref> </session>
Afterwards you could remove @EJB annotation from the code.
-
2. Re: Stateful EJB's cached in container ignored by SEAM when injected.
dmartfw Dec 30, 2008 6:13 PM (in response to dmartfw)Thanks Maxim for the suggestion. I did try adding your recommendation in the ejb-jar.xml and I removed the @EJB annotation where the bean is being injected but unfortunately I get this exception:
org.jboss.seam.RequiredException: @In attribute requires non-null valueJust curious, are you running your application on Weblogic?
-
3. Re: Stateful EJB's cached in container ignored by SEAM when injected.
maximall Dec 30, 2008 10:54 PM (in response to dmartfw)Hello, David.
Actually during deveping period we are deploying project on JBOSS, but I spent a lot of time and efforts to run it on Weblogic AS.
There are a lot of problems which are not clarified in documentation. I could send you an example of our configuration files tomorrow. As far as I understant the problem is inside Weblogic container - it can not instantiate EJBs without additinal configuration in descriptors.
Moreover one more issue was revealed. In case if you inject Stateful EJB in JSF Managed Bean using @EJB annotation than it won't be the same as if you inject the same EJB using @IN annotation. The contexts seem to be different.
-
4. Re: Stateful EJB's cached in container ignored by SEAM when injected.
dmartfw Dec 31, 2008 5:51 PM (in response to dmartfw)Thanks Maxim for your help. I'm looking at some other possibilities such as Component.getInstance() which seems to work for pulling in stateful EJB's in the SEAM context. I could use it in cases where the price of injecting at the class level is fairly expensive for a bean that may only be used in a limited feature - such as a delete method. In this case I could use the Component.getInstance inside the delete method and not pay for the injection everytime the parent bean is invoked for more common features.
-
5. Re: Stateful EJB's cached in container ignored by SEAM when injected.
maximall Jan 21, 2009 11:37 PM (in response to dmartfw)Hello David,
Have you managed to deploy successfully your seam application on Weblogic?
Do you use hot deployment in Weblogic during developing process?