[jira] Commented: (DIRMINA-742) When session is closed, DefaultIoFilterChain is in deadlock.

2010-01-19 Thread ncanis2 (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802196#action_12802196
 ] 

ncanis2 commented on DIRMINA-742:
-

I think this problem was fixed.

when I used below code, the problem was invoked.
if(session!=null  session.isConnected()) {
session.getCloseFuture().addListener(new 
IoFutureListener() {
@Override
public void operationComplete(IoFuture 
future) {
if(dc.isDisposed()==false) {
dc.dispose();
}
}
});
}


Now, I delete the code, after that my problem is perfectly doing work.

You shoud close this Issue.
Thank you.

 When session is closed, DefaultIoFilterChain is in deadlock.
 

 Key: DIRMINA-742
 URL: https://issues.apache.org/jira/browse/DIRMINA-742
 Project: MINA
  Issue Type: Bug
  Components: Core
Affects Versions: 2.0.0-RC1
 Environment: XP
Reporter: ncanis2
 Fix For: 2.0.0-RC2


 It is mina 2.0.0RC1 in my project.
 My problem is:
 Client was connected with server.
 But, when server was exited suddenly, client couldn't call sessionClosed() 
 method.
 DefaultIoFilterChain.java
 public void fireSessionClosed() {
 // Update future.
 try {
 session.getCloseFuture().setClosed();   = This is problem. 
 deadlock invoked..
 } catch (Throwable t) {
 fireExceptionCaught(t);
 }
 // And start the chain.
 Entry head = this.head;
 callNextSessionClosed(head, session);
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (DIRMINA-757) Add an entry in FAQ explaining how to correctly close a session and dispose the connector

2010-01-19 Thread Emmanuel Lecharny (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny resolved DIRMINA-757.
---

Resolution: Fixed

Done

 Add an entry in FAQ explaining how to correctly close a session and dispose 
 the connector
 -

 Key: DIRMINA-757
 URL: https://issues.apache.org/jira/browse/DIRMINA-757
 Project: MINA
  Issue Type: Task
Affects Versions: 2.0.0-RC1
Reporter: Emmanuel Lecharny
Priority: Critical
 Fix For: 2.0.0-RC2


 Many people are complaining about the fact that their program is hanging when 
 they try to close a session and dispose the connector in the listener this 
 way :
 CloseFuture closeFuture = cf.getSession().getCloseFuture();
 closeFuture.addListener((IoFutureListener?) new 
 IoFutureListenerIoFuture() {
 @Override
 public void operationComplete(IoFuture future) {
 connector.dispose(); // This will hang !
 }
 });
 // wait for session close and then dispose the connector
 closeFuture.getSession().close(false);
 closeFuture.awaitUninterruptibly();
 We have to explain in the FAQ that the dispose must not be put in the 
 listener.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Closed: (DIRMINA-757) Add an entry in FAQ explaining how to correctly close a session and dispose the connector

2010-01-19 Thread Emmanuel Lecharny (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lecharny closed DIRMINA-757.
-


 Add an entry in FAQ explaining how to correctly close a session and dispose 
 the connector
 -

 Key: DIRMINA-757
 URL: https://issues.apache.org/jira/browse/DIRMINA-757
 Project: MINA
  Issue Type: Task
Affects Versions: 2.0.0-RC1
Reporter: Emmanuel Lecharny
Priority: Critical
 Fix For: 2.0.0-RC2


 Many people are complaining about the fact that their program is hanging when 
 they try to close a session and dispose the connector in the listener this 
 way :
 CloseFuture closeFuture = cf.getSession().getCloseFuture();
 closeFuture.addListener((IoFutureListener?) new 
 IoFutureListenerIoFuture() {
 @Override
 public void operationComplete(IoFuture future) {
 connector.dispose(); // This will hang !
 }
 });
 // wait for session close and then dispose the connector
 closeFuture.getSession().close(false);
 closeFuture.awaitUninterruptibly();
 We have to explain in the FAQ that the dispose must not be put in the 
 listener.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DIRMINA-484) Datagram transport based on APR (Apache Portable Runtime)

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard updated DIRMINA-484:
--

Affects Version/s: 3.0.0-M1

to do for 3.0 or post 2.0 if we keep APR

 Datagram transport based on APR (Apache Portable Runtime)
 -

 Key: DIRMINA-484
 URL: https://issues.apache.org/jira/browse/DIRMINA-484
 Project: MINA
  Issue Type: New Feature
  Components: Transport
Affects Versions: 3.0.0-M1
Reporter: Trustin Lee
Priority: Minor

 We can implement an APR-based DatagramAcceptor and DatagramConnector using 
 org.apache.tomcat.jni package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DIRMINA-301) New Multi threaded SocketIOProcessor to improve fairness of socket reads/writes

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard updated DIRMINA-301:
--

Fix Version/s: 3.0.0-M1

 New Multi threaded SocketIOProcessor to improve fairness of socket 
 reads/writes
 ---

 Key: DIRMINA-301
 URL: https://issues.apache.org/jira/browse/DIRMINA-301
 Project: MINA
  Issue Type: Improvement
  Components: Transport
Affects Versions: 1.0.0
 Environment: Problem on all platforms, example test ran on a 8 Way 
 Opteron
Reporter: Martin Ritchie
 Fix For: 3.0.0-M1

 Attachments: JIRA-301-Release-4.zip, Mina Multi Thread 
 SocketIOProcessor(MinaHead).zip, Mina Multi Thread SocketIOProcessor.zip, 
 Mina Multi Thread SocketIOProcessor.zip, 
 MultiThreadSocketIOProcessor-java-1.0-proposal-R4.1-src.zip


 The current SocketIOProcessor uses a single thread to do both reads and 
 socket flushes. During some testing of Apache Qpid (A messaging broker) which 
 uses mina as a transport we ran in to two problems.
 The first was the client that produces lots of data failed with an 
 OutOfMemoryException, as mentioned in DIRMINA-206.
 The second is that under constant load the broker cannot read and write from 
 the same socket at the same time. I have created a MultiThreaded 
 SocketIOProcessor that allows reads and writes to occur simultaneously. On 
 low core boxes the performance is similar to the existing SocketIOProcessor. 
 However, on higher core boxes the Multi threaded box can be more than twice 
 the speed.
 The attached zip file is an attempt to resolve the second. 
 To run the test:
 run ant  to build everything.
 The memory requirements for each process are shown in parenthesis, these were 
 just the largest numbers shown in top as the processes ran.
 Then 
 ant acceptor_mina(1.2G) or ant acceptor_multi(250M) to run the listener 
 process. 
 This process simply sends the received message back down the same socket.
 Then run the corresponding writer
 ant writer_mina(560M) or ant writer_multi(540M)
 The results from each of the writers I ran on an 8way Opteron are shown below.
 The out of memory issue on the writer can be demonstrated buy running:
 ant writer_mina_mem or ant writer_multi_mem
 The increased throughput on the Multi Threaded SocketIOProcessor should allow 
 it survive the low memory setting.
 ~/dev/TempProjects/mina-2006-11-02-1056/Mina Multi Thread SocketIOProcessor$ 
 ant writer_mina
 Buildfile: build.xml
 writer_mina:
  [java] main 2006-11-02 10:57:36,932 INFO 
 [apache.mina.SocketIOTest.WriterTest] Starting 2k test
  [java] main 2006-11-02 10:57:36,933 WARN 
 [apache.mina.SocketIOTest.WriterTest] Using MINA NIO
  [java] main 2006-11-02 10:57:36,999 INFO 
 [apache.mina.SocketIOTest.WriterTest] Attempting connection to 
 localhost/127.0.0.1:
  [java] main 2006-11-02 10:57:37,035 INFO 
 [apache.mina.SocketIOTest.WriterTest] Connection completed
  [java] Thread-2 2006-11-02 10:57:37,038 INFO 
 [apache.mina.SocketIOTest.WriterTest] Starting to send 20 buffers of 2048B
  [java] Thread-2 2006-11-02 10:57:43,409 INFO 
 [apache.mina.SocketIOTest.WriterTest] All buffers sent; waiting for receipt 
 from server
  [java] Thread-2 2006-11-02 10:57:58,652 INFO 
 [apache.mina.SocketIOTest.WriterTest] Completed
  [java] Thread-2 2006-11-02 10:57:58,652 INFO 
 [apache.mina.SocketIOTest.WriterTest] Total time waiting for server after 
 last write: 15243
  [java] Thread-2 2006-11-02 10:57:58,652 INFO 
 [apache.mina.SocketIOTest.WriterTest] Total time: 21613
  [java] Thread-2 2006-11-02 10:57:58,652 INFO 
 [apache.mina.SocketIOTest.WriterTest] MB per second: 18951
  [java] Thread-2 2006-11-02 10:57:58,654 INFO 
 [apache.mina.SocketIOTest.WriterTest] Average chunk time: 1.00011369ms
  [java] Thread-2 2006-11-02 10:57:58,654 INFO 
 [apache.mina.SocketIOTest.WriterTest] Maximum WriteRequestQueue size: 171836
  [java] Thread-2 2006-11-02 10:57:58,654 INFO 
 [apache.mina.SocketIOTest.WriterTest] Closing session
 ~/dev/TempProjects/mina-2006-11-02-1056/Mina Multi Thread SocketIOProcessor$ 
 ant writer_multi
 Buildfile: build.xml
 writer_multi:
  [java] main 2006-11-02 10:58:10,544 INFO 
 [apache.mina.SocketIOTest.WriterTest] Starting 2k test
  [java] main 2006-11-02 10:58:10,546 WARN 
 [apache.mina.SocketIOTest.WriterTest] Using MultiThread NIO
  [java] main 2006-11-02 10:58:10,620 INFO 
 [apache.mina.SocketIOTest.WriterTest] Attempting connection to 
 localhost/127.0.0.1:
  [java] main 2006-11-02 10:58:10,675 INFO 
 [apache.mina.SocketIOTest.WriterTest] Connection completed
  [java] Thread-3 2006-11-02 10:58:10,678 INFO 
 [apache.mina.SocketIOTest.WriterTest] Starting to send 20 buffers of 2048B
  

[jira] Updated: (DIRMINA-484) Datagram transport based on APR (Apache Portable Runtime)

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard updated DIRMINA-484:
--

Affects Version/s: (was: 3.0.0-M1)
Fix Version/s: 3.0.0-M1

 Datagram transport based on APR (Apache Portable Runtime)
 -

 Key: DIRMINA-484
 URL: https://issues.apache.org/jira/browse/DIRMINA-484
 Project: MINA
  Issue Type: New Feature
  Components: Transport
Reporter: Trustin Lee
Priority: Minor
 Fix For: 3.0.0-M1


 We can implement an APR-based DatagramAcceptor and DatagramConnector using 
 org.apache.tomcat.jni package.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DIRMINA-723) OrderedThreadPoolExecutor behavior: configurable queue size, corePoolSize, maximumPoolSize

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard updated DIRMINA-723:
--

