www-legal-discuss mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <hyand...@gmail.com>
Subject Re: License of example code (on website)? [Was: Including code snippet in commercial software]
Date Sat, 24 Jan 2009 03:24:08 GMT
Not a clue on public domain being possible - there's definitely stuff
being placed in the public domain (in our sphere for example there's
antlr 2 + doug lea's concurrent jar).

Once you've found the LICENSE file link on the website (this is
something we as legal pmc should probably push on - all Apache sites
are under AL 2.0 and need to say so), and decided that there's no
NOTICE (presumably it's our intent to have no NOTICE for our
websites), then we're at the point of why I would personally go with a
lighter license.

With example code that we are implying people incorporate in their
products, even a license like AL 2.0 is heavyweight. Aflyctus' method
below of linking to the site where the example was taken from is a
good one, but our license wants more. You could take the line that
example code is only there to educate and not to be used, but that's a
terrible one as if the code is copyrightable we are expecting the
person to read it, vaguely explain it to someone in some kind of legal
firewall and then let them implement it. ie) we should expect that
code will be based on c+p versions of our examples, not on the memory
of what's in there.

That's one option for us. Do we consider our example code to be
non-copyrightable (no idea if we can state that of our own code) and
therefore it's the equivalent of public domain and linking to the site
you got it from becomes a request to be polite and obey good code
hygiene.

Basically the notion that I have to obey some heavyweight license when
a project tells me to put a piece of code in my project seems very
viral :) If you're telling me to do something then my instinct is that
I don't think your license goes with it.

Anyway... all personal opinion and interested in what others think.

Hen

On Fri, Jan 23, 2009 at 10:28 AM, Geir Magnusson Jr. <geir@pobox.com> wrote:
> I didn't think it was actually possible to place something in the public
> domain w/o the author dying :)
>
> Why not just follow the license?
>
> geir
>
> On Jan 23, 2009, at 11:40 AM, Henri Yandell wrote:
>
>> A good question. Usually the answer is 'Your company's lawyer is the
>> true target for these questions'.
>>
>> or that:
>>
>> "IANAL, The answers are in the Apache license's section 4 on
>> redistribution, which I summarize as:
>>
>> a) LICENSE included.
>> b) Note when modifying files.
>> c) Maintain source header.
>> d) NOTICE file included if exists (which it should). "
>>
>> In this case its an example on the website that is also included in
>> the download (I suspect there it's got AL 2.0 headers etc there but
>> haven't looked).
>>
>> -----
>>
>> Looking to the list - what are the thoughts? I personally believe in
>> examples being public domain (or at least, not requiring attribution
>> clauses equivalent to what Aflyctus below is proposing), but I'm not
>> sure if that clashes with our charter. I think our current answer
>> would be to obey section 4 of the license.
>>
>> Hen
>>
>> On Fri, Jan 23, 2009 at 8:06 AM, Aflyctus N.E.B. <aflyctus@gmail.com>
>> wrote:
>>>
>>> Hello,
>>>
>>> I would like to include some code from an OpenEJB example in my JUnit
>>> tests that use OpenEJB as an embedded Java EE 5 container.
>>>
>>> The example is located at:
>>> http://openejb.apache.org/3.0/testing-transactions-example.html
>>>
>>> The code of interest is the embedded SLSB TransactionBean:
>>>
>>>  public static interface Caller {
>>>      public <V> V call(Callable<V> callable) throws Exception;
>>>  }
>>>
>>>  /**
>>>   * This little bit of magic allows our test code to execute in
>>>   * the scope of a container controlled transaction.
>>>   *
>>>   * The src/test/resource/META-INF/ejb-jar.xml will cause this
>>>   * EJB to be automatically discovered and deployed when
>>>   * OpenEJB boots up.
>>>   */
>>>  @Stateless
>>>  @TransactionAttribute(REQUIRES_NEW)
>>>  public static class TransactionBean implements Caller {
>>>
>>>      public <V> V call(Callable<V> callable) throws Exception {
>>>          return callable.call();
>>>      }
>>>
>>>  }
>>>
>>> I would like to include the above code in a Java class that all of my
>>> other Java unit test classes are derived from.
>>> For example,
>>>
>>> MySuperClass.java contains:
>>>
>>> /*
>>> * My company's copyright notice
>>> */
>>>
>>> package mypackage;
>>>
>>> import java.util.concurrent.Callable;
>>> /*
>>> * some other imports not shown
>>> */
>>>
>>> public class MySuperClass
>>> {
>>>  /*
>>>   * The following code is from:
>>>   * http://openejb.apache.org/3.0/testing-transactions-example.html
>>>   */
>>>  public static interface Caller
>>>  {
>>>      public <V> V call(Callable<V> callable) throws Exception;
>>>  }
>>>
>>>
>>>  /*
>>>   * The following code is from:
>>>   * http://openejb.apache.org/3.0/testing-transactions-example.html
>>>   */
>>>
>>>  /**
>>>   * This little bit of magic allows our test code to execute in
>>>   * the scope of a container controlled transaction.
>>>   *
>>>   * The src/test/resource/META-INF/ejb-jar.xml will cause this
>>>   * EJB to be automatically discovered and deployed when
>>>   * OpenEJB boots up.
>>>   */
>>>  @Stateless
>>>  @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
>>>  public static class TransactionBean implements Caller
>>>  {
>>>      public <V> V call(Callable<V> callable) throws Exception
>>>      {
>>>          return callable.call();
>>>      }
>>>  }
>>> }
>>>
>>> MyTest.java contains:
>>>
>>> /*
>>> * My company's copyright notice
>>> */
>>>
>>> package mypackage;
>>>
>>> import org.junit.After;
>>> import org.junit.AfterClass;
>>> import org.junit.Before;
>>> import org.junit.BeforeClass;
>>> import org.junit.Test;
>>> import static org.junit.Assert.*;
>>>
>>> public class MyTest extends MySuperClass
>>> {
>>>  @Before
>>>  public void setUp()
>>>  {
>>>      /*
>>>       * code to setup OpenEJB container
>>>       */
>>>  }
>>>
>>>  private void doTestMyMethod throws Exception
>>>  {
>>>      /* my test code */
>>>  }
>>>
>>>  public void testMyMethod() throws Exception {
>>>      Caller transactionBean = (Caller)
>>> context.lookup("TransactionBeanLocal");
>>>
>>>      transactionBean.call(new Callable(){
>>>          public Object call() throws Exception {
>>>              doWork();
>>>              return null;
>>>          }
>>>      });
>>>  }
>>> }
>>>
>>>
>>> Three questions:
>>> 1. How do I correctly apply the Apache 2 license to MySuperClass.java?
>>> The source file already has my company's copyright notice at the top
>>> of the file and contains additional company-proprietary code.
>>> 2. Do I need to include a reference to the Apache 2 license in
>>> MyTest.java?
>>> 3. Do I need to include a LICENSE file my software distribution?
>>>
>>> Thanks for the help!
>>>
>>> aflyctus
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: legal-discuss-unsubscribe@apache.org
>>> For additional commands, e-mail: legal-discuss-help@apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: legal-discuss-unsubscribe@apache.org
>> For additional commands, e-mail: legal-discuss-help@apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: legal-discuss-unsubscribe@apache.org
> For additional commands, e-mail: legal-discuss-help@apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: legal-discuss-unsubscribe@apache.org
For additional commands, e-mail: legal-discuss-help@apache.org


Mime
View raw message