aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Table name for Container-managed Entity Bean 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 "Table name for Container-managed Entity Bean" Watch "Table name for Container-managed Entity Bean" New topic
Author

Table name for Container-managed Entity Bean

Victor Htet
Ranch Hand

Joined: Apr 09, 2000
Posts: 70
I'm a beginner for EJB. I'm reading Container-managed Entity Bean documents but I just found out that the deployment descriptor just list the mapping of Container-Managed Fields to DB fields but there is no description for the database table name. How would I specify the db table name in deployment descriptor?
Thanks you all.


SCJP,SCWCD,SCEA,SCDJWS
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I don't know which Version/Vendor you are using but you associate the Table first and then Columns. I am quoting the example from WebLogic Docs:
(jdbc
tableName ejbAccounts
dbIsShared false
poolName demoPool
(attributeMap
; EJBean field Database column name
; -----------------------------------------
accountId id
balance bal
type type
); end attributeMap
Victor Htet
Ranch Hand

Joined: Apr 09, 2000
Posts: 70
I'm using BEA's WebLogic. Your information is very helpful for me. Thanks.

Originally posted by skill123:
I don't know which Version/Vendor you are using but you associate the Table first and then Columns. I am quoting the example from WebLogic Docs:
(jdbc
tableName ejbAccounts
dbIsShared false
poolName demoPool
(attributeMap
; EJBean field Database column name
;

shahul hameed
Greenhorn

Joined: Dec 12, 2000
Posts: 12
Can you elicit what to do with Jboss for the same issue !

Originally posted by skill123:
I don't know which Version/Vendor you are using but you associate the Table first and then Columns. I am quoting the example from WebLogic Docs:
(jdbc
tableName ejbAccounts
dbIsShared false
poolName demoPool
(attributeMap
; EJBean field Database column name
;

Madhu Juneja
Ranch Hand

Joined: Mar 10, 2001
Posts: 176
You can make use of the wizard for deploying the beans. In that case you need not create a deployment descriptor xml file yourself and also it is easier with a wizard. Weblogic has a very user friendly wizard next to J2ee Server.

shahul hameed
Greenhorn

Joined: Dec 12, 2000
Posts: 12

Madhu, Thanks.
You mean that I should the Wizard/tool in WebLogic to create the descriptors for the Entity Beans to deploy it in Jboss.
Also it implies that the table name goes in the descriptor.
Did I understand you correctly ?
Thanks for your help.

Madhu Juneja
Ranch Hand

Joined: Mar 10, 2001
Posts: 176
As mentioned in the earlier posts here, I was under the impression that you were using weblogic.
But using weblogic to create the xml file and then using this file in Jboss should also work. May be you need to compare both.
You were right table name does appear in the xml descriptor file.
Example :
<table-name>CLASS6</table-name>
Madhu Juneja
Ranch Hand

Joined: Mar 10, 2001
Posts: 176
The tags are \<\table-name\>\CLASS6\<\/table-name\>\
The xml tags are disappearing. If you clink on the reply icon of earlier mail, the tags are displayed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Table name for Container-managed Entity Bean