• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPA with JSF

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there

I want to create a JSF project with JPA. I am using eclipse 3.5. How can I integrate both in one project?
I read somewhere that keeping JSF and JPA project separately is a good practice, but I don't know how to do this. If I am using two different projects that is for JSF one project and JPA another how do I integrate and make it working depending on each other?

Please give me some inputs.
 
Ranch Hand
Posts: 218
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create project for JPA & another one for JSF. Since JSF will be using JPA add a dependency between JSF & JPA, can be done via adding to java build path of project
 
zabin shariff
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rishi
Thank for the reply.

I have created two different projects for JPA and JSF and have connected by build path. Have to work on the entity manager part, which I want to use in my JSF project. Will work on that and get back.
 
zabin shariff
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there.

I tried by creating two different projects for JPA and JSF. Wrote build.xml for both to have the class path entry properly.
But I am getting this error:

Here is what exactly I am doing:
JPA Test (its a project): in which JPA is configured and the persistence.xml is written
persistence.xml:

In the source of this project I have the persistence classes and a connection class.
Connection Class:

The next Project is for JSF which is call RackRate. This has all the JSF capability. Now in my jsp I am calling one bean called RackRateAction.
It contains:

Can you suggest me where i m going wrong?

 
zabin shariff
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there.

Now I tried both JPA and JSF in one project and it is working now

Check these site for more help:
http://docs.jboss.org/hibernate/stable/entitymanager/reference/en/html_single/#d0e46
[url]
http://download.oracle.com/docs/cd/B31017_01/web.1013/b28221/cfgdepds005.htm#TopLinkJDBC[/url]
[url]
http://www.gregbugaj.com/?p=172&cpage=1#comment-236[/url]

Enjoy:)
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

please create a jsf(Dynamic web project)

and go to your project properties(jsf project)

select Project Facets

in that wizard,select Jpa

then press OK,now your project is configure with jsf+jpa

Venkat
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic