This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB web project in Eclipse  RSS feed

 
Ranch Hand
Posts: 48
  • 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
 
author
Ranch Hand
Posts: 580
5
  • 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
  • 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
  • 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
  • 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
  • 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
 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!