On Sep 26, 2011, at 5:32 AM, Jacek Laskowski wrote:

> On Mon, Sep 26, 2011 at 11:09 AM,  <[email protected]> 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

Reply via email to