aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes In urgent of EJB3.0+Spring+hibernate application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "In urgent of EJB3.0+Spring+hibernate application" Watch "In urgent of EJB3.0+Spring+hibernate application" New topic
Author

In urgent of EJB3.0+Spring+hibernate application

Abhish Sharma
Greenhorn

Joined: Nov 14, 2011
Posts: 13
Can any suggest me some links or pdf's which could help me in developing one application using all three. I tried my best but till now i only got Failure.Can some one suggest me how can i develop the application> And most important i am new to all the three technology although i got few concept of spring and hibernate. Or any sample application which just fetch all the data from database and allow entering of Data. HELP ME PLEASE!!!1
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

Why do you want to use all three? For a new application, one generally chooses EJB 3 or Spring; not both. With legacy code, having a mixture makes sense. But then you would already have an example.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Andrew Moko
Ranch Hand

Joined: Dec 16, 2011
Posts: 55
Jeanne Boyarsky wrote:Why do you want to use all three? For a new application, one generally chooses EJB 3 or Spring; not both. With legacy code, having a mixture makes sense. But then you would already have an example.


I thought spring is a j2ee framework just like liferay, seam e.t.c that supports ejb technology. It's like choosing between the java language and the java lang api.

Anyways to the OP AppFuse is a good start. It has good quick start tutorials to set you off.
Andrew Moko
Ranch Hand

Joined: Dec 16, 2011
Posts: 55
I ran into this thread i find very helpful. Spring and EJB can be used interchangeably. It depends on the project at hand.

http://www.coderanch.com/t/320460/EJB-JEE/java/Advantages-EJB-JPA-over-spring
Abhish Sharma
Greenhorn

Joined: Nov 14, 2011
Posts: 13
Andrew Gabriel wrote:I ran into this thread i find very helpful. Spring and EJB can be used interchangeably. It depends on the project at hand.

http://www.coderanch.com/t/320460/EJB-JEE/java/Advantages-EJB-JPA-over-spring


Thanks gabriel and jeanne, but my problem is severe.
Now i started my application and about to come at end of module1 but i am facing problem in calling ejb from spring. Somewhat in jndi name. service-name not bound is what i get every time. Can you help me out to get rid of it. My servlet dispatcher named spring-app.xml is



and i get this error every time
Andrew Moko
Ranch Hand

Joined: Dec 16, 2011
Posts: 55
Make sure your bean (manager) is registered. From your config file the bean definition code is commented out



Leave out

if you don't need it but you need the other part of the code..
Abhish Sharma
Greenhorn

Joined: Nov 14, 2011
Posts: 13
Thanks for reply but my problem in am not able to add my bean to JNDI. It is not getting the bean ref so that jndi tree is made.

And as far as manager which is commented out is simply because it would end up giving multiple declaration for bean manager. How would i add it to jndi. If you want I can add my whole code there.
Andrew Moko
Ranch Hand

Joined: Dec 16, 2011
Posts: 55

Correct me if i'm wrong..

[code=java]
<jee:jndi-lookup id="manager" jndi-name="ManagerImpl/remote" lookup-on-startup="true" proxy-interface="oaklabs.ICL.EJB.service.Manager"></jee:jndi-lookup>
[code]

The above code does a jndi lookup AND NOT register bean. You need to register your 'manager' bean by defining it's class name & id.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In urgent of EJB3.0+Spring+hibernate application