You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Harald Wellmann <hw...@gmail.com> on 2012/12/09 23:00:48 UTC

org.apache.tomee.embedded.Container does not release sockets

I'm using org.apache.tomee.embedded.Container for integration tests. 
When stopping and restarting the container in the same VM, I get a 
BindException "Address already in use" for the HTTP port 8080.

Embedded Tomcat has the same issue which can be fixed by setting a 
property on the Catalina Connector:

    connector.setProperty( "bindOnInit", "false" );

I don't really see a way of passing this property into 
org.apache.tomee.embedded.Container, so I'm currently working with a 
modified copy of this class.

Is there an easier way of setting this property? Would it make sense for 
TomEE to set this property by default?

Best regards,
Harald

Re: org.apache.tomee.embedded.Container does not release sockets

Posted by Romain Manni-Bucau <rm...@gmail.com>.
FYI

https://issues.apache.org/jira/browse/TOMEE-643

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2012/12/10 Romain Manni-Bucau <rm...@gmail.com>:
> Hi,
>
> think i know the issue.
>
> Will try to commit the fix as soon as i found back the jira buttons ;)
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2012/12/9 Harald Wellmann <hw...@gmail.com>:
>> I'm using org.apache.tomee.embedded.Container for integration tests. When
>> stopping and restarting the container in the same VM, I get a BindException
>> "Address already in use" for the HTTP port 8080.
>>
>> Embedded Tomcat has the same issue which can be fixed by setting a property
>> on the Catalina Connector:
>>
>>    connector.setProperty( "bindOnInit", "false" );
>>
>> I don't really see a way of passing this property into
>> org.apache.tomee.embedded.Container, so I'm currently working with a
>> modified copy of this class.
>>
>> Is there an easier way of setting this property? Would it make sense for
>> TomEE to set this property by default?
>>
>> Best regards,
>> Harald

Re: org.apache.tomee.embedded.Container does not release sockets

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

think i know the issue.

Will try to commit the fix as soon as i found back the jira buttons ;)

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2012/12/9 Harald Wellmann <hw...@gmail.com>:
> I'm using org.apache.tomee.embedded.Container for integration tests. When
> stopping and restarting the container in the same VM, I get a BindException
> "Address already in use" for the HTTP port 8080.
>
> Embedded Tomcat has the same issue which can be fixed by setting a property
> on the Catalina Connector:
>
>    connector.setProperty( "bindOnInit", "false" );
>
> I don't really see a way of passing this property into
> org.apache.tomee.embedded.Container, so I'm currently working with a
> modified copy of this class.
>
> Is there an easier way of setting this property? Would it make sense for
> TomEE to set this property by default?
>
> Best regards,
> Harald