jQuery in Action, 3rd edition
The moose likes JBoss/WildFly and the fly likes Database connectivity - Jboss server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Database connectivity - Jboss server" Watch "Database connectivity - Jboss server" New topic

Database connectivity - Jboss server

Ajitha Rao

Joined: Aug 26, 2003
Posts: 4
Hi all,
I am using jboss2.4.3_tomcat3.2.3 and database Mysql.I have a bean thro which I make connection to Database- which is right now not happening.I have put the path in jboss.jcml.Do I need to do anything else??Help needed urgently.
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
Hi Ajitha -
Do I need to do anything else
What have you actually done? adding a file to a classpath is not enough.. How have you done your connection? which xml files have you configured? etc.. we need a bit more info..
When I used jboss 3.0 i had to modify jboss-service.xml... don't know how it is in 2.4

I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
Ajitha Rao

Joined: Aug 26, 2003
Posts: 4
Thanks for replying,I have just edited the jboss.jcml file.This is what I have added
<mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
<attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>
<mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQLDB">
<attribute name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attribute>
<attribute name="PoolName">DsMD</attribute>
<attribute name="URL">jdbc:mysql://localhost/databasename</attribute>
<attribute name="JDBCUser">aa</attribute>
<attribute name="Password">aa1</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="MaxSize">10</attribute>
<attribute name="GCEnabled">true</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">true</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">true</attribute>
<attribute name="LoggingEnabled">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
That is all I have done.Another problem is when I run the jsp it says Attribute import has no value.PLease help.Do I need to modify any other file in jboss to indicate I am using beans??
Help req urgently.
I agree. Here's the link: http://aspose.com/file-tools
subject: Database connectivity - Jboss server
jQuery in Action, 3rd edition