MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » April 2014

Re: JDBC connections and library lists



fixed

And by reused, I mean the connection is ended by the "app" and the i reuses
the job for a new incoming connection.

The problem occurs when connection pooling on the app or app server comes
into play. When the connection pool reuses an existing connection, from
the IBM i perspective the connection has not been "reused" as it's been
continually open.

I suspect the issue with library lists manifests when multiple applications
are using the same connection pool to an individual host. Bad idea,
instead an application specific connection pool should be used. Besides
the library list, you'd then be able to have application specific users for
the connections.

Charles



On Wed, Apr 2, 2014 at 12:52 PM, Charles Wilt <charles.wilt@xxxxxxxxx>wrote:

Dan,

I just ran a test..

The library list is indeed reset when the QZDASOINIT job is reused.

Charles


On Wed, Apr 2, 2014 at 11:01 AM, <dkimmel@xxxxxxxxxxxx> wrote:

I think you'll find that the initial library list for QZDASOINIT is
defined by
the job description used in the prestart job entry in the QUSRWORK
subsystem
definition. This may or may not be the job description associated with
QUSER
user profile.

When a JDBC user connects to a prestart job, the user profile of the job
is
changed, but the library list is not necessarily changed.

As you have noted, once the library list of the job is changed, it remains
changed through reuses of the job by other users.

A library list is a unique IBMi dimension of JDBC. As such, it is
important to
set the library list explicitly any time you are going to rely on its
behavior.
Make that part of your standard.

Quoting Chris Bipes <chris.bipes@xxxxxxxxxxxxxxx>:

I ran into an interesting problem regarding library lists and JDBC.

I had a Linux Tomcat programmer define his connection to our iSeries
at V6R1 using the libraries parameter. This changed the user library
list of the QZDASOINIT job. Future connections to this job held the
library list specified in the previous job and did not pick up the
user library list form the job description assigned to the user
profile that logged in.

I have determined that if you do not use the libraries parameter the
user library list is set according to the job description of the user
profile connecting.

This was a frustrating lesson learned when all sorts of jobs either
wrote to development or could not find programs called by triggers.

My question is this: How do you keep something like this from
happening? 1. Do you always specify the library list you need for
your connection or do you always use the job description to control
the library?

I want to define a standard and move in that direction to avoid
library list issues in the future.

Has anyone published a standard they would like to share?


Chris Bipes
Director of Information Services
CrossCheck, Inc.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.








Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact