× 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.



Sorry, I should have guessed that the datasource implementation returned
a wrapper implementation, AS400JDBCConnectionHandle.  Unfortunately,
AS400JDBCConnectionHandle does not expose all of the public methods on
Its wrapped Connection implementation.  As far as I can see, there
aren't any public methods that would allow you to get at the underlying
AS400 object and therfore the host server job.  

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Ashish Kulkarni
Sent: Tuesday, March 25, 2003 3:45 PM
To: Java Programming on and around the iSeries / AS400
Subject: Re: How to get Job Number of a JDBC connection


Hi,

Here is my problem, 
when i use data source and AS400JDBCConnectionPool i
get 
com.ibm.as400.access.AS400JDBCConnectionHandle
when i use method getConnection()
but the documentation says it returns a connection,
any clue on it
I am pasting the code i am testing

        AS400JDBCConnectionPoolDataSource dataSource = new
AS400JDBCConnectionPoolDataSource("myas400", "user", "password");
    dataSource.setDateFormat("iso");
    dataSource.setPrompt(false);
        dataSource.setTimeFormat("hms");
        dataSource.setNaming("system");
    dataSource.setTranslateBinary (true);
      
    AS400JDBCConnectionPool pool = new
AS400JDBCConnectionPool(dataSource);
    pool.fill(1);

        Connection conn = pool.getConnection(); 
        System.out.println (conn.getClass().getName());


 
--- David Gibbs <david@xxxxxxxxxxxx> wrote:
> "Ashish Kulkarni" <kulkarni_ash1312@xxxxxxxxx>
> wrote in message
>
news:20030325192157.3189.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx
> > How do i cast it??
> > AS400JDBCConnection conn1 =
> (AS400JDBCConnection)conn;
> > gives ClassCastException , is there a way or code
> u
> > know how to do it
> 
> Theoretically, that should work ... the javadoc's
> for the
> AS400JDBCConnection object gives the following
> example ...
> 
> String serverJobIdentifier =
>
((AS400JDBCConnection)connection).getServerJobIdentifier();
> 
> Verify that your connection object is actually an AS400JDBCConnection.
> 
> david
> 
> 
> _______________________________________________
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
> 


=====
A$HI$H

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
_______________________________________________
This is the Java Programming on and around the iSeries / AS400
(JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.