geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject Fwd: EOFException in ActiveMQ 4.1.2
Date Tue, 21 Dec 2010 09:29:47 GMT
Forgot to cc activemq user list.

---------- Forwarded message ----------
From: Ivan <xhhsld@gmail.com>
Date: 2010/12/21
Subject: Re: EOFException in ActiveMQ 4.1.2
To: dev@geronimo.apache.org


Finally, I found the codes caused this, it is related to activemq resource
adapter.
In the finally block, connection.close() is called, while at this time, the
wireformat handshake might not finished, closing the client socket might
caused the EOF exception or reset exception on the server side.
Another issue is that, I found that the return value of makeConnection() is
an instance of ActiveMQConnection, not the ActiveMQXAConnection, so it never
returns the XAResource used for transcation recovery.
Thougths ? thanks.
--->
ActiveMQResourceAdapter.java
public XAResource[] getXAResources(ActivationSpec[] activationSpecs) throws
ResourceException {
        Connection connection = null;
        try {
            connection = makeConnection();
            if (connection instanceof XAConnection) {
                XASession session = ((XAConnection)
connection).createXASession();
                XAResource xaResource = session.getXAResource();
                return new XAResource[] { xaResource };
            } else {
                return new XAResource[] {};
            }
        } catch (JMSException e) {
            throw new ResourceException(e);
        } finally {
            try {
                connection.close();
            } catch (Throwable ignore) {
            }
        }
    }
<---



2010/12/20 Ivan <xhhsld@gmail.com>

No, you might find those error messages while restarting the deployed
> application sometimes.
>
> 2010/12/20 Kevan Miller <kevan.miller@gmail.com>
>
>
>> On Dec 19, 2010, at 7:19 AM, Shawn Jiang wrote:
>>
>> > Similar exceptions in geronimo 2.2.1 when connecting to derby during a
>>  recovery process.
>> >
>> > https://issues.apache.org/jira/browse/GERONIMO-5736
>> >
>> > Is it possible that some context is not there when txmanager is trying
>> to do the recovery ?
>>
>> The Derby issue seems different to me, though the underlying processing
>> (transaction recovery) is the same. The Derby problem seems to be an
>> authentication issue:
>>
>> [INFO] Caused by: java.sql.SQLException: Connection authentication failure
>> occurred. Reason: Invalid authentication..
>> [INFO] at
>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
>> Source)
>> [INFO] at
>> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
>> Source)
>> [INFO] ... 62 more
>>
>> I assume we're missing appropriate configuration with the recent Embedded
>> Derby authentication changes.
>>
>> The ActiveMQ problem sounds like a timing issue: I would guess that
>> perhaps the Server is not always fully started when the managed connections
>> are being created? I assume this only happens once and then the problem
>> disappears?
>>
>> --kevan
>
>
>
>
> --
> Ivan
>



-- 
Ivan



-- 
Ivan

Mime
View raw message