• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Binding problem to a remote SQL2000 Server

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im a newbie and Ive a problem when i try to connect to a SQL2000 server from my bean in jboss. I get the error that the datasource is not bound.
My jbosscmp-jdbc.xml is as follows :
<jbosscmp-jdbc>
<defaults>
<datasource>MSSQLDS</datasource>
<datasource-mapping>MS SQLSERVER2000</datasource-mapping>
<preferred-relation-mapping>foreign-key</preferred-relation-mapping>
</defaults>
<enterprise-beans>
<entity>
<ejb-name>Plant</ejb-name>
<table-name>PLANT</table-name>
<cmp-field>
<field-name>PLANTID</field-name>
<column-name>PLANTID</column-name>
</cmp-field>
.
.
.
.
.
</entity>
</enterprise-beans>
</jbosscmp-jdbc>
Am I missing something here. Im not sure if the tag value is fully qualified MSSQLDS.
In the jboss-3.2.3\server\default\deploy\mssql-ds.xml I have,
<jndi-name>MSSQLDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://servername:1433;DatabaseName=somedb</connection-url>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
Isnt that definition complete?
What more do I need to do ?
Any help would be greatly appreciated !
Thanx.
-Vinod
 
Author
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try "java:/MSSQLDS" as the JNDI name
 
Vinod Kumar D
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Norman !
Now things work. Was it because the jndi was not able to resolve 'java' as the default namespace?
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic