hi guys i m new for the ejb stuff and i m trying to create the cmp bean. bt i m little confuse how i will map the bean to the data source . suppose my data base is in access. then what i have to do next to map the bean to this access data base i m using jboss3 step by step procedure will be much apperciated thanks in advance sachin jboss3jboss3
I don't know about using Access. However, there are some default database service configuration files in %JBOSS_HOME%/docs/examples/jac to provide specific examples for different databases. for example, I connected to oracle so I made a copy of %JBOSS_HOME%/docs/examples/jac/oracle-service.xml, renamed and customized it for my specific app, (appName-service.xml). Basically you will customize a datasource using your own datasource-name, driver, url, user, password. Then drop it into the deploy directory ( %JBOSS_HOME%/server/<yourChoice>/deploy ) where it will hotDeploy. Then you will need to create 2 Jboss specific files (jboss.xml, jbosscmp-jdbc.xml) to correspond to each ejb-jar.xml file. In the default section of each jbosscmp-jdbc.xml there is a place to specify the datasource you created in your own <appName-service.xml>. (by default it is Hypersonic SQL which is why your tables were being created there). I suggest you search for specifics about configuring jboss.xml and jbosscmp-jdbc.xml. I was able to find this info through google,jboss,oracle,oreilly, and other sources. good luck
Hi there, You're asking a BIG question -- in effect, you want someone to explain JBoss' implementation of CMP. I'd recommend checking out the CMP forum at jboss.org in order to view code snippets and to look at the issues surrounding CMP/Access integration. I'd also recommend purchasing JBoss' CMP e-book for $10 American. It's fairly short and to the point (about 8 pages) and walks you through a CMP example. It also talks about optimization strategies, etc. that are specific to the JBoss server. Cheers, Darryl
Darryl A. J. Staflund
Joined: Oct 06, 2002
errr...make the book about 80 pages (not 8)!
subject: how to map cmp bean to data source: jboss3