That's a good suggestion. Unfortunately this was designed to support
multiple database schemas and therefore multiple pools all from an xml
registry of queries.

But your suggestion triggered an idea which seems to work. Since the
application scoped class is an application bean, only one instance of it
is allocated by the webapp. I simply saved the "this" from the
constructor and added a static getInstance to return it.

> -----Original Message-----
> From: donald larmee [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 12, 2003 12:57 PM
> To: Log4J Users List
> Subject: Re: Access to myJDBCAppender Class
> 
> 
> Not sure I have entirely understood your issue correctly.  By 
> 'application 
> scoped class' do you mean one that is created/loaded by the 
> classloader 
> associated only with the webapp itself (i.e., the class 
> resides in your 
> WEB-INF/classes or WEB-INF/lib, not in Tomcats CLASSPATH)?  
> Is the class in 
> this case the ConnectionPool (wrapper) itself?
> 
> Have you tried making your connection pool a singleton 
> obtained by anyone 
> that wants it thru a static MyConnectionPool.getInstance()?
> 
> -don
> 
> At 08:34 AM 3/12/2003 -0600, Steve McRoberts wrote:
> 
> >We use Tomcat with an application scoped class utilizing an Oracle 
> >connection pool. In "myJDBCAppender" class I override 
> >JDBCAppender.execute so I can construct/dispose of my own connection 
> >(ultimately thru the pool class mentioned above). My problem 
> is I need 
> >to get a reference to the application class when the myJDBCAppender 
> >class is constructed and I can't seem to determine how to do this. I 
> >tried binding the class in the application JNDI context but Tomcat 
> >creates this as read-only. Looking for any suggestions. //steve
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
>    donald h. larmee                               
> [EMAIL PROTECTED]
>                                                               
>             804.301.UTOP
>                           utopian software concepts, inc.
>                                   www.utopiansoft.com
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to