Re: Logging Abandoned Connection

2023-09-27 Thread chege
On Wed, 2023-09-27 at 11:32 -0700, Kean Erickson wrote:
> Kean

Hi Kean,

Thanks for the response. Before removing abandoned connections I want
to log the event.



Re: Logging Abandoned Connection

2023-09-27 Thread Kean Erickson
I believe you need a couple more properties for abandoned connections to be
pruned:

removeAbandoned="true"
removeAbandonedTimeout="60"


On Wed, Sep 27, 2023, 12:18 AM chege  wrote:

> Hi,
>
> I using tomee 8.0.14. I want to see which code is not closing
> connections. I have set logAbandoned true in my datasource.
> However I don't see the any abandoned connection logged.
>
>
>  
>
>   DataSourceCreator tomcat
>   JdbcDriver org.postgresql.Driver
>   JdbcUrl jdbc:postgresql://localhost:5432/abc
>username ***
>   password ***
>   JtaManaged true
>   InitialSize 10
>   MaxActive 50
>   MaxIdle 25
>   MinIdle 10
>   TestOnBorrow true
>   TestWhileIdle true
>   ValidationQuery select 1
>   logAbandoned true
> 
>
>
> What else do I need to do to see connection leaks logged?
>
>
> Chege.
>
>


Re: JAX-WS Enpoint.publish not running on specified port

2023-09-27 Thread Richard Zowalla
Hi,

if possible put a small reproducer on GitHub, so people can have a
look.

Gruß
Richard

