• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

In urgent of EJB3.0+Spring+hibernate application

 
Abhish Sharma
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Andrew Moko
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic