Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

How to configure JPA suppourt for a Application

Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

I am using MyEclipse as IDE .
I am trying to addd JPA Capabilities to the EJB Module .
( I want to use Container Managed EntityManager inside my SessionBeans (so JTA as my Transaction Suppourt )

Please Tell me what should be the name that should be mentioned under JNDI Data Source field name .
Please see the screen shot attached here .

Also tell me do i need to define this JNDI DataSource anywhere in my server ??(I am using weblogic as my server)

[Thumbnail for jndidatasource.jpeg]
Saloon Keeper
Posts: 25466
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't use IDE wizards for stuff like this. I manipulate the project files directly, so whatever advice I can give won't reflect MyEclipse (which I don't have installed), and won't even have a whole lot to do with Eclipse itself. But it will be JEE, which is what the ultimate goal is, IDE or not.

JPA is part of the EJB3 spec, so what you're really saying is that you want to get EJB3 running. You can run JPA without the full EJB3 (for example Spring/Hibernate/Tomcat), but EJB3 is JPA. EJB2 and earlier are not.

When the container supports EJB3, you can have it inject the persistence manager into your Session EJBs using JPA annotations. Most of the JNDI stuff goes undercover or disappears entirely in EJB3. Remoting was the norm under the original EJB spec, and you needed JNDI for that, but Remote beans are the exception in EJB3, so direct object references are usually sufficient.

In cases where you don't have the server providing direct EJB support, the persistence.xml file is normally where you configure your connection/entitymanagerfactory persistence information. I've spent so much time in places where they banned EJBs that I'm not quite sure what, if any role the persistence.xml performs in a true EJB container, although with luck I'll know more later this week when I attempt to port a project.
I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic