× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Marc,

I used to use the AS400JDBCConnectionPool before they implemented the
JNDI interface. When it changed I spent some time reworking all of our
code (because we now had to register the resource including standalone
jobs) and realized that in one simple class I could accomplish more
without the complexity. The biggest problem I was running into was
different configurations and classes for different containers and native
or not. Here is a link to something that worked better for me:
http://cvs.sourceforge.net/viewcvs.py/iseries-toolkit/span/src/org/iseriestoolkit/database/.

David Morris

>>> spam1@xxxxxxxxxxxx 8/24/2004 5:36:42 PM >>>
Hi,

i am wondering if anyone allready used AS400ConnectionPool (NOT mix
that 
with AS400JDBCConnectionPool) in conjunction with a Tomcat JNDI 
Resource. I want to lookup an AS400 object with JNDI pretty much the 
same way, people use JDNI for JDBC Connections like this:

Context envCtx = (Context) initCtx.lookup("java:comp/env");
AS400 as400 = (AS400) envCtx.lookup("bean/as400connection");

When looking up the connection, the resource factory (which i have to 
write for the JNDI provider - something like the AS400JDBCObjectFactory

from JTOpen)return an AS400 connection, the connection should come from

the connectionPool of course. This pool can be configured in the 
server.xml of tomcat or any other J2EE container.

This could look like this:

<ResourceParams name="bean/as400connection">
  <parameter>
    <name>factory</name>
      <value>com.logentis.jtopen.AS400ObjectFactory</value>
    </parameter>
    <parameter><name>maxActive</name><value>10</value></parameter>
    <parameter><name>prestart</name><value>5</value></parameter>
    <paramter><name>system</name><value>myiSeries</value></parameter>
    [..]
  </ResourceParams>

The factory would work in a way that on first lookup, the Pool will be

created based on the supplied parms and gets back the first connection.

All subsequent lookups are just delegates to the pool instance that is

inside the factory.

Indeed this is such an obvious generic problem / approach, that perhaps

i missed some piece from IBM or an alleady built solution for this. If

anyone is aware of something like that, please gimme a sign.

Otherwise i would implment that stuff the way like described. Perhaps 
its even useful to be implemented directly into JTopen, but to me the 
openess of JT-Open is more a marketing effect. There is no serious 
developer list, i once tried to bring something via the oficial JTOpen

forum, needless to say that this wasnt very succesfull, but perhaps i 
should try once again.

-- 

regards
Marc Logemann
http://www.logemann.org 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.