Re: [compress] Added in-memory support for zip and 7z

2016-10-20 Thread Stefan Bodewig
On 2016-10-20,  wrote:

> Even when a stream is not thread safe I try at least to make close()
> safe/atomic as aborts and finalizers or shutdown hooks are natural
> sources for concurrency – all using close().

true.

> (However I guess it is less problematic for memory resources)

In the case of SeekableInMemoryByteChannel close really only has effects
on read/write operations, so it may not be that important in this case.

Stefan

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



Re: [compress] Added in-memory support for zip and 7z

2016-10-20 Thread Stefan Bodewig
On 2016-10-20, M N wrote:

> I have created tests for SeekableInMemoryByteChannel and spot small error.

Great, thanks Maciej.

> Attached is a patch with tests and proposed fix.

The mailing list is set up to strip attachments (at least I don't see
any). Could you attach it to a JIRA issue?

Stefan

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



Re: [RNG] Evaluating work required for a multi-module project (Was: [ALL] Component with multiple modules?)

2016-10-20 Thread Artem Barger
​Hi Gilles,​

On Thu, Oct 20, 2016 at 4:47 PM, Gilles 
wrote:

> Hi Artem.
>
> Would you be willing to create a branch containing actual
> files?
>
> If so, since the break-down into modules I'm thinking of is
> not the one you've taken below,[1] I suggest that you create
> an "all-example" module, into which you'd move _all_ the code.
>
> I'd think that you should start from
>   https://svn.apache.org/repos/asf/commons/proper/weaver/trunk/pom.xml
> as suggested by Matt.
>
> Then, I expect that
>  $ mvn clean site
> will run smoothly, and produce everything which the current
> config does.[2]
>
> Please let me know if you don't have the time to do it, or if
> you run into any problem that would prevent this goal to be
> achieved quickly.[3]
>


​I've create a new branch where restructured project folders to add support
for multi modules. I still need to work on some configurations. Would be
glad if you can take a look and provide comments.



Best regards,
  Artem Barger.


AW: [compress] Added in-memory support for zip and 7z

2016-10-20 Thread ecki
Hello,

Even when a stream is not thread safe I try at least to make close() 
safe/atomic as aborts and finalizers or shutdown hooks are natural sources for 
concurrency – all using close().

Using a AtomicBoolean or flag is good for that.

(However I guess it is less problematic for memory resources)


Gruss
Bernd
-- 
http://bernd.eckenfels.net
>From Win 10 Mobile

Von: M N
Gesendet: Donnerstag, 20. Oktober 2016 23:11
An: dev@commons.apache.org
Betreff: Re: [compress] Added in-memory support for zip and 7z

Hi Stefan,

I have created tests for SeekableInMemoryByteChannel and spot small error.
Attached is a patch with tests and proposed fix.

Regarding thread safety I think would be more clear to remove volatile and 
document a class as not thread safe.
I think the need for thread safe SeekableInMemoryByteChannel will be a rare 
case.

Cheers,
Maciej



Re: [compress] Added in-memory support for zip and 7z

2016-10-20 Thread M N
Hi Stefan,


I have created tests for SeekableInMemoryByteChannel and spot small error.

Attached is a patch with tests and proposed fix.


Regarding thread safety I think would be more clear to remove volatile and 
document a class as not thread safe.

I think the need for thread safe SeekableInMemoryByteChannel will be a rare 
case.


Cheers,

Maciej

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

Re: [ALL] Component with multiple modules?

2016-10-20 Thread Gary Gregory
Not in Commons, but Log4j 2 has lots of modules.

Gary

On Thu, Oct 20, 2016 at 10:37 AM, Emmanuel Bourg  wrote:

> On 10/20/2016 01:55 PM, Gilles wrote:
>
> > Can you point me at a component that has a config supporting
> > multiple modules?
>
> Hi Gilles,
>
> You can get a look at JCI.
>
> Emmanuel Bourg
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition



JUnit in Action, Second Edition



Spring Batch in Action


Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


Re: [ALL] Component with multiple modules?

2016-10-20 Thread Emmanuel Bourg
On 10/20/2016 01:55 PM, Gilles wrote:

> Can you point me at a component that has a config supporting
> multiple modules?

Hi Gilles,

You can get a look at JCI.

Emmanuel Bourg

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



Re: [ALL] Component with multiple modules?

2016-10-20 Thread Matt Benson
I never thought of that, but it seems as though you have stumbled onto a
way in which generating the component site with the actual RC will always
result in a problem. I'll rebuild the site from trunk.

Thanks,
Matt

On Oct 20, 2016 8:20 AM, "Gilles"  wrote:

> On Thu, 20 Oct 2016 07:23:28 -0500, Matt Benson wrote:
>
>> On Oct 20, 2016 7:00 AM, "Gilles"  wrote:
>>
>>>
>>> Hi.
>>>
>>> Can you point me at a component that has a config supporting
>>> multiple modules?
>>>
>>>
>> [weaver] is the most recently released multimodule Commons component.
>>
>
> Thanks; but it seems that the web site contains stale information:
>   $ svn checkout http://svn.apache.org/repos/as
> f/commons/proper/weaver/tags/1.3_RC2 commons-weaver-base
>
> Regards,
> Gilles
>
>
>> Matt
>>
>> Thanks,
>>> Gilles
>>>
>>>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: [RNG] Evaluating work required for a multi-module project (Was: [ALL] Component with multiple modules?)

2016-10-20 Thread Artem Barger
On Thu, Oct 20, 2016 at 4:47 PM, Gilles 
wrote:

> Hi Artem.
>
> Would you be willing to create a branch containing actual
> files?
>

​Yes, will do it today.​


>
> If so, since the break-down into modules I'm thinking of is
> not the one you've taken below,[1] I suggest that you create
> an "all-example" module, into which you'd move _all_ the code.
>
> I'd think that you should start from
>   https://svn.apache.org/repos/asf/commons/proper/weaver/trunk/pom.xml
> as suggested by Matt.
>

​Going to take a look into it.​


>
> Then, I expect that
>  $ mvn clean site
> will run smoothly, and produce everything which the current
> config does.[2]
>
> Please let me know if you don't have the time to do it, or if
> you run into any problem that would prevent this goal to be
> achieved quickly.[3]
>
>
I should be able to do it soon.
​


>
> Thanks,
> Gilles
>
> [1] I'm still convinced that the "utils" (referred to in the
> other thread) should be a separate component.  But we could
> nevertheless create modules in "Commons RNG" that would
> clearly stress the separation between the low-level RNG
> algorithms, the high-level interfaces and the "simple API".
> Then later on, the "utils" component could choose to only
> depend on the "core" algorithms and provide its own API.
> [2] In that case, I'll give a try at splitting the codebase.
> [3] In that case, I'll start the release process tomorrow, with
> what we have now.
>



Best regards,
  Artem Barger.


[RNG] Evaluating work required for a multi-module project (Was: [ALL] Component with multiple modules?)

2016-10-20 Thread Gilles

Hi Artem.

Would you be willing to create a branch containing actual
files?

If so, since the break-down into modules I'm thinking of is
not the one you've taken below,[1] I suggest that you create
an "all-example" module, into which you'd move _all_ the code.

I'd think that you should start from
  https://svn.apache.org/repos/asf/commons/proper/weaver/trunk/pom.xml
as suggested by Matt.

Then, I expect that
 $ mvn clean site
will run smoothly, and produce everything which the current
config does.[2]

Please let me know if you don't have the time to do it, or if
you run into any problem that would prevent this goal to be
achieved quickly.[3]


Thanks,
Gilles

[1] I'm still convinced that the "utils" (referred to in the
other thread) should be a separate component.  But we could
nevertheless create modules in "Commons RNG" that would
clearly stress the separation between the low-level RNG
algorithms, the high-level interfaces and the "simple API".
Then later on, the "utils" component could choose to only
depend on the "core" algorithms and provide its own API.
[2] In that case, I'll give a try at splitting the codebase.
[3] In that case, I'll start the release process tomorrow, with
what we have now.

On Thu, 20 Oct 2016 15:20:12 +0300, Artem Barger wrote:
On Thu, Oct 20, 2016 at 2:55 PM, Gilles 


wrote:



Can you point me at a component that has a config supporting
multiple modules?



​I cannot point you to the multi module project within ASF commons, 
while

it's not that
hard to create one. First of all you can use "mvn archetype:generate" 
to

create base
skeleton to play with, for example:

1. mvn archetype:generate -DgroupId=org.apache.commons \
-DartifactId=commons-rng \

-DarchetypeArtifactId=org.codehaus.mojo.archetypes

2. Enter commons-rng folder and run:
mvn archetype:generate -DgroupId=org.apache.commons \
-DartifactId=commons-rng-core 
\


-DarchetypeArtifactId=maven-archetype-quickstart

mvn archetype:generate -DgroupId=org.apache.commons \
 
-DartifactId=commons-rng-utility \


-DarchetypeArtifactId=maven-archetype-quickstart

This will create parent muti-module project "commons-rng" with two 
modules

"utility" and "core".

Here is the example of pom.xml for possible multi module RNG 
component,

assuming
you have one main module with all core logic which is 
"commons-rng-core"

and another
utility one "commong-rng-utility" both of these are wrapped into pom
packaged module
"commons-rng":


http://maven.apache.org/POM/4.0.0; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
  4.0.0

  
org.apache.commons
commons-parent
41
  

  org.apache.commons
  commons-rng
  1.0-SNAPSHOT
  pom

  rng
  http://maven.apache.org

  

UTF-8

  

  
commons-rng-core
commons-rng-utils
  

  2016
  The Apache Commons RNG project provides 
implementations of

random numbers generators.

  http://commons.apache.org/proper/commons-rng/

  
jira
http://issues.apache.org/jira/browse/RNG
  

  
scm:git:
http://git-wip-us.apache.org/repos/asf/commons-rng.git
scm:git:
https://git-wip-us.apache.org/repos/asf/commons-rng.git


https://git-wip-us.apache.org/repos/asf?p=commons-rng.git

  

  

  apache.website
  Apache Commons Site
  scm:svn:

https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-rng/


  

  

  junit
  junit
  4.11
  test

  


​
​Hope this helps you.​


Best regards,
  Artem Barger.



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



Re: [ALL] Component with multiple modules?

2016-10-20 Thread Gilles

On Thu, 20 Oct 2016 07:23:28 -0500, Matt Benson wrote:
On Oct 20, 2016 7:00 AM, "Gilles"  
wrote:


Hi.

Can you point me at a component that has a config supporting
multiple modules?



[weaver] is the most recently released multimodule Commons component.


Thanks; but it seems that the web site contains stale information:
  $ svn checkout 
http://svn.apache.org/repos/asf/commons/proper/weaver/tags/1.3_RC2 
commons-weaver-base


Regards,
Gilles



Matt


Thanks,
Gilles




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



Re: [ALL] Component with multiple modules?

2016-10-20 Thread Matt Benson
On Oct 20, 2016 7:00 AM, "Gilles"  wrote:
>
> Hi.
>
> Can you point me at a component that has a config supporting
> multiple modules?
>

[weaver] is the most recently released multimodule Commons component.

Matt

> Thanks,
> Gilles
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>


Re: [ALL] Component with multiple modules?

2016-10-20 Thread Artem Barger
On Thu, Oct 20, 2016 at 2:55 PM, Gilles 
wrote:

>
> Can you point me at a component that has a config supporting
> multiple modules?


​I cannot point you to the multi module project within ASF commons, while
it's not that
hard to create one. First of all you can use "mvn archetype:generate" to
create base
skeleton to play with, for example:

1. mvn archetype:generate -DgroupId=org.apache.commons \
-DartifactId=commons-rng \

-DarchetypeArtifactId=org.codehaus.mojo.archetypes

2. Enter commons-rng folder and run:
mvn archetype:generate -DgroupId=org.apache.commons \
-DartifactId=commons-rng-core \

-DarchetypeArtifactId=maven-archetype-quickstart

mvn archetype:generate -DgroupId=org.apache.commons \
 -DartifactId=commons-rng-utility \

-DarchetypeArtifactId=maven-archetype-quickstart

This will create parent muti-module project "commons-rng" with two modules
"utility" and "core".

Here is the example of pom.xml for possible multi module RNG component,
assuming
you have one main module with all core logic which is "commons-rng-core"
and another
utility one "commong-rng-utility" both of these are wrapped into pom
packaged module
"commons-rng":


http://maven.apache.org/POM/4.0.0; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
  4.0.0

  
org.apache.commons
commons-parent
41
  

  org.apache.commons
  commons-rng
  1.0-SNAPSHOT
  pom

  rng
  http://maven.apache.org

  
UTF-8
  

  
commons-rng-core
commons-rng-utils
  

  2016
  The Apache Commons RNG project provides implementations of
random numbers generators.

  http://commons.apache.org/proper/commons-rng/

  
jira
http://issues.apache.org/jira/browse/RNG
  

  
scm:git:
http://git-wip-us.apache.org/repos/asf/commons-rng.git
scm:git:
https://git-wip-us.apache.org/repos/asf/commons-rng.git

https://git-wip-us.apache.org/repos/asf?p=commons-rng.git
  

  

  apache.website
  Apache Commons Site
  scm:svn:
https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-rng/


  

  

  junit
  junit
  4.11
  test

  


​
​Hope this helps you.​


Best regards,
  Artem Barger.


[ALL] Component with multiple modules?

2016-10-20 Thread Gilles

Hi.

Can you point me at a component that has a config supporting
multiple modules?

Thanks,
Gilles


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