Two Laptop Bag*
The moose likes EJB and other Java EE Technologies and the fly likes create an  application using jpa from scratch Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "create an  application using jpa from scratch" Watch "create an  application using jpa from scratch" New topic
Author

create an application using jpa from scratch

Ray Lowell
Greenhorn

Joined: Jul 19, 2012
Posts: 5

Hi,
I am having hard time understanding JPA. What I want to know is that how to create a java application (JPA) *USING MySQL* , and plain java classes , from scratch. But *NO ENTITY BEANS*. Don't want to use any kind of plugins, (such as toplink as people suggest, no). It shouldn't be tied to glassfish server or any other. I've once programmed using hibernate , but it's been a while and I didn't like modify xml files g by hand. I 'll be using it mainly for creating a web application , of course it will use servlets but no Entity beans. But it will be of much help if you let me know how it can be done through *plain java classes*.

At this moment I am not even concerned with MVC pattern , just would like to know how to make a tiniest application using jpa enough to show me how it is deployed.
Thanks.
p.s :- I know how to code in jpa , I am already using it, with tomcat , mysql .(because it was deployed by somebody else and I know all CRUD operations , all I have to do is to modify those sources) , but I haven't been able to understand how to create such application from scratch. I tried creating a table which stores username, password and other trivial info without any relationships.
Ray Lowell
Greenhorn

Joined: Jul 19, 2012
Posts: 5

Ok this was fairly enough. All I had to do was to
$javac -cp "<path to my hibernate library>:. " <path to my src> -d WEB-INF/classes
Ray Lowell
Greenhorn

Joined: Jul 19, 2012
Posts: 5

and then I used $jar cvf myapplication.war <path where this war file to be gernerated>


then I deployed this application in tomcat and executed it.
It worked.
 
 
subject: create an application using jpa from scratch
 
Similar Threads
Newbie Question: What's the relationship between JPA and EJB?
modeling JSF managed beans on component diagram
create an application using jpa from scratch
EJB3 or hibernate
EJB3 Entity Beans or Hibernate 3.2