If anyone interest.

 We have splitted the connection pool for producers and consumers. Becuase,
otherwise producers/consumers are sharing, sesstions, transancions,... And
because of the error, we figured, that maybe this is the problem. We also
added, some timeouts and othe settings.

Our configuration:


<Resource id="jms/genericAdapter" type="ActiveMQResourceAdapter">
        BrokerXmlConfig =
        ServerUrl       =  failover:(tcp://
10.1.1.1:61616?trace=true&amp;keepAlive=true&amp;soTimeout=10000&amp;connectionTimeout=10000&amp;soWriteTimeout=10000&amp;closeAsync=false
<http://10.1.1.1:61616/?trace=true&amp;keepAlive=true&amp;soTimeout=10000&amp;connectionTimeout=10000&amp;soWriteTimeout=10000&amp;closeAsync=false>
)
</Resource>

<Resource id="jms/genericAdapterRead" type="ActiveMQResourceAdapter">
        BrokerXmlConfig =
        ServerUrl       =  failover:(tcp://
10.1.1.1:61616?trace=false&amp;keepAlive=true&amp;soTimeout=10000&amp;connectionTimeout=10000&amp;soWriteTimeout=10000&amp;closeAsync=false
<http://10.1.1.1:61616/?trace=false&amp;keepAlive=true&amp;soTimeout=10000&amp;connectionTimeout=10000&amp;soWriteTimeout=10000&amp;closeAsync=false>
)
</Resource>

<Resource id="jms/genericFactory" type="javax.jms.ConnectionFactory">
        ResourceAdapter = jms/genericAdapter
</Resource>

<Container id="jms/genericContainer" ctype="MESSAGE">
        ResourceAdapter = jms/genericAdapterRead
</Container>

This seems to work now.

BR

MAtej

2014-10-11 16:21 GMT+02:00 Matej <gma...@gmail.com>:

> Hello all.
>
> I am using TomEE and an external ActiveMQ deployment 5.10. Everything
> works gret until we get and IllegalStateExeption from ActiveMQ. After that
> Tomee cant send messages anymore giving exceptions like that:
>
> Caused by: org.apache.activemq.ConnectionClosedException: The connection
> is already closed
>
> I am using the failover directive already, which doesn't help.
>
> I looked at the code, which is a litlle complex.Don't know if is a Tomee
> connection pooling problem or an active mq RA adapter issue.
>
> I am appending stacktraces if anyone has a clue.
>
> P.S: The Active MQ exception usually ahppens after 1-2 days of 200-400
> req/s load.
>
> BR
>
> MAtej
>

Reply via email to