File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB web project in Eclipse

 
Jim Petersson
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've just started doing some EJB development, so far I've only used stand-alone java applications to test it and that works fine.
But now I thought I'd try do use a jsp/servlet web-app instead.

How do I set this up in Eclipse? Should I create a separate EJB project and a separate web-projects? (that depends on the EJB-proj)
Or is there some other project type that would incorporate both the EJB and web stuff?

Thanks,
Jim
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim,

Try the Eclipse project wizard for an enterprise application (deployed as an EAR). It'll walk you through your choices.

Regards,
Reza
 
Jim Petersson
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Reza Rahman:
Jim,

Try the Eclipse project wizard for an enterprise application (deployed as an EAR). It'll walk you through your choices.

Regards,
Reza


Nice, exactly what I was looking for

Btw, thanks for the EJB3 in Action book, helped me alot!

Thanks,
Jim
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim,

Glad to hear it and thanks for the kind words.

Regards,
Reza

P.S.: Please do consider writing a review for EJB 3 in Action on Amazon or elsewhere. We have some excellent reviews so far, but smaller in number than some other titles (not that quantity is everything).
 
Jim Petersson
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so now I've got a small app up and running. I have some EJB's (stateful and stateless), and a web-interface (jsp/servlet) communicating with my beans.
Now I would like to create some Entities using JPA, but I'm not sure how to set it up in Eclipse.
Should I create a new JPA-project? (and somehow connect that to my existing Enterprise project) Or should I just place my beans directly under my EJB-project?
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim,

You can do it either way with the wizards. I prefer to just switch the JPA facet on for the EJB project and put the JPA classes there. There is also a very nice JPA perspective in Eclipse WTP that lets you do ORM mapping with a UI - very nice stuff...

Regards,
Reza
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic