Re: Interesting blog entry about synchronized vs ReentrantLock

2007-05-15 Thread Hanson Char
Yes, we/you should. That's exactly the recommendation in JCiP btw :) Hanson Char On 5/15/07, Trustin Lee <[EMAIL PROTECTED]> wrote: Hi, I found an interesting blog entry: http://blogs.sun.com/dave/entry/java_util_concurrent_reentrantlock_vs It seems like Sun engineers have done a lot of op

Interesting blog entry about synchronized vs ReentrantLock

2007-05-15 Thread Trustin Lee
Hi, I found an interesting blog entry: http://blogs.sun.com/dave/entry/java_util_concurrent_reentrantlock_vs It seems like Sun engineers have done a lot of optimization on 'synchronized' keyword. I just have been thinking that ReentrantLock performs better than synchronized like this article p

Re: A possible duplicate event emission because of the new DefaultIoFuture implementation in 1.1?

2007-05-15 Thread Trustin Lee
On 5/16/07, Trustin Lee <[EMAIL PROTECTED]> wrote: Please let me know if I make a mistake. Otherwise I will revert it back. I make a mistake of course. I meant 'if I made a mistake'. ;) Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x02

A possible duplicate event emission because of the new DefaultIoFuture implementation in 1.1?

2007-05-15 Thread Trustin Lee
Hi folks, I was reviewing DefaultIoFuture implementation in 1.1 which used CountDownLatch and AtomicBoolean, and found a possible bug. Please verify my idea. Current implementation: protected void setValue( Object newValue ) { if( ready.compareAndSet( false, true ) ) {

Re: [ANN] Mark Webb is part of Apache MINA project team now.

2007-05-15 Thread Trustin Lee
On 5/3/07, Julien Vermillard <[EMAIL PROTECTED]> wrote: Hi everyone, After a successful vote (with 5 +1), Mark Webb was added to MINA commiter list. You probably all already know his implication in the project, with patch and excellent documentations. The Apache MINA PMC members believe he will

[jira] Commented: (DIRMINA-364) Include Runtime.getRuntime().availableProcessors() into the constructors of SocketAcceptor

2007-05-15 Thread Mark Webb (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496189 ] Mark Webb commented on DIRMINA-364: --- I have added the following constructor: public SocketAcceptor(Executor execu

[jira] Commented: (DIRMINA-364) Include Runtime.getRuntime().availableProcessors() into the constructors of SocketAcceptor

2007-05-15 Thread Mark Webb (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496180 ] Mark Webb commented on DIRMINA-364: --- I will add this in to the 2.0 baseline... > Include Runtime.getRuntime().ava

Re: SocketAcceptor processorCount?

2007-05-15 Thread Trustin Lee
Hi Rob, On 5/16/07, Rob Butler <[EMAIL PROTECTED]> wrote: Hello all, I'm a bit confused with SocketAcceptor( int processorCount, Executor executor ). Internally this creates a new SocketIoProcessor for each processorCount. But the SocketIoProcessors all share the same Executor. What's the a

[jira] Closed: (DIRMINA-366) Default socket option values are retrieved incorrectly.

2007-05-15 Thread Trustin Lee (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trustin Lee closed DIRMINA-366. --- Resolution: Fixed It should be fixed now. :D > Default socket option values are retrieved incorrect

[jira] Updated: (DIRMINA-366) Default socket option values are retrieved incorrectly.

2007-05-15 Thread Trustin Lee (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trustin Lee updated DIRMINA-366: Fix Version/s: (was: 1.0.3) 1.1.1 1.0.4 A

[jira] Reopened: (DIRMINA-366) Default socket option values are retrieved incorrectly.

2007-05-15 Thread Trustin Lee (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Trustin Lee reopened DIRMINA-366: - reuseAddress is still false if a user creates a new SocketAcceptorConfig or DatagramAcceptorConfig.

SocketAcceptor processorCount?

2007-05-15 Thread Rob Butler
Hello all, I'm a bit confused with SocketAcceptor( int processorCount, Executor executor ). Internally this creates a new SocketIoProcessor for each processorCount. But the SocketIoProcessors all share the same Executor. What's the advantage of having multiple instances of SocketIoProcessor?

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Trustin Lee
On 5/16/07, peter royal <[EMAIL PROTECTED]> wrote: On May 15, 2007, at 12:10 PM, Maarten Bosteels wrote: > tests failed here as well. > > I had to change > public class RequestResponseFilterTest > into > public class RequestResponseFilterTest extends TestCase That's a JUnit 4 test, so it doesn't

Re: boardcasting

2007-05-15 Thread Trustin Lee
On 5/16/07, mat <[EMAIL PROTECTED]> wrote: 2007/4/25, Trustin Lee <[EMAIL PROTECTED]>: > > I'd like to add more pepper to Peter's comment. :) > > On 4/25/07, peter royal <[EMAIL PROTECTED]> wrote: > > On Apr 21, 2007, at 8:38 AM, mat wrote: > > > I implemented my protocol encoding in the procotol

[jira] Created: (DIRMINA-377) Reduce memory consumption of DefaultIoFuture

2007-05-15 Thread Trustin Lee (JIRA)
Reduce memory consumption of DefaultIoFuture Key: DIRMINA-377 URL: https://issues.apache.org/jira/browse/DIRMINA-377 Project: MINA Issue Type: Improvement Components: Core Affects Ve

Re: DefaultIoFuture - memory problem

2007-05-15 Thread Trustin Lee
On 5/16/07, peter royal <[EMAIL PROTECTED]> wrote: On May 15, 2007, at 2:11 PM, Haviv wrote: > Recently I am profiling memory on my application which is based on > MINA > 1.0.1. > During my tests I found that there are many instances of ArrayList > allocated > from DefaultIoFuture constructor(aro

Re: Compression and Encryption Filter

2007-05-15 Thread Trustin Lee
On 5/16/07, mat <[EMAIL PROTECTED]> wrote: 1) If I only want to compress the body part of my message (NOT head). How could mina compression filter be applied for this purpose? You need to compress by yourself. There's no way to do that for now. 2) If 1) answer is NO. Can I add my own compre

Re: LoggingFilter

2007-05-15 Thread Trustin Lee
On 5/16/07, Trustin Lee <[EMAIL PROTECTED]> wrote: On 5/16/07, mat <[EMAIL PROTECTED]> wrote: > Is it possible to do some figuration in LoggingFilter? For instance, can I > only log the incomging message? Can I only log some types of messages? Or I > have to write my own Logging? Otherwises, it s

[jira] Created: (DIRMINA-376) Fine-grained logging control in LoggingFilter

2007-05-15 Thread Trustin Lee (JIRA)
Fine-grained logging control in LoggingFilter - Key: DIRMINA-376 URL: https://issues.apache.org/jira/browse/DIRMINA-376 Project: MINA Issue Type: New Feature Components: Filter

Re: LoggingFilter

2007-05-15 Thread Trustin Lee
On 5/16/07, mat <[EMAIL PROTECTED]> wrote: Is it possible to do some figuration in LoggingFilter? For instance, can I only log the incomging message? Can I only log some types of messages? Or I have to write my own Logging? Otherwises, it seems logging filter is less useful. Correct me if I am wr

Re: Spring

2007-05-15 Thread Trustin Lee
On 5/16/07, mat <[EMAIL PROTECTED]> wrote: Can anyone give me a hint why migrate spring into mina? Is Spring for web development? Well, Spring is basically a IoC (or DI) container. It's not directly related with web application development. Of course, it provides many bells and whistles which

Re: How can I get spring bean from IoHandlerAdaptor

2007-05-15 Thread Trustin Lee
On 5/15/07, satish viswanatham <[EMAIL PROTECTED]> wrote: Hi Trustin, Good morning. Yes my application hangs, no exceptions. Here is the thread dump. I see that my main singleton object's init method acts like the server. May be it is possible that - that object initialization method is still ho

Spring

2007-05-15 Thread mat
Can anyone give me a hint why migrate spring into mina? Is Spring for web development?

Re: Transfer large files?

2007-05-15 Thread Twan
Hi, Thanks for the reply Pete. StreamWriteFilter looks promising, i found the following mail in the archive: http://www.mail-archive.com/[EMAIL PROTECTED]/msg01657.html It even demonstrates on how to set it up in combination with the TextLinkCodecFactory. Archives are definately handy. -twan

LoggingFilter

2007-05-15 Thread mat
Is it possible to do some figuration in LoggingFilter? For instance, can I only log the incomging message? Can I only log some types of messages? Or I have to write my own Logging? Otherwises, it seems logging filter is less useful. Correct me if I am wrong. Thanks.

Compression and Encryption Filter

2007-05-15 Thread mat
1) If I only want to compress the body part of my message (NOT head). How could mina compression filter be applied for this purpose? 2) If 1) answer is NO. Can I add my own compression(de-compression) filter and encryption(de-encryption) filter? If NOT, should I do it inside the encoder(decoder)?

Re: DefaultIoFuture - memory problem

2007-05-15 Thread peter royal
On May 15, 2007, at 2:11 PM, Haviv wrote: Recently I am profiling memory on my application which is based on MINA 1.0.1. During my tests I found that there are many instances of ArrayList allocated from DefaultIoFuture constructor(around 10-20% of the total memory), after reviewing the code

Re: boardcasting

2007-05-15 Thread mat
2007/4/25, Trustin Lee <[EMAIL PROTECTED]>: I'd like to add more pepper to Peter's comment. :) On 4/25/07, peter royal <[EMAIL PROTECTED]> wrote: > On Apr 21, 2007, at 8:38 AM, mat wrote: > > I implemented my protocol encoding in the procotol filter and I > > used one > > session one object met

Re: boardcasting

2007-05-15 Thread mat
BTW, what is the good point to use LRU cache? 2007/5/15, mat <[EMAIL PROTECTED]>: Thanks. Trustin. 2007/4/30, Trustin Lee <[EMAIL PROTECTED]>: > > On 4/27/07, mat <[EMAIL PROTECTED]> wrote: > > So cache has to be global variable? > > Following is my Encoder class. Where should I put the cache?

DefaultIoFuture - memory problem

2007-05-15 Thread Haviv
Hi Recently I am profiling memory on my application which is based on MINA 1.0.1. During my tests I found that there are many instances of ArrayList allocated from DefaultIoFuture constructor(around 10-20% of the total memory), after reviewing the code there is indeed an allocation of the "listene

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread peter royal
On May 15, 2007, at 12:10 PM, Maarten Bosteels wrote: tests failed here as well. I had to change public class RequestResponseFilterTest into public class RequestResponseFilterTest extends TestCase That's a JUnit 4 test, so it doesn't need that, but Maven isn't smart enough to do JUnit 4 test

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Mark Webb
I have been voted in, but have not received an account yet... -- ..Cheers Mark On 5/15/07, Maarten Bosteels <[EMAIL PROTECTED]> wrote: On 5/15/07, Rob Butler <[EMAIL PROTECTED]> wrote: > > Will you be commiting that change? I wish I could :-) Unfortunately I am not a MINA commiter. Mark, I g

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Maarten Bosteels
On 5/15/07, Rob Butler <[EMAIL PROTECTED]> wrote: Will you be commiting that change? I wish I could :-) Unfortunately I am not a MINA commiter. Mark, I guess you can do the fix ? Maarten - Original Message From: Maarten Bosteels <[EMAIL PROTECTED]> To: dev@mina.apache.org Sent: T

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Rob Butler
Will you be commiting that change? - Original Message From: Maarten Bosteels <[EMAIL PROTECTED]> To: dev@mina.apache.org Sent: Tuesday, May 15, 2007 3:10:54 PM Subject: Re: Trunk build failure / Mina 2.0 ETA? tests failed here as well. I had to change public class RequestResponseFilterT

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Rob Butler
At revision 538285. It would appear I am more "up-to-date" than you are. Perhaps that's why your not seeing the problem? Rob - Original Message From: Mark Webb <[EMAIL PROTECTED]> To: dev@mina.apache.org Sent: Tuesday, May 15, 2007 3:05:49 PM Subject: Re: Trunk build failure / Mina 2.

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Maarten Bosteels
tests failed here as well. I had to change public class RequestResponseFilterTest into public class RequestResponseFilterTest extends TestCase Maarten On 5/15/07, Mark Webb <[EMAIL PROTECTED]> wrote: Just performed the same commands and org.apache.mina.filter.reqres.RequestResponseFilterTest

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Mark Webb
Just performed the same commands and org.apache.mina.filter.reqres.RequestResponseFilterTest passed 5 of 5. When you perform 'svn st', what revision are you up to? Should be 538278. -- ..Cheers Mark On 5/15/07, Rob Butler <[EMAIL PROTECTED]> wrote: I just did an svn update, which showed wha

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Rob Butler
I just did an svn update, which showed what I have is fully up-to-date. Then did: mvn clean mvn install Still fails in the exact same way. Rob - Original Message From: Mark Webb <[EMAIL PROTECTED]> To: dev@mina.apache.org Sent: Tuesday, May 15, 2007 11:41:13 AM Subject: Re: Trunk buil

Re: Transfer large files?

2007-05-15 Thread peter royal
On May 15, 2007, at 7:15 AM, Twan wrote: I rather read a couple bytes from a file that is on the server and send it directly to the client. Can somebody please tell me which combination of classes i should use to make this work? Give the StreamWriteFilter a whirl. -pete -- [EMAIL PROTECTED

Re: Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Mark Webb
I just performed an svn up, and mvn test with no errors. -- ..Cheers Mark On 5/15/07, Rob Butler <[EMAIL PROTECTED]> wrote: Hello all, It looks like Mina's got a failing unit test in the trunk. Maven output: Running org.apache.mina.filter.reqres.RequestResponseFilterTest Tests run:

Re: Simple Threaded Server - Problem Running on Windows Server 2003

2007-05-15 Thread Maarten Bosteels
Hi Matt, You could request a thread-dump to see where the handler is stalled. (or connect to your server with jconsole) Maarten On 5/15/07, Matt Mehalso <[EMAIL PROTECTED]> wrote: Actually, I turned off the ExecutorFilter and I'm still having the same problem, so scratch the last message. It

Trunk build failure / Mina 2.0 ETA?

2007-05-15 Thread Rob Butler
Hello all, It looks like Mina's got a failing unit test in the trunk. Maven output: Running org.apache.mina.filter.reqres.RequestResponseFilterTest Tests run: 5, Failures: 5, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec <<< FAILURE! I was wondering if there is any timeline for Mina 2

Re: Simple Threaded Server - Problem Running on Windows Server 2003

2007-05-15 Thread Matt Mehalso
Actually, I turned off the ExecutorFilter and I'm still having the same problem, so scratch the last message. It looks like the handler is stalling in the sessionOpened event method when trying to load a new ClassPathXmlApplicationContext. I wonder if this is some sort of security issue with Ser

Transfer large files?

2007-05-15 Thread Twan
Hello, I'm developing a client and server where the client retrieves information from a server. This information is retrieved by sending text queries to the server and the server returns a the information (text format). For this i am using the TextLineCodecFactory which works great. But at a

Simple Threaded Server - Problem Running on Windows Server 2003

2007-05-15 Thread Matt Mehalso
Hi All - We have developed a simple request - response server using Mina 1.0.3. The server uses a logging filter, a custom codec, and an ExecutorFilter to intercept incoming events/messages before hitting our custom HandlerAdapter. The server has been fully tested on our development machines.

Re: boardcasting

2007-05-15 Thread mat
Thanks. Trustin. 2007/4/30, Trustin Lee <[EMAIL PROTECTED]>: On 4/27/07, mat <[EMAIL PROTECTED]> wrote: > So cache has to be global variable? > Following is my Encoder class. Where should I put the cache? You can use MessageEncoderFactory. :) If you specify MessageEncoder class in DemuxingPro

Re: How can i deal with the old [DataInputStream & DataOutputStream] client

2007-05-15 Thread mat
I think you have to write your own decoder class to reassemly the whole message. The good starting point is to take a look at sumup example. It really helps. 2007/5/15, 李健 <[EMAIL PROTECTED]>: Hi, All i wanna to use MINA to improve my ApplicationServer, the old application's socket part is

[jira] Commented: (DIRMINA-344) Maybe I met a deadlock.

2007-05-15 Thread Paulo Taylor (JIRA)
[ https://issues.apache.org/jira/browse/DIRMINA-344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495907 ] Paulo Taylor commented on DIRMINA-344: -- No I haven't tried 1.0 so I can't really tell. It's quite difficult to

Re: SSL Client does not send any data

2007-05-15 Thread seven
Trustin Lee wrote: > > On 5/9/07, seven <[EMAIL PROTECTED]> wrote: >> >> Hello, >> >> I have a problem with mina-filter-ssl-1.1.0 release: sometimes for >> unknown >> reasons and in an arbitrary way, after a client connects to a SSL enabled >> server, it does not send anything. On the server sid