Fix Version/s: 3.0.0-M1

 OrderedThreadPoolExecutor behavior: configurable queue size, corePoolSize, 
 maximumPoolSize
 --

 Key: DIRMINA-723
 URL: https://issues.apache.org/jira/browse/DIRMINA-723
 Project: MINA
  Issue Type: Improvement
  Components: Core
Affects Versions: 2.0.0-M6
 Environment: Ubuntu Linux, kernel 2.6.x
Reporter: Victor N
Priority: Minor
 Fix For: 3.0.0-M1


 The problem was discussed with Emmanuel Lecharny in mail lists:
 http://www.nabble.com/OrderedThreadPoolExecutor%3A-limited-workQueue-td24275973.html
 If you compare OrderedThreadPoolExecutor and standard ThreadPoolExecutor, you 
 can see that ThreadPoolExecutor has useful params:
 - core pool size
 - maximum pool size
 - work queue size
 If you use unbounded thread pools and queues with mina Acceptor or Connector, 
 you may get OutOfMemoryError under critical load because Java creates too 
 many threads.
 With ThreadPoolExecutor you may limit the number of threads (maximumPoolSize) 
 and use a bounded queue (ex. LinkedBlockingQueue of limited capacity).
 Unfortunately, this does not work with OrderedThreadPoolExecutor -both  
 waitingSessions and  sessionTasksQueue do not allow to configure their 
 size nor pass a different queue implementation.
 Even though OrderedThreadPoolExecutor extends ThreadPoolExecutor, it 
 overrides the behavior significantly - seems that its meaning of 
 corePoolSize and maximumPoolSize is different.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (DIRMINA-355) Modified sumup client to act as a jmeter javarequest sampler

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard resolved DIRMINA-355.
---

Resolution: Won't Fix

1.0 is very old now

 Modified sumup client to act as a jmeter javarequest sampler
 

 Key: DIRMINA-355
 URL: https://issues.apache.org/jira/browse/DIRMINA-355
 Project: MINA
  Issue Type: Test
  Components: Core
Affects Versions: 1.0.2
Reporter: monajit
 Attachments: Client.java, Java Request.jmx


 I have modified the sumup example client so that it can be used within Jmeter 
 to be used as a javaRequest sampler. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DIRMINA-509) DatagramConnector.connect() is slow compared to connect() with java.net.DatagramSocket

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard updated DIRMINA-509:
--

Fix Version/s: 3.0.0-M1

Yes creating a session for each UDP end-ponit is a big overhead, something to 
look for 3.0

 DatagramConnector.connect() is slow compared to connect() with 
 java.net.DatagramSocket
 --

 Key: DIRMINA-509
 URL: https://issues.apache.org/jira/browse/DIRMINA-509
 Project: MINA
  Issue Type: Improvement
  Components: Transport
Affects Versions: 1.1.6, 2.0.0-M1, 2.0.0-M2
Reporter: Wilson Yeung
 Fix For: 3.0.0-M1


 I benchmarked Mina 2.0's NioDatagramConnector vs java.net.DatagramSocket on a 
 Linux 2.6 kernel.
 Mina 2.0 NioDatagramConnector, connect(), future.addListener(), 
 session.close()
 100,000 iterations
 ~20 seconds
 ~5,000 per second
 java.net.DatagramSocket, connect(), disconnect(), close()
 100,000 iterations
 ~2-3 seconds
 ~30,000 to 50,000 per second 
 I believe the basic problem is that 
 AbstractPollingIoConnector/AbstractPollingIoProcessor assumes that connecting 
 a UDP datagram socket should be a scheduled operation.  For TCP, this makes a 
 lot of sense as connect() should be an asynchronous operation.
 But for UDP, where connect() only performs kernel resource reservation, it 
 makes more sense I think to connect immediately and return an IoFuture with 
 the IoSession already connected and ready.  Looking at the code, I see that 
 the connect() call is indeed made on the same call stack, but 
 ConnectFuture.setSession() is executed by the AbstractPollingIoProcessor 
 worker thread after the IoSession has been properly registered.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (DIRMINA-641) Configurable memory limit for CompressionFilter

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-641?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard resolved DIRMINA-641.
---

Resolution: Won't Fix

the whole compression filter is a memory eater, avoid it if you have serious 
load

 Configurable memory limit for CompressionFilter
 ---

 Key: DIRMINA-641
 URL: https://issues.apache.org/jira/browse/DIRMINA-641
 Project: MINA
  Issue Type: Wish
  Components: Filter
Affects Versions: 1.0.10, 1.1.7, 2.0.0-M3
 Environment: Cross-platform
Reporter: Mauritz Lovgren

 Currently, there is a large build-up of memory due to the fact that 
 CompressionFilter (or morewhat jzlib) builds up memory structures for 
 efficient compression over time.
 The problem arises when using thousands of connections, as the 
 CompressionFilter keeps compression data per IoSession, holding several 
 hundreds of megabytes from being GCed.
 Would help a lot if maximum amount of memory cached by ZStream could be 
 configurable. Would rather have small memory footprint and a bit worse 
 compression...
 Example: I have 6000 connections to a proxy, using CompressionFilter between 
 proxy and clients. When profiling with JProfiler, I find that 2GB of the heap 
 in the proxy is used only by CompressionFilter (ZLib) objects. (!) These 
 objects are not GCed until connections close.
 For now I have created a workaround that compresses each message within the 
 encoder by using standard java.util.zip compression. But it is bad design, 
 since it really is better to perform this using a filter externally from a 
 decoder... (?)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (DIRMINA-379) setKeepAlive/setTcpNoDelay and exceptions in Windows Vista

2010-01-19 Thread Julien Vermillard (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802257#action_12802257
 ] 

Julien Vermillard commented on DIRMINA-379:
---

is it still a problem with 2.0.0 RC1 ?

 setKeepAlive/setTcpNoDelay and exceptions in Windows Vista
 --

 Key: DIRMINA-379
 URL: https://issues.apache.org/jira/browse/DIRMINA-379
 Project: MINA
  Issue Type: Bug
  Components: Core
Affects Versions: 1.0.3, 1.1.0, 2.0.0-M1
 Environment: Windows Vista Home Premium Italian
 Java SE 1.5.0_11, Java SE 1.6 Update 1, Java SE 1.4.2_12
Reporter: Stefano Bagnara

 When I ran my application under Vista I get this exception:
 Exception in thread Thread-4 org.apache.mina.common.RuntimeIOException: 
 java.net.SocketException: Invalid argument: sun.nio.ch.Net.setIntOption
   at 
 org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:252)
   at 
 org.apache.mina.transport.socket.nio.SocketSessionImpl.init(SocketSessionImpl.java:94)
   at 
 org.apache.mina.transport.socket.nio.SocketConnector.newSession(SocketConnector.java:350)
   at 
 org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketConnector.java:290)
   at 
 org.apache.mina.transport.socket.nio.SocketConnector.access$900(SocketConnector.java:53)
   at 
 org.apache.mina.transport.socket.nio.SocketConnector$Worker.run(SocketConnector.java:395)
   at 
 org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
   at java.lang.Thread.run(Thread.java:595)
 Caused by: java.net.SocketException: Invalid argument: 
 sun.nio.ch.Net.setIntOption
   at sun.nio.ch.Net.setIntOption0(Native Method)
   at sun.nio.ch.Net.setIntOption(Net.java:152)
   at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:372)
   at sun.nio.ch.SocketOptsImpl.setBoolean(SocketOptsImpl.java:38)
   at sun.nio.ch.SocketOptsImpl.keepAlive(SocketOptsImpl.java:92)
   at sun.nio.ch.OptionAdaptor.setKeepAlive(OptionAdaptor.java:139)
   at sun.nio.ch.SocketAdaptor.setKeepAlive(SocketAdaptor.java:322)
   at 
 org.apache.mina.transport.socket.nio.SocketSessionImpl$SessionConfigImpl.setKeepAlive(SocketSessionImpl.java:248)
   ... 7 more
 I had to remove the following lines from the SocketSessionImpl constructor:
 this.config.setKeepAlive( cfg.isKeepAlive() );
 this.config.setTcpNoDelay( cfg.isTcpNoDelay() );
 and now it works.
 No matter if I change the configuration to let them return true or false, I 
 keep getting the exception if I don't remove the call at all.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (DIRMINA-715) Ability to set timeouts for NioSocketConnector.connect()

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard resolved DIRMINA-715.
---

Resolution: Won't Fix

the API is frozen, you still can change the time out before each connection.

 Ability to set timeouts for NioSocketConnector.connect()
 

 Key: DIRMINA-715
 URL: https://issues.apache.org/jira/browse/DIRMINA-715
 Project: MINA
  Issue Type: Wish
  Components: Core
Affects Versions: 2.0.0-M5
Reporter: Roger Kapsi

 The connect() method in MINA 1.x had an argument for a SocketConnectorConfig 
 object that would allow the user to specify a custom timeout for each call.
 In MINA 2.x there is only a per NioSocketConnector instance timeout. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DIRMINA-250) Provide a test suite for a transport implementor.

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard updated DIRMINA-250:
--

Fix Version/s: 3.0.0-M1
   Issue Type: Wish  (was: Task)

 Provide a test suite for a transport implementor.
 -

 Key: DIRMINA-250
 URL: https://issues.apache.org/jira/browse/DIRMINA-250
 Project: MINA
  Issue Type: Wish
Reporter: Trustin Lee
Priority: Minor
 Fix For: 3.0.0-M1


 The expected behaviors of all scenarios should be tested for all transport 
 implementations to keep consistency between different transport 
 implementations.  This has to be done at least before we implement a new 
 transport.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (DIRMINA-258) Example of an XML server and Client.

2010-01-19 Thread Julien Vermillard (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802261#action_12802261
 ] 

Julien Vermillard commented on DIRMINA-258:
---

any progress on this issue ?

 Example of an XML server and Client.
 

 Key: DIRMINA-258
 URL: https://issues.apache.org/jira/browse/DIRMINA-258
 Project: MINA
  Issue Type: New Feature
Reporter: Martin Helmhout
Assignee: Mark Webb
Priority: Minor
 Attachments: MINA_XMLServer.zip, MINA_XMLServer.zip, XMLserver095.zip


 The attachment contains an example of an XML Server + client and should help 
 start people building their server quickly.
 Because an XML server was not in the examples, I created quickly something 
 for myself, but want others to also get the fruits and make them better if 
 possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: MINA 2.0 bugs parade, #2

2010-01-19 Thread Alan D. Cabrera

I wanted to assign an issue to myself to work on it but was unable to.


Regards,
Alan

On Jan 19, 2010, at 4:12 AM, Emmanuel Lecharny wrote:


Hi guys,

some progress has been made last week. Here is the current status.

Here are he remaining issues : ([B] = Bug, [I] = Improvement, [T] =  
task,

[F] = new Feature, [W] = wish)

MINA 2.0-RC2 roadmap :
--

[B] DIRMINA-539NioDatagramConnector doesn't takes the  
TrafficClass value

set to his DatagramSessionConfig
[I] DIRMINA-707Add sendfile support to APR transport
[I] DIRMINA-682We need a better documentation for the  
ExecutorFilter
[was :Writing more than one message will block until the  
MessageReceived as

been fully proceced]
[I] DIRMINA-593Javadoc  documentation for org/apache/mina/ 
filter/reqres

[T] DIRMINA-756Bump up the used jars (partially fixed)
[T] DIRMINA-708Unbound thread growth on discovery attempts :  
Improve

documentation
[T] DIRMINA-477Update page about differences between 1.x and 2.x

Unscheduled :
-
[B] DIRMINA-738Using IoEventQueueThrottler with a  
WriteRequestFilter can

lead to hangs
[B] DIRMINA-737StateMachine deadlock on StateContext  
synchronization
[B] DIRMINA-724getScheduledWriteMessages not zero after all  
sessions

closed
[B] DIRMINA-683APR transport on FreeBSD throwing Exceptions
[B] DIRMINA-379setKeepAlive/setTcpNoDelay and exceptions in  
Windows

Vista
[I] DIRMINA-752maybe move SerialAddressEditor.class to the mina  
beans

project
[I] DIRMINA-723OrderedThreadPoolExecutor behavior: configurable  
queue

size, corePoolSize, maximumPoolSize
[I] DIRMINA-657SSL Filter and IoHandler. Unassigned  
Sanjeev

Sachdev
[I] DIRMINA-509DatagramConnector.connect() is slow compared to  
connect()

with java.net.DatagramSocket
[I] DIRMINA-301New Multi threaded SocketIOProcessor to improve  
fairness

of socket reads/writes
[F] DIRMINA-705Transport for unix local sockets based on APR
[F] DIRMINA-655Add a more general purpose text based decoder
[F] DIRMINA-500Cache for encoded messages.[F] DIRMINA-484 
Datagram

transport based on APR (Apache Portable Runtime)
[F] DIRMINA-499Bindings for Scala
[F] DIRMINA-389Create a Connection Throttle Filter
[F] DIRMINA-258Example of an XML server and Client.
[F] DIRMINA-196Connection shaper
[F] DIRMINA-128IoSession.shutdown(TrafficMask)
[T] DIRMINA-250Provide a test suite for a transport implementor.
[W] DIRMINA-355Modified sumup client to act as a jmeter  
javarequest

sampler
[W] DIRMINA-641Configurable memory limit for CompressionFilter
[W] DIRMINA-715Ability to set timeouts for  
NioSocketConnector.connect()


We have probably one single important bug to check : DIRMINA-738.
DIRMINA-755 has been fixed, and it was a major one.

All the other JIRA's are not really critical, and I guess that once
DIRMINA-738 has been investigated, we will be able to start a vote.

I have also added some Javadoc in many classes, but there is still a  
lot to

add. At some point, a complete code review is necessary.

Thanks !


--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com




[jira] Resolved: (DIRMINA-196) Connection shaper

2010-01-19 Thread Julien Vermillard (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julien Vermillard resolved DIRMINA-196.
---

Resolution: Won't Fix

based on a very old version

 Connection shaper
 -

 Key: DIRMINA-196
 URL: https://issues.apache.org/jira/browse/DIRMINA-196
 Project: MINA
  Issue Type: New Feature
Affects Versions: 0.9.2
Reporter: Michael Bauroth
Priority: Trivial
 Attachments: ConnectionLimitFilter_v1.java, ConnectionShapeFilter.java


 How about to add an connection shaping filter (maybe to the examples)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: MINA 2.0 bugs parade, #2

2010-01-19 Thread Julien Vermillard
Are you begging for jira karma ? 
Be carefull because we can provide it and you will be trapped in :)
I'm going to take a look.
Julien

Le Tue, 19 Jan 2010 06:01:56 -0800,
Alan D. Cabrera l...@toolazydogs.com a écrit :

 I wanted to assign an issue to myself to work on it but was unable to.
 
 
 Regards,
 Alan
 
 On Jan 19, 2010, at 4:12 AM, Emmanuel Lecharny wrote:
 
  Hi guys,
 
  some progress has been made last week. Here is the current status.
 
  Here are he remaining issues : ([B] = Bug, [I] = Improvement, [T]
  = task,
  [F] = new Feature, [W] = wish)
 
  MINA 2.0-RC2 roadmap :
  --
 
  [B] DIRMINA-539NioDatagramConnector doesn't takes the  
  TrafficClass value
  set to his DatagramSessionConfig
  [I] DIRMINA-707Add sendfile support to APR transport
  [I] DIRMINA-682We need a better documentation for the  
  ExecutorFilter
  [was :Writing more than one message will block until the  
  MessageReceived as
  been fully proceced]
  [I] DIRMINA-593Javadoc  documentation for org/apache/mina/ 
  filter/reqres
  [T] DIRMINA-756Bump up the used jars (partially fixed)
  [T] DIRMINA-708Unbound thread growth on discovery attempts :  
  Improve
  documentation
  [T] DIRMINA-477Update page about differences between 1.x and 2.x
 
  Unscheduled :
  -
  [B] DIRMINA-738Using IoEventQueueThrottler with a  
  WriteRequestFilter can
  lead to hangs
  [B] DIRMINA-737StateMachine deadlock on StateContext  
  synchronization
  [B] DIRMINA-724getScheduledWriteMessages not zero after all  
  sessions
  closed
  [B] DIRMINA-683APR transport on FreeBSD throwing Exceptions
  [B] DIRMINA-379setKeepAlive/setTcpNoDelay and exceptions in  
  Windows
  Vista
  [I] DIRMINA-752maybe move SerialAddressEditor.class to the
  mina beans
  project
  [I] DIRMINA-723OrderedThreadPoolExecutor behavior:
  configurable queue
  size, corePoolSize, maximumPoolSize
  [I] DIRMINA-657SSL Filter and IoHandler. Unassigned  
  Sanjeev
  Sachdev
  [I] DIRMINA-509DatagramConnector.connect() is slow compared to  
  connect()
  with java.net.DatagramSocket
  [I] DIRMINA-301New Multi threaded SocketIOProcessor to improve  
  fairness
  of socket reads/writes
  [F] DIRMINA-705Transport for unix local sockets based on APR
  [F] DIRMINA-655Add a more general purpose text based decoder
  [F] DIRMINA-500Cache for encoded messages.[F] DIRMINA-484 
  Datagram
  transport based on APR (Apache Portable Runtime)
  [F] DIRMINA-499Bindings for Scala
  [F] DIRMINA-389Create a Connection Throttle Filter
  [F] DIRMINA-258Example of an XML server and Client.
  [F] DIRMINA-196Connection shaper
  [F] DIRMINA-128IoSession.shutdown(TrafficMask)
  [T] DIRMINA-250Provide a test suite for a transport implementor.
  [W] DIRMINA-355Modified sumup client to act as a jmeter  
  javarequest
  sampler
  [W] DIRMINA-641Configurable memory limit for CompressionFilter
  [W] DIRMINA-715Ability to set timeouts for  
  NioSocketConnector.connect()
 
  We have probably one single important bug to check : DIRMINA-738.
  DIRMINA-755 has been fixed, and it was a major one.
 
  All the other JIRA's are not really critical, and I guess that once
  DIRMINA-738 has been investigated, we will be able to start a vote.
 
  I have also added some Javadoc in many classes, but there is still
  a lot to
  add. At some point, a complete code review is necessary.
 
  Thanks !
 
 
  -- 
  Regards,
  Cordialement,
  Emmanuel Lécharny
  www.iktek.com
 


-- 
Julien Vermillard

Archean Technologies
http://www.archean.fr


signature.asc
Description: PGP signature


Re: MINA 2.0 bugs parade, #2

2010-01-19 Thread Julien Vermillard
Ok I figured your user id.
Now you can assign you a ton of bugs :)

Le Tue, 19 Jan 2010 06:01:56 -0800,
Alan D. Cabrera l...@toolazydogs.com a écrit :

 I wanted to assign an issue to myself to work on it but was unable to.
 
 
 Regards,
 Alan
 
 On Jan 19, 2010, at 4:12 AM, Emmanuel Lecharny wrote:
 
  Hi guys,
 
  some progress has been made last week. Here is the current status.
 
  Here are he remaining issues : ([B] = Bug, [I] = Improvement, [T]
  = task,
  [F] = new Feature, [W] = wish)
 
  MINA 2.0-RC2 roadmap :
  --
 
  [B] DIRMINA-539NioDatagramConnector doesn't takes the  
  TrafficClass value
  set to his DatagramSessionConfig
  [I] DIRMINA-707Add sendfile support to APR transport
  [I] DIRMINA-682We need a better documentation for the  
  ExecutorFilter
  [was :Writing more than one message will block until the  
  MessageReceived as
  been fully proceced]
  [I] DIRMINA-593Javadoc  documentation for org/apache/mina/ 
  filter/reqres
  [T] DIRMINA-756Bump up the used jars (partially fixed)
  [T] DIRMINA-708Unbound thread growth on discovery attempts :  
  Improve
  documentation
  [T] DIRMINA-477Update page about differences between 1.x and 2.x
 
  Unscheduled :
  -
  [B] DIRMINA-738Using IoEventQueueThrottler with a  
  WriteRequestFilter can
  lead to hangs
  [B] DIRMINA-737StateMachine deadlock on StateContext  
  synchronization
  [B] DIRMINA-724getScheduledWriteMessages not zero after all  
  sessions
  closed
  [B] DIRMINA-683APR transport on FreeBSD throwing Exceptions
  [B] DIRMINA-379setKeepAlive/setTcpNoDelay and exceptions in  
  Windows
  Vista
  [I] DIRMINA-752maybe move SerialAddressEditor.class to the
  mina beans
  project
  [I] DIRMINA-723OrderedThreadPoolExecutor behavior:
  configurable queue
  size, corePoolSize, maximumPoolSize
  [I] DIRMINA-657SSL Filter and IoHandler. Unassigned  
  Sanjeev
  Sachdev
  [I] DIRMINA-509DatagramConnector.connect() is slow compared to  
  connect()
  with java.net.DatagramSocket
  [I] DIRMINA-301New Multi threaded SocketIOProcessor to improve  
  fairness
  of socket reads/writes
  [F] DIRMINA-705Transport for unix local sockets based on APR
  [F] DIRMINA-655Add a more general purpose text based decoder
  [F] DIRMINA-500Cache for encoded messages.[F] DIRMINA-484 
  Datagram
  transport based on APR (Apache Portable Runtime)
  [F] DIRMINA-499Bindings for Scala
  [F] DIRMINA-389Create a Connection Throttle Filter
  [F] DIRMINA-258Example of an XML server and Client.
  [F] DIRMINA-196Connection shaper
  [F] DIRMINA-128IoSession.shutdown(TrafficMask)
  [T] DIRMINA-250Provide a test suite for a transport implementor.
  [W] DIRMINA-355Modified sumup client to act as a jmeter  
  javarequest
  sampler
  [W] DIRMINA-641Configurable memory limit for CompressionFilter
  [W] DIRMINA-715Ability to set timeouts for  
  NioSocketConnector.connect()
 
  We have probably one single important bug to check : DIRMINA-738.
  DIRMINA-755 has been fixed, and it was a major one.
 
  All the other JIRA's are not really critical, and I guess that once
  DIRMINA-738 has been investigated, we will be able to start a vote.
 
  I have also added some Javadoc in many classes, but there is still
  a lot to
  add. At some point, a complete code review is necessary.
 
  Thanks !
 
 
  -- 
  Regards,
  Cordialement,
  Emmanuel Lécharny
  www.iktek.com
 


-- 
Julien Vermillard

Archean Technologies
http://www.archean.fr


signature.asc
Description: PGP signature


[jira] Assigned: (DIRMINA-707) Add sendfile support to APR transport

2010-01-19 Thread Alan Cabrera (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Cabrera reassigned DIRMINA-707:


Assignee: Alan Cabrera

 Add sendfile support to APR transport
 -

 Key: DIRMINA-707
 URL: https://issues.apache.org/jira/browse/DIRMINA-707
 Project: MINA
  Issue Type: Improvement
  Components: Transport
Reporter: Adam Brown
Assignee: Alan Cabrera
 Fix For: 2.0.0-RC2

 Attachments: apr-sendfile-patch.txt


 Patch to add sendfile support to APR transport

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: MINA 2.0 bugs parade, #2

2010-01-19 Thread Alan D. Cabrera

Thanks!


Regards,
Alan

On Jan 19, 2010, at 6:14 AM, Julien Vermillard wrote:


Ok I figured your user id.
Now you can assign you a ton of bugs :)

Le Tue, 19 Jan 2010 06:01:56 -0800,
Alan D. Cabrera l...@toolazydogs.com a écrit :

I wanted to assign an issue to myself to work on it but was unable  
to.



Regards,
Alan

On Jan 19, 2010, at 4:12 AM, Emmanuel Lecharny wrote:


Hi guys,

some progress has been made last week. Here is the current status.

Here are he remaining issues : ([B] = Bug, [I] = Improvement, [T]
= task,
[F] = new Feature, [W] = wish)

MINA 2.0-RC2 roadmap :
--

[B] DIRMINA-539NioDatagramConnector doesn't takes the
TrafficClass value
set to his DatagramSessionConfig
[I] DIRMINA-707Add sendfile support to APR transport
[I] DIRMINA-682We need a better documentation for the
ExecutorFilter
[was :Writing more than one message will block until the
MessageReceived as
been fully proceced]
[I] DIRMINA-593Javadoc  documentation for org/apache/mina/
filter/reqres
[T] DIRMINA-756Bump up the used jars (partially fixed)
[T] DIRMINA-708Unbound thread growth on discovery attempts :
Improve
documentation
[T] DIRMINA-477Update page about differences between 1.x and 2.x

Unscheduled :
-
[B] DIRMINA-738Using IoEventQueueThrottler with a
WriteRequestFilter can
lead to hangs
[B] DIRMINA-737StateMachine deadlock on StateContext
synchronization
[B] DIRMINA-724getScheduledWriteMessages not zero after all
sessions
closed
[B] DIRMINA-683APR transport on FreeBSD throwing Exceptions
[B] DIRMINA-379setKeepAlive/setTcpNoDelay and exceptions in
Windows
Vista
[I] DIRMINA-752maybe move SerialAddressEditor.class to the
mina beans
project
[I] DIRMINA-723OrderedThreadPoolExecutor behavior:
configurable queue
size, corePoolSize, maximumPoolSize
[I] DIRMINA-657SSL Filter and IoHandler. Unassigned
Sanjeev
Sachdev
[I] DIRMINA-509DatagramConnector.connect() is slow compared to
connect()
with java.net.DatagramSocket
[I] DIRMINA-301New Multi threaded SocketIOProcessor to improve
fairness
of socket reads/writes
[F] DIRMINA-705Transport for unix local sockets based on APR
[F] DIRMINA-655Add a more general purpose text based decoder
[F] DIRMINA-500Cache for encoded messages.[F] DIRMINA-484
Datagram
transport based on APR (Apache Portable Runtime)
[F] DIRMINA-499Bindings for Scala
[F] DIRMINA-389Create a Connection Throttle Filter
[F] DIRMINA-258Example of an XML server and Client.
[F] DIRMINA-196Connection shaper
[F] DIRMINA-128IoSession.shutdown(TrafficMask)
[T] DIRMINA-250Provide a test suite for a transport implementor.
[W] DIRMINA-355Modified sumup client to act as a jmeter
javarequest
sampler
[W] DIRMINA-641Configurable memory limit for CompressionFilter
[W] DIRMINA-715Ability to set timeouts for
NioSocketConnector.connect()

We have probably one single important bug to check : DIRMINA-738.
DIRMINA-755 has been fixed, and it was a major one.

All the other JIRA's are not really critical, and I guess that once
DIRMINA-738 has been investigated, we will be able to start a vote.

I have also added some Javadoc in many classes, but there is still
a lot to
add. At some point, a complete code review is necessary.

Thanks !


--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com





--
Julien Vermillard

Archean Technologies
http://www.archean.fr




Not sure why...

2010-01-19 Thread Alan D. Cabrera

try {
doSomeStuff();
} catch (RuntimeException e) {
throw e;
} catch (Error e) {
throw e;
} catch (Exception e) {
throw new RuntimeIoException(Failed to create a  
pollset., e);

} finally {
   cleanUp();
}

What's the point in catching and re-throwing RuntimeException and Error?


Regards,
Alan




Re: Not sure why...

2010-01-19 Thread Ashish
Where did u pulled this out from ?

On Tue, Jan 19, 2010 at 8:11 PM, Alan D. Cabrera l...@toolazydogs.com wrote:
        try {
            doSomeStuff();
        } catch (RuntimeException e) {
            throw e;
        } catch (Error e) {
            throw e;
        } catch (Exception e) {
            throw new RuntimeIoException(Failed to create a pollset., e);
        } finally {
           cleanUp();
        }

 What's the point in catching and re-throwing RuntimeException and Error?


 Regards,
 Alan






-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


[jira] Created: (DIRMINA-758) APR code needs unit tests

2010-01-19 Thread Alan Cabrera (JIRA)
APR code needs unit tests
-

 Key: DIRMINA-758
 URL: https://issues.apache.org/jira/browse/DIRMINA-758
 Project: MINA
  Issue Type: Improvement
Reporter: Alan Cabrera


The APR code should be unit tested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (DIRMINA-707) Add sendfile support to APR transport

2010-01-19 Thread Alan Cabrera (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802290#action_12802290
 ] 

Alan Cabrera commented on DIRMINA-707:
--

On second thought.  I think that hasFilename() is superfluous and that 
getFilename() returning null is good enough.  Feel free to provide argue this 
if you feel strongly.

 Add sendfile support to APR transport
 -

 Key: DIRMINA-707
 URL: https://issues.apache.org/jira/browse/DIRMINA-707
 Project: MINA
  Issue Type: Improvement
  Components: Transport
Reporter: Adam Brown
Assignee: Alan Cabrera
 Fix For: 2.0.0-RC2

 Attachments: apr-sendfile-patch.txt


 Patch to add sendfile support to APR transport

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Build failed in Hudson: MINA-trunk #205

2010-01-19 Thread Apache Hudson Server
See http://hudson.zones.apache.org/hudson/job/MINA-trunk/205/changes

Changes:

[adc] DIRMINA-707 Add sendfile support to APR transport

