Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Binding problem to a remote SQL2000 Server

 
Vinod Kumar D
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
 
norman richards
Author
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try "java:/MSSQLDS" as the JNDI name
 
Vinod Kumar D
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic