aspose file tools*
The moose likes Object Relational Mapping and the fly likes IBatis JNDI Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "IBatis JNDI Issue" Watch "IBatis JNDI Issue" New topic
Author

IBatis JNDI Issue

Monte Dearth
Greenhorn

Joined: Mar 16, 2006
Posts: 2
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

Joined: Mar 16, 2006
Posts: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IBatis JNDI Issue