aspose file tools*
The moose likes JBoss/WildFly and the fly likes how to map cmp bean to data source: jboss3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "how to map cmp bean to data source: jboss3" Watch "how to map cmp bean to data source: jboss3" New topic
Author

how to map cmp bean to data source: jboss3

sachin sisodia
Greenhorn

Joined: Feb 09, 2003
Posts: 5
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

Joined: May 10, 2000
Posts: 1913
    
    6
Moving to the JBoss forum...
Simon
Kay Casavant
Greenhorn

Joined: Feb 20, 2003
Posts: 10
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


Kay Casavant
Darryl A. J. Staflund
Ranch Hand

Joined: Oct 06, 2002
Posts: 303
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

Joined: Oct 06, 2002
Posts: 303
errr...make the book about 80 pages (not 8)!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to map cmp bean to data source: jboss3
 
Similar Threads
cmp EJB problem with JBoss3.x
how to write a weblogic webservice client that run in jboss3.x box
SiteMesh1.5 prolems on JBoss3 (Jetty plugin)
Problem in running a CMP URGENT
Possible to clear or disable JBoss3/EJB2 cache?