You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jacek Laskowski <ja...@japila.pl> on 2011/09/26 14:32:13 UTC
Re: svn commit: r1175732 - /openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
On Mon, Sep 26, 2011 at 11:09 AM, <an...@apache.org> wrote:
> Author: andygumbrecht
> Date: Mon Sep 26 09:09:56 2011
> New Revision: 1175732
>
> URL: http://svn.apache.org/viewvc?rev=1175732&view=rev
> Log:
> Fix: InputStream was not being explicitly closed - Socket close.
> Removed per request debug/error String declaration.
> Ensure streams are closed at all levels as read/writeExternal may fail.
>
> Modified:
> openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
...
> + private static String getTypeName(final byte requestType) {
> + switch (requestType) {
> + case RequestMethodConstants.EJB_REQUEST:
> + return "EJB_REQUEST";
> + case RequestMethodConstants.JNDI_REQUEST:
> + return "JNDI_REQUEST";
> + case RequestMethodConstants.AUTH_REQUEST:
> + return "AUTH_REQUEST";
> + default:
> + return requestType + " (UNKNOWN)";
> + }
> + }
That struck me and led to believing that it begs for an enum, doesn't it?
Jacek
--
Jacek Laskowski
Java EE, functional languages and IBM WebSphere - http://blog.japila.pl
Warszawa JUG conference = Confitura (formerly Javarsovia) :: http://confitura.pl
Re: svn commit: r1175732 - /openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
Posted by David Blevins <da...@gmail.com>.
On Sep 26, 2011, at 5:32 AM, Jacek Laskowski wrote:
> On Mon, Sep 26, 2011 at 11:09 AM, <an...@apache.org> wrote:
>> Author: andygumbrecht
>> Date: Mon Sep 26 09:09:56 2011
>> New Revision: 1175732
>>
>> URL: http://svn.apache.org/viewvc?rev=1175732&view=rev
>> Log:
>> Fix: InputStream was not being explicitly closed - Socket close.
>> Removed per request debug/error String declaration.
>> Ensure streams are closed at all levels as read/writeExternal may fail.
>>
>> Modified:
>> openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbDaemon.java
> ...
>> + private static String getTypeName(final byte requestType) {
>> + switch (requestType) {
>> + case RequestMethodConstants.EJB_REQUEST:
>> + return "EJB_REQUEST";
>> + case RequestMethodConstants.JNDI_REQUEST:
>> + return "JNDI_REQUEST";
>> + case RequestMethodConstants.AUTH_REQUEST:
>> + return "AUTH_REQUEST";
>> + default:
>> + return requestType + " (UNKNOWN)";
>> + }
>> + }
>
> That struck me and led to believing that it begs for an enum, doesn't it?
>
Indeed. That is one of the oldest JIRAs:
Reimplement protocol with enum grammar
https://issues.apache.org/jira/browse/OPENEJB-82
-David