-
1. Re: How to create jbosscmp-jdbc.xml?
pensejer Nov 29, 2001 10:45 AM (in response to stica76)Hi,
i have a very small example doing some member to column
and relation mappings.
I hope this will help.
Bye Joerg
<?xml version="1.0" encoding="ISO-8859-1"?>
<jbosscmp-jdbc>
<enterprise-beans>
<entity>
<ejb-name>Bean1</ejb-name>
<table-name>Table1</table-name>
</entity>
<entity>
<ejb-name>Bean2</ejb-name>
<table-name>Table2</table-name>
</entity>
<entity>
<ejb-name>SurrogateBean</ejb-name>
<table-name>Surrogate</table-name>
<cmp-field>
<field-name>id</field-name>
<column-name>Id</column-name>
</cmp-field>
<cmp-field>
<field-name>current</field-name>
<column-name>Num</column-name>
</cmp-field>
<cmp-field>
<field-name>dummy</field-name>
<column-name>Char200</column-name>
</cmp-field>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>DocInfo_DocSysInfo</ejb-relation-name>
<foreign-key-mapping>
<ejb-relationship-role>
<ejb-relationship-role-name>Bean1</ejb-relationship-role-name>
<foreign-key-fields />
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>Bean2</ejb-relationship-role-name>
<foreign-key-fields>
<foreign-key-field>
<field-name>id</field-name>
</foreign-key-field>
</foreign-key-fields>
</ejb-relationship-role>
</foreign-key-mapping>
</ejb-relation>
</relationships>
</jbosscmp-jdbc> -
-
3. Re: How to create jbosscmp-jdbc.xml?
stica76 Nov 30, 2001 8:40 AM (in response to stica76)thanks..but I try to make an example and the server doesn't deploy mu EJB!!
How many deployment descriptor must I create???
Please can u send me a complete very simple example, only 1 bean for example, with the source code!! thanks
dani -
4. Re: How to create jbosscmp-jdbc.xml?
davidjencks Dec 1, 2001 12:24 PM (in response to stica76)I think you don't need one for simple examples. You might check the dtd: you probably have to get it from cvs under jboss/src/resources/org/jboss/metadata (if I remember correctly).
-
5. Re: How to create jbosscmp-jdbc.xml?
dsundstrom Dec 3, 2001 1:23 PM (in response to stica76)There is an example included in the JBossCMP workbook.
The dtd that David mentioned applies to the current cvs source, and will not always work with the alpha. The dtd was written a couple of weeks after the alpha was released.
-dain