Am Dienstag, dem 26.09.2023 um 12:00 -0700 schrieb Boyan Mihaylov:
> Hello,
> 
> Migrating an existing application to TomEE, which uses JAX-WS
> javax.xml.ws.Endpoint. The following code does not open port 7001.
> 
> @WebServiceProvider
> 
> @ServiceMode(value=Service.Mode.*PAYLOAD*)
> 
> *public* *final* *class* WsProvider *implements* Provider {
>   ...
>   public void start() {
> 
>     String publishAddress = "http://0.0.0.0:7001/v1.0.1/soap;;
>     Endpoint endPoint = Endpoint.create(this);
>     endPoint.publish(publishAddress);
>     log.debug("published: " + endPoint.isPublished());
>   }
> 
> }
> 
> TomEE log:
> 
> 2023-09-24 05:06:05.526 INFO [main]
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buil
> dServiceFromClass
> Creating Service {http://ws.app.com/} WsProviderService from class
> com.app.ws.WsProvider2023-09-24 05:06:05.969 INFO [main]
> org.apache.cxf.endpoint.ServerImpl.initDestination Setting the
> server's publish address to be http://0.0.0.0:7001/v1.0.1/soap
> 2023-09-24 
> 05:06:05.994
> DEBUG: published: true
> 
> 7001 not in the list of open ports:
> 
> lsof -i -P -n | grep LISTEN | grep java
> 
> java  4859    root   21u  IPv4  34883  0t0  TCP
> *:9998 (LISTEN)
> java  4859    root   22u  IPv4  34884  0t0  TCP
> *: (LISTEN)
> java  4859    root   23u  IPv4  34885  0t0  TCP
> *:42883 (LISTEN)
> java  4859    root  219u  IPv4  34886  0t0  TCP
> *:8080 (LISTEN)
> java  4859    root  232u  IPv4  34905  0t0  TCP
> 127.0.0.1:61616 (LISTEN)
> java  4859    root  296u  IPv4  34942  0t0  TCP
> 127.0.0.1:8005 (LISTEN)
> 
> Environment:
> 
>    - TomEE 8.0.15
>    - Java 1.8.0_181
>    - Ubuntu 5.15.0-84-generic
> 
> There are no exceptions, the app deploys and runs fine on TomEE,
> except it
> does not listen on port 7001. The same app runs as expected on
> Weblogic and
> Tomcat. Is there a TomEE specific configuration that needs to be
> enabled to
> make this work?
> 
> 
> Thans, appreciate your help.
> 
> 
> Boyan



Re: Issue with NexusIQ and TomEE

2023-09-27 Thread Richard Zowalla
Hi.

Might be related to the patch plugin while building the distribution archives.

Adding the commons lib to the skip list in 
https://github.com/apache/tomee/blob/320f9a20c51a5a058e21d1f20205110d02bf6a94/tomee/apache-tomee/pom.xml#L566
  might resolve it (didn't test, just a blind guess). 

It might also be a thing for the patch plugin itself, ie. don't tamper with the 
jars, if they aren't patched. As usual: PRs welcome.

Gruß
Richard 




Am 27. September 2023 14:27:03 MESZ schrieb COURTAULT Francois 
:
>THALES GROUP LIMITED DISTRIBUTION to email recipients
>
>Hello everyone,
>
>Quite recently I run NexusIQ on TomEE Plus 8.0.15.
>The tool reports a vulnerability on commons-collections--3.2.1.
>Issue: in TomEE delivery there is no commons-collections--3.2.1 ☹
>
>So we opened a ticket to NexusIQ support.
>You have to know that the tools uses Maven Central for its processing.
>If I download the  commons-collections--3.2.2.jar from this repo and I run a 
>sha1 on it, I get 8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5
>Now, if I take the one inside TomEE and run a sha1 on it, I get 
>bd3c432b046a303c22a1915a4c6f9217b4688ea6
>
>Then I performed a binary comparison using BeyondCompare. Result: there the 
>same ☹
>Finally, we found the issue: the sha1 difference comes from the jar metadata.
>For example, the date of the files in the jar downloaded from maven central is 
>2015-11-13 whereas for the one from Tomee is  2023-05-08.
>
>It seems that TomEE somehow repackage the libraries it is using. The side 
>effect is that NexusIQ generates false positive.
>It’s really annoying !
>
>Do you have a solution for that ?
>
>Best Regards.
>
>
>


Issue with NexusIQ and TomEE

2023-09-27 Thread COURTAULT Francois
THALES GROUP LIMITED DISTRIBUTION to email recipients

Hello everyone,

Quite recently I run NexusIQ on TomEE Plus 8.0.15.
The tool reports a vulnerability on commons-collections--3.2.1.
Issue: in TomEE delivery there is no commons-collections--3.2.1 ☹

So we opened a ticket to NexusIQ support.
You have to know that the tools uses Maven Central for its processing.
If I download the  commons-collections--3.2.2.jar from this repo and I run a 
sha1 on it, I get 8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5
Now, if I take the one inside TomEE and run a sha1 on it, I get 
bd3c432b046a303c22a1915a4c6f9217b4688ea6

Then I performed a binary comparison using BeyondCompare. Result: there the 
same ☹
Finally, we found the issue: the sha1 difference comes from the jar metadata.
For example, the date of the files in the jar downloaded from maven central is 
2015-11-13 whereas for the one from Tomee is  2023-05-08.

It seems that TomEE somehow repackage the libraries it is using. The side 
effect is that NexusIQ generates false positive.
It’s really annoying !

Do you have a solution for that ?

Best Regards.





Logging Abandoned Connection

2023-09-27 Thread chege
Hi,

I using tomee 8.0.14. I want to see which code is not closing
connections. I have set logAbandoned true in my datasource.
However I don't see the any abandoned connection logged.


 

  DataSourceCreator tomcat
  JdbcDriver org.postgresql.Driver
  JdbcUrl jdbc:postgresql://localhost:5432/abc
   username ***
  password ***
  JtaManaged true
  InitialSize 10
  MaxActive 50
  MaxIdle 25
  MinIdle 10
  TestOnBorrow true
  TestWhileIdle true
  ValidationQuery select 1
  logAbandoned true



What else do I need to do to see connection leaks logged?


Chege.