Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IBatis JNDI Issue

 
Monte Dearth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently in the process of upgrading an application to use IBATIS SQL Maps that was currently using straight JDBC and I am having some trouble with a JNDI connection...

I am trying to replicate the following code using the SQL Map but I cannot get it to work...

Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("jdbc/DWINETSQL");
dbConn = ds.getConnection();

I have tried things like:
<transactionManager type="JDBC">
<dataSource type="JNDI">
<property name="DBInitialContext" value="java:comp/env"/>
<property name="DBLookup" value="jdbc/DWINETSQL"/>
</dataSource>
</transactionManager>

and

<transactionManager type="JDBC">
<dataSource type="JNDI">
<property name="DBJndiContext" value="jdbc/DWINETSQL"/>
</dataSource>
</transactionManager>

and

<transactionManager type="JDBC">
<dataSource type="JNDI">
<property name="DataSource" value="jdbc/DWINETSQL"/>
</dataSource>
</transactionManager>

and many others...

Could someone help point me in the right direction? Thanks.
 
Monte Dearth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, we figured out what the problem was: The port number they had SQL Server listening on had changed... Once that was updated, all is working fine...

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic