ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Engel, Gregory A" <GAEn...@Tribune.com>
Subject RE: Configuring Data source in Orion
Date Thu, 23 Feb 2006 13:34:20 GMT
Thanks Jeff
 
I'll look at the orion specifics. It may be easiest to just include an ejb
in my
ear. The app doesn't use any but I have another app running on the same app
server that does and I have not had the same problems. 
 
Thanks for the input.

-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler@gmail.com]
Sent: Wednesday, February 22, 2006 4:40 PM
To: user-java@ibatis.apache.org
Subject: Re: Configuring Data source in Orion


My first guess is that you need to configure a resource reference.  This
will be in ejb-jar.xml if you are using EJBs, web.xml if you are not using
EJBs.
 
In either event, there is likely an Orion specific configuration file
somewhere that maps the resource reference name to the actual JNDI name.
 
So:
 
1. Configure a resource reference (call it "jdbc/localconn" for example)
2. Use "java:comp/env/jdbc/localconn" as the name in iBATIS
3. Use Orion specific tools to map "jdbc/dbconn" to "jdbc/9i/webservices"
 
I don't use Orion, so I can't tell you how to how the Orion specific stuff
works.
 
You might also try to have iBATIS use the "jdbc/9i/webservices" name
directly (without the "java:comp/env" prefix).  I would consider this a bad
practice, but it might work.
 
Jeff Butler

 
On 2/22/06, Engel, Gregory A < GAEngel@tribune.com
<mailto:GAEngel@tribune.com> > wrote: 

Hi all

I'm using Orion app server. My Datasource is configured as follows...

<data-source 
name="oraclePooled"
location="jdbc/9i/webservices"
ejb-location="jdbc/9i/webservicesEJB"
xa-location="jdbc/9i/webservicesXA"
class="oracle.jdbc.pool.OracleConnectionCacheImpl "
max-connections="25"
min-connections="1"
inactivity-timeout="6000"
wait-timeout="5"
username="username"
password="password"
url=" jdbc:oracle:thin:@server.my.place:1526:database"
schema="database-schemas/oracle.xml" >
<property name="explicitCachingEnabled" value="true"/>
<property name="implicitCachingEnabled" value="true"/> 
<property name="maxLimit" value="25"/>
<property name="minLimit" value="1"/>
<!-- value of 1 for OracleConnectionCacheImpl.DYNAMIC_SCHEME -->
<property name="cacheScheme" value="1"/> 
</data-source>

In my SqlMapConfig I have

<transactionManager type="JDBC" >
<dataSource type="JNDI">
<property name="DataSource" value="java:comp/env/jdbc/9i/webservices"/> 
</dataSource>
</transactionManager>

When I create my sql maps client I get...

Caused by:
javax.naming.NameNotFoundException: jdbc/9i/webservices not found in
CustomerApp
/TMS Customer App, there are no bound values 
       at com.evermind._ik.lookup(Unknown Source)
       at com.evermind._au._rv(Unknown Source)
       at com.evermind._au.lookup(Unknown Source)
       at javax.naming.InitialContext.lookup(InitialContext.java :347)
       at
com.ibatis.sqlmap.engine.datasource.JndiDataSourceFactory.initialize(
JndiDataSourceFactory.java:48)
       at
com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$10.process(Sq
lMapConfigParser.java :306)
       at
com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java
:112)
       at
com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:96)
       at
com.ibatis.common.xml.NodeletParser.process (NodeletParser.java:93)
       at
com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:93)
       at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:63)
       at com.ibatis.common.xml.NodeletParser.parse (NodeletParser.java:51)


Anybody worked with orion before that knows how to config this stuff?

Thanks
Greg




Mime
View raw message