You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sven morales <ak...@yahoo.com> on 2005/03/14 08:56:02 UTC

DataSource using Commons libraries 5.5.7

Hi,
  Tomcat 5.5.x and newer have repackaged the commons
libraries into naming-xxx.jar files and it is probably
causing lots of headache to people doing a conversion
from older distro.   A couple of items I have come
across are, the commons has been package into a path
like so:

org.apache.tomcat.dbcp.dbcp.xxxx
org.apache.tomcat.dbcp.collection.xxxx
org.apache.tomcat.dbcp.pool.xxxx
org.apache.tomcat.dbcp.jocl.xxxx

Note: the double dbcp.dbcp for DataSource and commons
name is not on the path.

Also subtle change of <Resource> elements and
attributes and no more <ResourceParams>.  I guess
there are no DTD that is used for Context.xml to catch
mal-formations.

aka_sergio




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: DataSource using Commons libraries 5.5.7

Posted by QM <qm...@brandxdev.net>.
On Mon, Mar 14, 2005 at 08:55:35AM -0800, sven morales wrote:
:    I am not exactly sure what you meant by "you don't
: have to do that" ?  For example, how would a class
: differentiate between
: org.apache.commons.dbcp.BasicDataSourceFactory and
: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
: without doing anything?

That's the idea -- it won't have to. =)

Tomcat repackaged the classes to essentially give itself private copies.
In turn, if your code was using those classes, simply include the proper
JAR files in WEB-INF/lib and you're done.  Developer code shouldn't rely
on the Tomcat-specific classes.



: My usage of it was
: container manage and requires reformatting <Resource>
: therefore I don't have the need for recompilations. 

Now I see what you mean.  I originally thought your code was
directly calling the (now-repackaged) classes.

-QM



-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: DataSource using Commons libraries 5.5.7

Posted by sven morales <ak...@yahoo.com>.
Hi,
   I am not exactly sure what you meant by "you don't
have to do that" ?  For example, how would a class
differentiate between
org.apache.commons.dbcp.BasicDataSourceFactory and
org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory
without doing anything? Off course the import
declarations have to be changed and classes recompiled
for classes using them directly.   My usage of it was
container manage and requires reformatting <Resource>
therefore I don't have the need for recompilations. 
Perhaps a new DTD will help clarify what should be in
the context.xml file.  
   My comments were more of "heads-up" to people doing
a conversion to the newer 5.5.7 and newer.

aka_sergio

--- QM <qm...@brandxdev.net> wrote:

> On Sun, Mar 13, 2005 at 11:56:02PM -0800, sven
> morales wrote:
> :   Tomcat 5.5.x and newer have repackaged the
> commons
> : libraries into naming-xxx.jar files and it is
> probably
> : causing lots of headache to people doing a
> conversion
> : from older distro.
> 
> I don't see the problem.
> 
> Chances are, this was done such that Tomcat could
> use one version of the
> libraries while webapps run within Tomcat can use
> other versions.  In
> other words, package renaming (when done properly)
> is one way to address
> version skew in a shared environment.
> 
> Are you renaming your package imports to reflect the
> Tomcat-renamed
> packages?  You shouldn't have to do that.
> 
> -QM
> 
> -- 
> 
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.com
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: DataSource using Commons libraries 5.5.7

Posted by QM <qm...@brandxdev.net>.
On Sun, Mar 13, 2005 at 11:56:02PM -0800, sven morales wrote:
:   Tomcat 5.5.x and newer have repackaged the commons
: libraries into naming-xxx.jar files and it is probably
: causing lots of headache to people doing a conversion
: from older distro.

I don't see the problem.

Chances are, this was done such that Tomcat could use one version of the
libraries while webapps run within Tomcat can use other versions.  In
other words, package renaming (when done properly) is one way to address
version skew in a shared environment.

Are you renaming your package imports to reflect the Tomcat-renamed
packages?  You shouldn't have to do that.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org