• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to map cmp bean to data source: jboss3

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the JBoss forum...
Simon
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 314
2
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
errr...make the book about 80 pages (not 8)!
reply
    Bookmark Topic Watch Topic
  • New Topic