Thread: Datasource
View Single Post
  #2 (permalink)  
Old 04-02-2007, 10:01 AM
ferosh ferosh is offline
Member
 
Join Date: Mar 2007
Posts: 13
ferosh is on a distinguished road
U have to add an xml file in jboss\server\default\deploy...

Then u have to make a servlet context from jsp or from servlet..
The format is given below

<?xml version="1.0" encoding="UTF-8"?>

<datasources>
<local-tx-datasource>
<jndi-name>mysqlDs</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/mytest</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>put your username hre </user-name>
<password>put your password hre</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>50</max-pool-size>
<idle-timeout-minutes>30</idle-timeout-minutes> <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysq lExceptionSorter</exception-sorter-class-name> <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidCo nnectionChecker</valid-connection-checker-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
Reply With Quote