File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB creates new table in database......... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB creates new table in database........." Watch "EJB creates new table in database........." New topic
Author

EJB creates new table in database.........

Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi ,

I am developing small EJB CMP 2.0 application.
I have one table named "employeemaster" in my database & for dat table i ve created EJB named "EmpMasterBean" successfully. Now when i m deploying n running EJB, It creates a table named "EmpMasterBean" in my database, which is my bean's name. But I don't want hare to create new table, instead i want to insert data into already existing table "employeemaster" for which i ve created above bean.

How to do this???

Please help me.

Thanx in advance...


********Deserve Before You Desire********
Shrinivas Mujumdar
Ranch Hand

Joined: Aug 27, 2004
Posts: 328
Which AppServer you are using?
In CMP there will be one more Deploymwnt Descriptor e.g If its weblogic then, name of Deployment Descriptor is weblogic-cmp-rdbms-jar.xml,which specifies Table name & mapping info of cmp fields & db columns etc.
Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi,
Thanx for trying on this.
I got my mistake. I m using JBOSS4.0.3 & I was missing <table-name> tag in my jbosscmp-jdbc.xml file. Now it working fine.
Thanx again for trying.

Prash
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB creates new table in database.........