Jan 9th, 2008, 12:11 PM
WLS 10, pitchfork & Spring
Christian shows us how to get access to the appContext within EJB3's with WLS 9 and pitchfork in the following post.
In the comments, however, he says on Jun 11, 2007 that
"Yes, I tested the example, but it didn’t work [in WLS 10.0]. There is a way to enable advanced Spring features in Bea WebLogic 10 (including AOP support), but this is not public right now and definitely not yet supported by BEA. Stay tuned for an upcoming BEA announcement."
My questions is:
Should we use the abstract EJB base classes and ContextJndiBeanFactoryLocator/ContextSingletonBeanFactoryLocator to access the applicationContext in our EJB3's in WLS 10? There is at least 1 post saying that this support is only for EJB2 (http://forum.springframework.org/showthread.php?t=47338).
Thanks for any help,
Jan 9th, 2008, 01:23 PM
Hi! I've been playing around with this same thing for the past month.
You can look here
http://edocs.bea.com/wls/essex/TechP...ng_Support.pdf and here
how to enable spring extensions in wls 10.3. (in 10.0 I used this tactic: http://forum.springframework.org/showthread.php?t=38361
After that the example provided by Christian should work.
Now, if someone could show me how to inject entitymanager into a bean using this spring extension, I would be very thankfull
Last edited by kakoni; Jan 9th, 2008 at 02:07 PM.
Jan 9th, 2008, 01:42 PM
Great information, thanks. I thing we are stuck on 10.0 for a while. I take it that the spring extension tricks you mention will not work in that version? I can try it myself. But if they don't, do you know if I can use the abstract base classes and ContextJndiBeanFactoryLocator/ContextSingletonBeanFactoryLocator with 10.0?
Jan 9th, 2008, 02:10 PM
Sorry, when I said 10.1, I meant 10.0 (mixed workshop and weblogic versions in my head..
Jan 9th, 2008, 03:10 PM
Jan 16th, 2008, 06:47 PM
Yes, these instructions worked for me too with wls v10.
Under META-INF create directory called services
Under services create file called;
which contains only this line;
Jan 17th, 2008, 03:19 AM
How is it working for you?
For example I've got problems when I'm for instance trying to setup scheduling in this spring-ejb-jar.xml. Can't get it to work (if I would bootstrap this scheduling using contextloaderlistener in webapp no probs..)
Jan 23rd, 2008, 05:00 PM
I've only done simple bean definitions, nothing fancy like scheduling, yet. What error are you getting? What version of Spring is it using, the repackaged weblogic 2.0.2 jar?
Jan 24th, 2008, 01:29 PM
OK, I see what you mean. We tried implementing ApplicationContextAware in a class and the setter method was just never called. So we had to back track to manually loading via ClassPathXmlApplicationContext. This is with wls 10.0.
I wonder what's going on. This is strange. Seems like to me it would either work or not.
Last edited by jboring; Jan 24th, 2008 at 01:43 PM.