You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Philippe Mouawad <ph...@gmail.com> on 2011/05/24 16:09:47 UTC

Question about DBCP code usage

Hello,
I have a question regarding code usage of DBCP.

For another pool implementation that is an Apache project, I would like to
submit a patch related to LocalXA implementation.
This patch will use (by changing their package location) the following
classes from DBCP:

   - TransactionRegistry
   - LocalXAResource
   - TransactionContext
   - TransactionContextListener

And have a class partly inspired by ManagedConnection.


My question is:

   - Can I do this if I keep the author name and Apache mention ? if no what
   must I do ?


Thank you
Regards
Philippe

Re: Question about DBCP code usage

Posted by Niall Pemberton <ni...@gmail.com>.
On Tue, May 24, 2011 at 3:18 PM, Mark Thomas <ma...@apache.org> wrote:
> On 24/05/2011 15:09, Philippe Mouawad wrote:
>> Hello,
>> I have a question regarding code usage of DBCP.
>>
>> For another pool implementation that is an Apache project,
> Out of interest, which one?
>
>> I would like to
>> submit a patch related to LocalXA implementation.
>> This patch will use (by changing their package location) the following
>> classes from DBCP:
>>
>>    - TransactionRegistry
>>    - LocalXAResource
>>    - TransactionContext
>>    - TransactionContextListener
>>
>> And have a class partly inspired by ManagedConnection.
>>
>>
>> My question is:
>>
>>    - Can I do this if I keep the author name and Apache mention ? if no what
>>    must I do ?
>
> If you are re-using code from one Apache project in another then that is
> fine. You can just copy the classes and modify as you require. It is
> always a good idea to reference where the classes come from somewhere
> but it is not required.

Even better if you do an svn:copy - that way the source and history
gets retained.

Niall

> Tomcat for example includes code copied from DBCP, Digester and
> FileUpload to name but a few.
>
> Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Question about DBCP code usage

Posted by Phil Steitz <ph...@gmail.com>.
Mark is right there is no problem sharing code across projects.  We just brought in a class from Harmony to DBCP itself.  I would encourage you guys to consider using DBCP directly though, partly so it will be easier to share patches to the XA code you are mentioning.  In particular, the patches you have already submitted should make their way into DBCP next releases. Thanks for these and thanks in advance for any more you are willing to make.

One nit on @author tags - they are discouraged and should probably be removed.

Phil



On May 24, 2011, at 7:25 AM, Philippe Mouawad <ph...@gmail.com> wrote:

> Hello,
> Thanks for the quick response.
> 
> In fact I would like to contribute the code to Tomcat JDBC Pool and it first
> that is Ofbiz project, because Ofbiz uses largely this Local XA feature.
> But of course I will be asking them if they are interested and maybe nobody
> will be :-)
> 
> Regards
> Philippe
> 
> On Tue, May 24, 2011 at 4:18 PM, Mark Thomas <ma...@apache.org> wrote:
> 
>> On 24/05/2011 15:09, Philippe Mouawad wrote:
>>> Hello,
>>> I have a question regarding code usage of DBCP.
>>> 
>>> For another pool implementation that is an Apache project,
>> Out of interest, which one?
>> 
>>> I would like to
>>> submit a patch related to LocalXA implementation.
>>> This patch will use (by changing their package location) the following
>>> classes from DBCP:
>>> 
>>>   - TransactionRegistry
>>>   - LocalXAResource
>>>   - TransactionContext
>>>   - TransactionContextListener
>>> 
>>> And have a class partly inspired by ManagedConnection.
>>> 
>>> 
>>> My question is:
>>> 
>>>   - Can I do this if I keep the author name and Apache mention ? if no
>> what
>>>   must I do ?
>> 
>> If you are re-using code from one Apache project in another then that is
>> fine. You can just copy the classes and modify as you require. It is
>> always a good idea to reference where the classes come from somewhere
>> but it is not required.
>> 
>> Tomcat for example includes code copied from DBCP, Digester and
>> FileUpload to name but a few.
>> 
>> Mark
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>> 
>> 
> 
> 
> -- 
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Question about DBCP code usage

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
Thanks for the quick response.

In fact I would like to contribute the code to Tomcat JDBC Pool and it first
that is Ofbiz project, because Ofbiz uses largely this Local XA feature.
But of course I will be asking them if they are interested and maybe nobody
will be :-)

Regards
Philippe

On Tue, May 24, 2011 at 4:18 PM, Mark Thomas <ma...@apache.org> wrote:

> On 24/05/2011 15:09, Philippe Mouawad wrote:
> > Hello,
> > I have a question regarding code usage of DBCP.
> >
> > For another pool implementation that is an Apache project,
> Out of interest, which one?
>
> > I would like to
> > submit a patch related to LocalXA implementation.
> > This patch will use (by changing their package location) the following
> > classes from DBCP:
> >
> >    - TransactionRegistry
> >    - LocalXAResource
> >    - TransactionContext
> >    - TransactionContextListener
> >
> > And have a class partly inspired by ManagedConnection.
> >
> >
> > My question is:
> >
> >    - Can I do this if I keep the author name and Apache mention ? if no
> what
> >    must I do ?
>
> If you are re-using code from one Apache project in another then that is
> fine. You can just copy the classes and modify as you require. It is
> always a good idea to reference where the classes come from somewhere
> but it is not required.
>
> Tomcat for example includes code copied from DBCP, Digester and
> FileUpload to name but a few.
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Cordialement.
Philippe Mouawad.
Ubik-Ingénierie

Re: Question about DBCP code usage

Posted by Mark Thomas <ma...@apache.org>.
On 24/05/2011 15:09, Philippe Mouawad wrote:
> Hello,
> I have a question regarding code usage of DBCP.
> 
> For another pool implementation that is an Apache project,
Out of interest, which one?

> I would like to
> submit a patch related to LocalXA implementation.
> This patch will use (by changing their package location) the following
> classes from DBCP:
> 
>    - TransactionRegistry
>    - LocalXAResource
>    - TransactionContext
>    - TransactionContextListener
> 
> And have a class partly inspired by ManagedConnection.
> 
> 
> My question is:
> 
>    - Can I do this if I keep the author name and Apache mention ? if no what
>    must I do ?

If you are re-using code from one Apache project in another then that is
fine. You can just copy the classes and modify as you require. It is
always a good idea to reference where the classes come from somewhere
but it is not required.

Tomcat for example includes code copied from DBCP, Digester and
FileUpload to name but a few.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org