|
|
||
Dru Devore's BlogDatabases ArchivesDatabases with JBossPosted by ddevore on April 20, 2006 at 07:48 AM | Permalink | Comments (1)This is not a difficult topic but one which I needed to include to have a more complete JBoss enterprise setup. Needed InformationJNDI NameConnection URL Server Name Port Database Name Driver Class User Name Password The ???-ds.xml fileJBoss provides all kinds of ???-ds.xml files ready to be customized in the JBOSS_INSTALL/docs/examples/jca directory. There is one for just about every database you would ever need. For the most part they use the information mentioned above with some of them needing a little more. JBoss did a good job with giving descriptive names where the XML does not explicitly state what it is looking for. They all have the standard start of the Connection URL also such as jdbc:oracle:thin:@ for Oracle and jdbc:mysql:// for MySQL as well as the default port. So if you don't change the default port on the database all you need to do is change the Server Name, Database Name, Driver Class, User Name, and Password and in most cases the Driver Class will not need to be changed either. Once this information is correct put the ???-ds.xml file in the deploy directory for the server you need the Database connection on.The LibraryYou will need to add the jar for the Database you are using in the lib directory for the server you need the Database connection on. This is in theJBOSSS_INSTALL/server/SERVER_INSTANCE/lib directory. Happy ConnectionsYou should now have a connection to the Database you need. | ||
|
|