Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database connectivity - Jboss server

 
Ajitha Rao
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Thanks,
Ajitha
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ajitha Rao
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
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>
<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>
</mbean>
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.
Thanks,
Ajitha
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic