Hi,
Here is the Datasource definition we are using to connect to a MS-SQLServer 2000 from
a Linux Jboss server:
(replace jndi name and properties values with your own...)
<local-tx-datasource>
<jndi-name>jdbc/DSNAME</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://DBSERVER:xxxx;ServerName=DBSERVER;PortNumber=xxxx;DatabaseName=DBNAME;User=DBUSER;Password=DBUSERPWD;SelectMethod=cursor</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>DBUSER</user-name>
DBUSERPWD
<prepared-statement-cache-size>50</prepared-statement-cache-size>
<min-pool-size>5</min-pool-size>
<max-pool-size>50</max-pool-size>
<idle-timeout-minutes>15</idle-timeout-minutes>
<track-statements>false</track-statements>
</local-tx-datasource>
Here is also a piece of code:
Context context = new InitialContext();
Object ref_ms = context.lookup("java:/jdbc/DSNAME");
DataSource ds_ms =
(DataSource) PortableRemoteObject.narrow(ref_ms,
DataSource.class);
connection_ms = ds_ms.getConnection();
...
prepStmt = connection_ms.prepareStatement(DbRequest);
rs = prepStmt.executeQuery();
...
rs.close();
prepStmt.close();
connection_ms.close();
...
hope this will help you ;-)
Br,
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845745#3845745
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845745
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user