--
Started by an SCM change
Building remotely on vesta.apache.org (Ubuntu)
Updating https://svn.apache.org/repos/asf/mina/trunk
U core/src/main/java/org/apache/mina/proxy/ProxyConnector.java
U core/src/main/java/org/apache/mina/core/file/FileRegion.java
A core/src/main/java/org/apache/mina/core/file/FilenameFileRegion.java
U core/src/main/java/org/apache/mina/core/file/DefaultFileRegion.java
U 
core/src/main/java/org/apache/mina/core/service/AbstractIoConnector.java
U 
core/src/main/java/org/apache/mina/core/service/IoServiceListenerSupport.java
U core/src/main/java/org/apache/mina/core/service/AbstractIoService.java
U core/src/main/java/org/apache/mina/core/session/AbstractIoSession.java
U core/src/main/java/org/apache/mina/core/session/DummySession.java
U 
core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoAcceptor.java
U 
core/src/main/java/org/apache/mina/core/polling/AbstractPollingConnectionlessIoAcceptor.java
U 
core/src/main/java/org/apache/mina/core/polling/AbstractPollingIoConnector.java
U 
core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeAcceptor.java
U 
core/src/main/java/org/apache/mina/transport/vmpipe/VmPipeConnector.java
U core/src/main/java/org/apache/mina/util/ExceptionMonitor.java
U core/src/main/java/org/apache/mina/util/DefaultExceptionMonitor.java
U 
transport-serial/src/main/java/org/apache/mina/transport/serial/SerialConnector.java
U 
transport-apr/src/main/java/org/apache/mina/transport/socket/apr/AprIoProcessor.java
At revision 900810
Parsing POMs
ERROR: Failed to parse POMs
java.io.IOException: Cannot run program java (in directory 
http://hudson.zones.apache.org/hudson/job/MINA-trunk/ws/trunk;): 
java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at hudson.Proc$LocalProc.init(Proc.java:148)
at hudson.Proc$LocalProc.init(Proc.java:120)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:633)
at hudson.Launcher$ProcStarter.start(Launcher.java:268)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:775)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:753)
at hudson.remoting.UserRequest.perform(UserRequest.java:104)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:236)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or 
directory
at java.lang.UNIXProcess.init(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 15 more



[jira] Commented: (DIRMINA-758) APR code needs unit tests

2010-01-19 Thread Julien Vermillard (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802293#action_12802293
 ] 

Julien Vermillard commented on DIRMINA-758:
---

the main problem is to automagicly install the tomcat native libs with maven, 
any idea ?

 APR code needs unit tests
 -

 Key: DIRMINA-758
 URL: https://issues.apache.org/jira/browse/DIRMINA-758
 Project: MINA
  Issue Type: Improvement
Reporter: Alan Cabrera

 The APR code should be unit tested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (DIRMINA-758) APR code needs unit tests

2010-01-19 Thread Alan Cabrera (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802296#action_12802296
 ] 

Alan Cabrera commented on DIRMINA-758:
--

Hmmm, good point.  How does Tomcat test?

I was thinking of using profiles, or something like that.

 APR code needs unit tests
 -

 Key: DIRMINA-758
 URL: https://issues.apache.org/jira/browse/DIRMINA-758
 Project: MINA
  Issue Type: Improvement
Reporter: Alan Cabrera

 The APR code should be unit tested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Resolved: (DIRMINA-707) Add sendfile support to APR transport

2010-01-19 Thread Alan Cabrera (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Cabrera resolved DIRMINA-707.
--

Resolution: Fixed

Many thanks.

 Add sendfile support to APR transport
 -

 Key: DIRMINA-707
 URL: https://issues.apache.org/jira/browse/DIRMINA-707
 Project: MINA
  Issue Type: Improvement
  Components: Transport
Reporter: Adam Brown
Assignee: Alan Cabrera
 Fix For: 2.0.0-RC2

 Attachments: apr-sendfile-patch.txt


 Patch to add sendfile support to APR transport

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Not sure why...

2010-01-19 Thread Alan D. Cabrera

org.apache.mina.transport.socket.apr.AprIoProcessor


Regards,
Alan

On Jan 19, 2010, at 6:44 AM, Ashish wrote:


Where did u pulled this out from ?

On Tue, Jan 19, 2010 at 8:11 PM, Alan D. Cabrera  
l...@toolazydogs.com wrote:

   try {
   doSomeStuff();
   } catch (RuntimeException e) {
   throw e;
   } catch (Error e) {
   throw e;
   } catch (Exception e) {
   throw new RuntimeIoException(Failed to create a  
pollset., e);

   } finally {
  cleanUp();
   }

What's the point in catching and re-throwing RuntimeException and  
Error?



Regards,
Alan







--
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal




[jira] Commented: (DIRMINA-758) APR code needs unit tests

2010-01-19 Thread Julien Vermillard (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802302#action_12802302
 ] 

Julien Vermillard commented on DIRMINA-758:
---

I think if we want to do that, we need to fix tomcat native first :
it's not maven based and the test suite is supposed to be run on an environment 
with all the native libs deployed.
http://svn.apache.org/repos/asf/tomcat/native/trunk/


 APR code needs unit tests
 -

 Key: DIRMINA-758
 URL: https://issues.apache.org/jira/browse/DIRMINA-758
 Project: MINA
  Issue Type: Improvement
Reporter: Alan Cabrera

 The APR code should be unit tested.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Not sure why...

2010-01-19 Thread Ashish
Well I think only Exception could be the only case needed. However,
catching generic Exception means any error, a specific Exception
caught is better,

BTW, the catch(Error e) {} stuff has been caught by IntelliJ Inspections.

Just one more thing that I noted in the class, there are no log
statements. Dom't we need them?


On Tue, Jan 19, 2010 at 8:42 PM, Alan D. Cabrera l...@toolazydogs.com wrote:
 org.apache.mina.transport.socket.apr.AprIoProcessor


 Regards,
 Alan

 On Jan 19, 2010, at 6:44 AM, Ashish wrote:

 Where did u pulled this out from ?

 On Tue, Jan 19, 2010 at 8:11 PM, Alan D. Cabrera l...@toolazydogs.com
 wrote:

       try {
           doSomeStuff();
       } catch (RuntimeException e) {
           throw e;
       } catch (Error e) {
           throw e;
       } catch (Exception e) {
           throw new RuntimeIoException(Failed to create a pollset., e);
       } finally {
          cleanUp();
       }

 What's the point in catching and re-throwing RuntimeException and Error?


 Regards,
 Alan






 --
 thanks
 ashish

 Blog: http://www.ashishpaliwal.com/blog
 My Photo Galleries: http://www.pbase.com/ashishpaliwal





-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


Re: MINA 2.0 bugs parade, #2

2010-01-19 Thread Ashish
Shall give IRMINA-593 a try ASAP. I did some work earlier for
documenting the stuff, but lost the stuff when I changed my
organization :-(

Getting documentation around it shall be tricky. There is a SMPP
server example attached to the JIRA. If it works, will try to see the
execution details, as I already have SMPP client with me...

thanks

On Tue, Jan 19, 2010 at 5:42 PM, Emmanuel Lecharny elecha...@apache.org wrote:
 Hi guys,

 some progress has been made last week. Here is the current status.

 Here are he remaining issues : ([B] = Bug, [I] = Improvement, [T] = task,
 [F] = new Feature, [W] = wish)

 MINA 2.0-RC2 roadmap :
 --

 [B] DIRMINA-539    NioDatagramConnector doesn't takes the TrafficClass value
 set to his DatagramSessionConfig
 [I] DIRMINA-707    Add sendfile support to APR transport
 [I] DIRMINA-682    We need a better documentation for the ExecutorFilter
 [was :Writing more than one message will block until the MessageReceived as
 been fully proceced]
 [I] DIRMINA-593    Javadoc  documentation for org/apache/mina/filter/reqres
 [T] DIRMINA-756    Bump up the used jars (partially fixed)
 [T] DIRMINA-708    Unbound thread growth on discovery attempts : Improve
 documentation
 [T] DIRMINA-477    Update page about differences between 1.x and 2.x

 Unscheduled :
 -
 [B] DIRMINA-738    Using IoEventQueueThrottler with a WriteRequestFilter can
 lead to hangs
 [B] DIRMINA-737    StateMachine deadlock on StateContext synchronization
 [B] DIRMINA-724    getScheduledWriteMessages not zero after all sessions
 closed
 [B] DIRMINA-683    APR transport on FreeBSD throwing Exceptions
 [B] DIRMINA-379    setKeepAlive/setTcpNoDelay and exceptions in Windows
 Vista
 [I] DIRMINA-752    maybe move SerialAddressEditor.class to the mina beans
 project
 [I] DIRMINA-723    OrderedThreadPoolExecutor behavior: configurable queue
 size, corePoolSize, maximumPoolSize
 [I] DIRMINA-657    SSL Filter and IoHandler.     Unassigned     Sanjeev
 Sachdev
 [I] DIRMINA-509    DatagramConnector.connect() is slow compared to connect()
 with java.net.DatagramSocket
 [I] DIRMINA-301    New Multi threaded SocketIOProcessor to improve fairness
 of socket reads/writes
 [F] DIRMINA-705    Transport for unix local sockets based on APR
 [F] DIRMINA-655    Add a more general purpose text based decoder
 [F] DIRMINA-500    Cache for encoded messages.[F] DIRMINA-484    Datagram
 transport based on APR (Apache Portable Runtime)
 [F] DIRMINA-499    Bindings for Scala
 [F] DIRMINA-389    Create a Connection Throttle Filter
 [F] DIRMINA-258    Example of an XML server and Client.
 [F] DIRMINA-196    Connection shaper
 [F] DIRMINA-128    IoSession.shutdown(TrafficMask)
 [T] DIRMINA-250    Provide a test suite for a transport implementor.
 [W] DIRMINA-355    Modified sumup client to act as a jmeter javarequest
 sampler
 [W] DIRMINA-641    Configurable memory limit for CompressionFilter
 [W] DIRMINA-715    Ability to set timeouts for NioSocketConnector.connect()

 We have probably one single important bug to check : DIRMINA-738.
 DIRMINA-755 has been fixed, and it was a major one.

 All the other JIRA's are not really critical, and I guess that once
 DIRMINA-738 has been investigated, we will be able to start a vote.

 I have also added some Javadoc in many classes, but there is still a lot to
 add. At some point, a complete code review is necessary.

 Thanks !


 --
 Regards,
 Cordialement,
 Emmanuel Lécharny
 www.iktek.com




-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


[MINA 3.0] Debugging toolkit

2010-01-19 Thread Ashish
Had picked this form one the discussion threads and added to the MINA
3.0 design page, so that we don't loose this.

had some initial thoughts around this, like we can some kind of
visualization tool build around MINA, which can help us see/debug
the MINA based System. One can view number of IoSession's, IoChain's,
configuration etc.
It could be build as an Eclipse plugin or a standalone UI talking to
MINA code via JMX.

I am not sure, but we can see if we can extend ProtoTiger as a
debugging/visualization tool.

These are just some initial thought, will refine the understanding as
we progress further with 3.0 design.

Any suggestion?

-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


Re : Not sure why...

2010-01-19 Thread Edouard De Oliveira
The point is to react differently in case of different exceptions 
but exceptions must be sorted from specific exceptions to generic ones
it can also be done by catching exception and using instanceof statements

my 2 cents :)

 Cordialement, Regards,
-Edouard De Oliveira-
Blog: http://tedorgwp.free.fr
WebSite: http://tedorg.free.fr/en/main.php



- Message d'origine 
De : Alan D. Cabrera l...@toolazydogs.com
À : dev@mina.apache.org
Envoyé le : Mar 19 Janvier 2010, 16 h 12 min 41 s
Objet : Re: Not sure why...

org.apache.mina.transport.socket.apr.AprIoProcessor


Regards,
Alan

On Jan 19, 2010, at 6:44 AM, Ashish wrote:

 Where did u pulled this out from ?
 
 On Tue, Jan 19, 2010 at 8:11 PM, Alan D. Cabrera l...@toolazydogs.com wrote:
try {
doSomeStuff();
} catch (RuntimeException e) {
throw e;
} catch (Error e) {
throw e;
} catch (Exception e) {
throw new RuntimeIoException(Failed to create a pollset., e);
} finally {
   cleanUp();
}
 
 What's the point in catching and re-throwing RuntimeException and Error?
 
 
 Regards,
 Alan
 
 
 
 
 
 
 --thanks
 ashish
 
 Blog: http://www.ashishpaliwal.com/blog
 My Photo Galleries: http://www.pbase.com/ashishpaliwal






Re: MINA 2.0 bugs parade, #2

2010-01-19 Thread Julien Vermillard
Le Tue, 19 Jan 2010 13:12:28 +0100,
Emmanuel Lecharny elecha...@apache.org a écrit :

 Hi guys,
 
 some progress has been made last week. Here is the current status.
 
 Here are he remaining issues : ([B] = Bug, [I] = Improvement, [T] =
 task, [F] = new Feature, [W] = wish)
 
 MINA 2.0-RC2 roadmap :
 --
 
 [B] DIRMINA-539NioDatagramConnector doesn't takes the
 TrafficClass value set to his DatagramSessionConfig
 [I] DIRMINA-707Add sendfile support to APR transport
 [I] DIRMINA-682We need a better documentation for the
 ExecutorFilter [was :Writing more than one message will block until
 the MessageReceived as been fully proceced]
 [I] DIRMINA-593Javadoc  documentation for
 org/apache/mina/filter/reqres [T] DIRMINA-756Bump up the used
 jars (partially fixed) [T] DIRMINA-708Unbound thread growth on
 discovery attempts : Improve documentation
 [T] DIRMINA-477Update page about differences between 1.x and 2.x
 
 Unscheduled :
 -
 [B] DIRMINA-738Using IoEventQueueThrottler with a
 WriteRequestFilter can lead to hangs
 [B] DIRMINA-737StateMachine deadlock on StateContext
 synchronization [B] DIRMINA-724getScheduledWriteMessages not zero
 after all sessions closed
 [B] DIRMINA-683APR transport on FreeBSD throwing Exceptions
 [B] DIRMINA-379setKeepAlive/setTcpNoDelay and exceptions in
 Windows Vista
 [I] DIRMINA-752maybe move SerialAddressEditor.class to the mina
 beans project
 [I] DIRMINA-723OrderedThreadPoolExecutor behavior: configurable
 queue size, corePoolSize, maximumPoolSize
 [I] DIRMINA-657SSL Filter and IoHandler. Unassigned
 Sanjeev Sachdev
 [I] DIRMINA-509DatagramConnector.connect() is slow compared to
 connect() with java.net.DatagramSocket
 [I] DIRMINA-301New Multi threaded SocketIOProcessor to improve
 fairness of socket reads/writes
 [F] DIRMINA-705Transport for unix local sockets based on APR
 [F] DIRMINA-655Add a more general purpose text based decoder
 [F] DIRMINA-500Cache for encoded messages.[F] DIRMINA-484
 Datagram transport based on APR (Apache Portable Runtime)
 [F] DIRMINA-499Bindings for Scala
 [F] DIRMINA-389Create a Connection Throttle Filter
 [F] DIRMINA-258Example of an XML server and Client.
 [F] DIRMINA-196Connection shaper
 [F] DIRMINA-128IoSession.shutdown(TrafficMask)
 [T] DIRMINA-250Provide a test suite for a transport implementor.
 [W] DIRMINA-355Modified sumup client to act as a jmeter
 javarequest sampler
 [W] DIRMINA-641Configurable memory limit for CompressionFilter
 [W] DIRMINA-715Ability to set timeouts for
 NioSocketConnector.connect()
 
 We have probably one single important bug to check : DIRMINA-738.
 DIRMINA-755 has been fixed, and it was a major one.
 
 All the other JIRA's are not really critical, and I guess that once
 DIRMINA-738 has been investigated, we will be able to start a vote.
 
 I have also added some Javadoc in many classes, but there is still a
 lot to add. At some point, a complete code review is necessary.
 
 Thanks !
 
 

Cleared a bunch of unscheduled issues.
Remaining unscheduled issues : 
https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=10670fixfor=-1resolution=-1sorter/field=prioritysorter/order=DESC

BTW how do you did your fancy txt export ?

-- 
Julien Vermillard

Archean Technologies
http://www.archean.fr


signature.asc
Description: PGP signature


Re: Not sure why...

2010-01-19 Thread Emmanuel Lecharny

Ashish a écrit :

Where did u pulled this out from ?
  

NO ! Alan, please, no need to tell ;)

Seriously, it stinks ;)

--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com




Re: Re : Not sure why...

2010-01-19 Thread Alan D. Cabrera

In practice this is true.  But in this instance we do nothing.


Regards,
Alan

On Jan 19, 2010, at 9:16 AM, Edouard De Oliveira wrote:


The point is to react differently in case of different exceptions
but exceptions must be sorted from specific exceptions to generic ones
it can also be done by catching exception and using instanceof  
statements


my 2 cents :)

Cordialement, Regards,
-Edouard De Oliveira-
Blog: http://tedorgwp.free.fr
WebSite: http://tedorg.free.fr/en/main.php



- Message d'origine 
De : Alan D. Cabrera l...@toolazydogs.com
À : dev@mina.apache.org
Envoyé le : Mar 19 Janvier 2010, 16 h 12 min 41 s
Objet : Re: Not sure why...

org.apache.mina.transport.socket.apr.AprIoProcessor


Regards,
Alan

On Jan 19, 2010, at 6:44 AM, Ashish wrote:


Where did u pulled this out from ?

On Tue, Jan 19, 2010 at 8:11 PM, Alan D. Cabrera l...@toolazydogs.com 
 wrote:

  try {
  doSomeStuff();
  } catch (RuntimeException e) {
  throw e;
  } catch (Error e) {
  throw e;
  } catch (Exception e) {
  throw new RuntimeIoException(Failed to create a  
pollset., e);

  } finally {
 cleanUp();
  }

What's the point in catching and re-throwing RuntimeException and  
Error?



Regards,
Alan







--thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal









Re: MINA 2.0 bugs parade, #2

2010-01-19 Thread Emmanuel Lecharny



BTW how do you did your fancy txt export ?
  

keyboard and patience ...


--
Regards,
Cordialement,
Emmanuel Lécharny
www.nextury.com




Re: Not sure why...

2010-01-19 Thread Emmanuel LŽcharny

Alan D. Cabrera a écrit :




Just one more thing that I noted in the class, there are no log
statements. Dom't we need them?


I'm against logging exceptions if we're re-throwing them unless we 
print out some critical piece of information that cannot be discerned 
by any other method.  I say this from experience where I had to slog 
through millions of log statements generated by one exception where 
every well meaning layer printed something out.

IMO, we should log :
- where we got the exception if we now that no log has already been 
generated

- if and only if the log adds some value to what has already be loaded
- In some case, it might be interesting to use a specific logger. For 
instance, if you grab a new connection to a LDAP serve,r and get an 
exception, using a dedicated logger can help when analysing specifically 
all the LDAP related issues.


Logging too much is deadly... Not logging enough is deadly too.  Use 
common sense, test you code, and check if you are just logging enough 
and not too much.




Re: Not sure why...

2010-01-19 Thread Alan D. Cabrera


On Jan 19, 2010, at 10:45 AM, Emmanuel LŽcharny wrote:


Alan D. Cabrera a écrit :




Just one more thing that I noted in the class, there are no log
statements. Dom't we need them?


I'm against logging exceptions if we're re-throwing them unless we  
print out some critical piece of information that cannot be  
discerned by any other method.  I say this from experience where I  
had to slog through millions of log statements generated by one  
exception where every well meaning layer printed something out.

IMO, we should log :
- where we got the exception if we know that no log has already been  
generated


I'm against this since you usually have no idea if someone else has  
logged the error.



- if and only if the log adds some value to what has already be loaded


Agreed.  I think that unless we print out some critical piece of  
information that cannot be discerned by any other method. catches  
this case.


- In some case, it might be interesting to use a specific logger.  
For instance, if you grab a new connection to a LDAP serve,r and get  
an exception, using a dedicated logger can help when analysing  
specifically all the LDAP related issues.


Interesting idea but my experience has been that you need a larger  
context to make sense of things.  I think that if we did have a  
dedicated logger then we would log to both w/ the chattier logging  
going to the dedicated logger.



Regards,
Alan



Re: Not sure why...

2010-01-19 Thread Emmanuel LŽcharny

Alan D. Cabrera a écrit :

IMO, we should log :
- where we got the exception if we know that no log has already been 
generated


I'm against this since you usually have no idea if someone else has 
logged the error.
When you are writing a framework, you are the one responsible for 
logging, nobody else will do that for you. This is why I think it's 
important to log as close as possible to the place the error was produced.


- In some case, it might be interesting to use a specific logger. For 
instance, if you grab a new connection to a LDAP serve,r and get an 
exception, using a dedicated logger can help when analysing 
specifically all the LDAP related issues.


Interesting idea but my experience has been that you need a larger 
context to make sense of things.  I think that if we did have a 
dedicated logger then we would log to both w/ the chattier logging 
going to the dedicated logger.
Not necessarily. I have written such system where dedicated logs were 
produced (mainly JDBC or LDAP or whatever technical system) but not 
duplicated in the mail logs, or with less detailed errors.


