Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to map cmp bean to data source: jboss3

 
sachin sisodia
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JBoss forum...
Simon
 
Kay Casavant
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Darryl A. J. Staflund
Ranch Hand
Posts: 314
2
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 314
2
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
errr...make the book about 80 pages (not 8)!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic