james loveay wrote:
Bill Gorder wrote:I have never found the need to mix the 2. I just use Spring for all of my DI. I know it can be done, but I personally don't see the advantage in it. I would use one or the other personally.
Hi Bill,
Many thanks for your reply,
It was a great help. The sources confimed what I thought was the rightr way to go but always better having a wiser head show the path than to stumble around in the dark.
Anywho! totally agree with you that Spring is very good at handling everything I need for the project but then tah would be too easy!
Seriously the EJB were developed for another project I worked to learn the Struts framework and I wanted to re-use them instead of going the long route and re-building everything using spring, which would have been much easier.
Again many thanks.
Following on from my last post, just wanted to make an update!
I followed the links suggested and found a lot of examples on the net showing exactly the same thing, but they didn't work i.e. using a lookup configuration entry in the applicationConfiguration.xml file. Not sure why they didn't work but just in case anybody else comes across this problem I think that it may have something to do with the Glassfish server running with the Net Beans
IDE, I have come across some peculiarities like this before, again though not 100% sure about that, although all of the examples I found used
Tomcat or Weblogic.
Anyway I found another example which injected the EJB using annotations with a name mapping directly to the EJB
So I used
Using this I was able to directly inject a proxy into the controller without touching the configuration file.
Many, many thanks to Bill though because without his guidance I'd still be wandering about in the dark. Probable eaten by wolves by now