Anyway, most of the case you'll will be able to know when you added too 
many logs by running the code you have added some logs to.


Re: Not sure why...

2010-01-19 Thread Emmanuel LŽcharny

Alan D. Cabrera a écrit :


On Jan 19, 2010, at 7:31 AM, Ashish wrote:


Well I think only Exception could be the only case needed. However,
catching generic Exception means any error, a specific Exception
caught is better.


The other odd thing is that it catches the checked exception and wraps 
it in a runtime exception.  This strikes me as a poor practice.

To say the least ...

Added on 
http://svn.apache.org/viewvc/mina/trunk/transport-apr/src/main/java/org/apache/mina/transport/socket/apr/AprIoProcessor.java?r1=593014r2=596587


Why am I not surprised ? ...

Here, tomcat-APR just throw a java.lang.Exception instance, not a 
Runtime or an Error :


http://svn.apache.org/viewvc/tomcat/native/tags/TOMCAT_NATIVE_1_1_19/native/src/error.c?revision=896054view=markup

/*
39 * Convenience function to help throw an java.lang.Exception.
40 */
41void tcn_ThrowException(JNIEnv *env, const char *msg)
42{
43jclass javaExceptionClass;
44   
45javaExceptionClass = (*env)-FindClass(env, 
java/lang/Exception);

46if (javaExceptionClass == NULL) {
47fprintf(stderr, Cannot find java/lang/Exception class\n);
48return;
49}
50(*env)-ThrowNew(env, javaExceptionClass, msg);
51(*env)-DeleteLocalRef(env, javaExceptionClass);
52   
53}


We can simply catch it and do whatever we want with it.


Re: Not sure why...

2010-01-19 Thread Ashish

 Well I think only Exception could be the only case needed. However,
 catching generic Exception means any error, a specific Exception
 caught is better.

 The other odd thing is that it catches the checked exception and wraps it in
 a runtime exception.  This strikes me as a poor practice.

 BTW, the catch(Error e) {} stuff has been caught by IntelliJ Inspections.

 Just one more thing that I noted in the class, there are no log
 statements. Dom't we need them?

 I'm against logging exceptions if we're re-throwing them unless we print out
 some critical piece of information that cannot be discerned by any other
 method.  I say this from experience where I had to slog through millions of
 log statements generated by one exception where every well meaning layer
 printed something out.

Alan, my comment was in general, not specific to Exception clause :-)
The class doesn't have logging at all :-(


 Regards,
 Alan





-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


Re: Not sure why...

2010-01-19 Thread Alan D. Cabrera


On Jan 19, 2010, at 6:44 PM, Ashish wrote:




Well I think only Exception could be the only case needed. However,
catching generic Exception means any error, a specific Exception
caught is better.


The other odd thing is that it catches the checked exception and  
wraps it in

a runtime exception.  This strikes me as a poor practice.

BTW, the catch(Error e) {} stuff has been caught by IntelliJ  
Inspections.


Just one more thing that I noted in the class, there are no log
statements. Dom't we need them?


I'm against logging exceptions if we're re-throwing them unless we  
print out
some critical piece of information that cannot be discerned by any  
other
method.  I say this from experience where I had to slog through  
millions of
log statements generated by one exception where every well meaning  
layer

printed something out.


Alan, my comment was in general, not specific to Exception clause :-)
The class doesn't have logging at all :-(


Duh.  I misread the post.  Sorry.  :(

You and I are of the same mind on this.  :)


Regards,
Alan



Re: Not sure why...

2010-01-19 Thread Alan D. Cabrera


On Jan 19, 2010, at 3:15 PM, Emmanuel LŽcharny wrote:


Alan D. Cabrera a écrit :


On Jan 19, 2010, at 7:31 AM, Ashish wrote:


Well I think only Exception could be the only case needed. However,
catching generic Exception means any error, a specific Exception
caught is better.


The other odd thing is that it catches the checked exception and  
wraps it in a runtime exception.  This strikes me as a poor practice.

To say the least ...

Added on 
http://svn.apache.org/viewvc/mina/trunk/transport-apr/src/main/java/org/apache/mina/transport/socket/apr/AprIoProcessor.java?r1=593014r2=596587

Why am I not surprised ? ...

Here, tomcat-APR just throw a java.lang.Exception instance, not a  
Runtime or an Error :


http://svn.apache.org/viewvc/tomcat/native/tags/TOMCAT_NATIVE_1_1_19/native/src/error.c?revision=896054view=markup

/*
39 * Convenience function to help throw an java.lang.Exception.
40 */
41void tcn_ThrowException(JNIEnv *env, const char *msg)
42{
43jclass javaExceptionClass;
44   45javaExceptionClass = (*env)-FindClass(env, java/ 
lang/Exception);

46if (javaExceptionClass == NULL) {
47fprintf(stderr, Cannot find java/lang/Exception class 
\n);

48return;
49}
50(*env)-ThrowNew(env, javaExceptionClass, msg);
51(*env)-DeleteLocalRef(env, javaExceptionClass);
52   53}

We can simply catch it and do whatever we want with it.


In this case, I think the constructor should be throwing an  
IOException.  Anyone mind if I remove the places where we removed the  
checked exceptions?



Regards,
Alan




[jira] Commented: (DIRMINA-258) Example of an XML server and Client.

2010-01-19 Thread Mark Webb (JIRA)

[ 
https://issues.apache.org/jira/browse/DIRMINA-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12802665#action_12802665
 ] 

Mark Webb commented on DIRMINA-258:
---

I think handing this off to Ashish might be a good idea.  He seems to know what 
we need and since he is asking I have no problems handing it off.

 Example of an XML server and Client.
 

 Key: DIRMINA-258
 URL: https://issues.apache.org/jira/browse/DIRMINA-258
 Project: MINA
  Issue Type: New Feature
Reporter: Martin Helmhout
Assignee: Mark Webb
Priority: Minor
 Attachments: MINA_XMLServer.zip, MINA_XMLServer.zip, XMLserver095.zip


 The attachment contains an example of an XML Server + client and should help 
 start people building their server quickly.
 Because an XML server was not in the examples, I created quickly something 
 for myself, but want others to also get the fruits and make them better if 
 possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: Not sure why...

2010-01-19 Thread Ashish
 We can simply catch it and do whatever we want with it.

 In this case, I think the constructor should be throwing an IOException.
  Anyone mind if I remove the places where we removed the checked exceptions?


I am afraid, we have already freezed the API, so not sure if we should do this.


 Regards,
 Alan






-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal


Re: Not sure why...

2010-01-19 Thread Alan D. Cabrera


On Jan 19, 2010, at 8:58 PM, Ashish wrote:


We can simply catch it and do whatever we want with it.


In this case, I think the constructor should be throwing an  
IOException.
 Anyone mind if I remove the places where we removed the checked  
exceptions?




I am afraid, we have already freezed the API, so not sure if we  
should do this.


Good point.  3.0 it is.


Regards,
Alan



[jira] Assigned: (DIRMINA-258) Example of an XML server and Client.

2010-01-19 Thread Ashish Paliwal (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashish Paliwal reassigned DIRMINA-258:
--

Assignee: Ashish Paliwal  (was: Mark Webb)

 Example of an XML server and Client.
 

 Key: DIRMINA-258
 URL: https://issues.apache.org/jira/browse/DIRMINA-258
 Project: MINA
  Issue Type: New Feature
Reporter: Martin Helmhout
Assignee: Ashish Paliwal
Priority: Minor
 Attachments: MINA_XMLServer.zip, MINA_XMLServer.zip, XMLserver095.zip


 The attachment contains an example of an XML Server + client and should help 
 start people building their server quickly.
 Because an XML server was not in the examples, I created quickly something 
 for myself, but want others to also get the fruits and make them better if 
 possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (DIRMINA-258) Example of an XML server and Client.

2010-01-19 Thread Ashish Paliwal (JIRA)

 [ 
https://issues.apache.org/jira/browse/DIRMINA-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashish Paliwal updated DIRMINA-258:
---

  Component/s: Example
Fix Version/s: 3.0.0-M1

Moved to 3.0

 Example of an XML server and Client.
 

 Key: DIRMINA-258
 URL: https://issues.apache.org/jira/browse/DIRMINA-258
 Project: MINA
  Issue Type: New Feature
  Components: Example
Reporter: Martin Helmhout
Assignee: Ashish Paliwal
Priority: Minor
 Fix For: 3.0.0-M1

 Attachments: MINA_XMLServer.zip, MINA_XMLServer.zip, XMLserver095.zip


 The attachment contains an example of an XML Server + client and should help 
 start people building their server quickly.
 Because an XML server was not in the examples, I created quickly something 
 for myself, but want others to also get the fruits and make them better if 
 possible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.