ConnectionPool JDBC vs. DBCP

2024-02-15 Thread ESI
Moin,
in the docpage https://tomcat.apache.org/tomcat-10.1-doc/jdbc-pool.html it says

>The JDBC Connection Pool org.apache.tomcat.jdbc.pool is a replacement or an 
>alternative to the Apache Commons DBCP connection pool.
>
>So why do we need a new connection pool?
>
>Here are a few of the reasons:
>
>Commons DBCP 1.x is single threaded. In order to be thread safe Commons 
> locks the entire pool for short periods during both object allocation and 
> object return. Note that this does not apply to Commons DBCP 2.x.
[...snip...]

I thought that Tomcat uses DBCP 2.x per default, is this document still 
relevant or is it outdated?

Thanks,
  Andreas



This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Problem getting logging from TldScanner

2024-08-05 Thread ESI
Moin,
I wanted to check the TLD scanner and placed*

org.apache.jasper.servlet.TldScanner.level = FINE

in logging.properties, but under Tomcat 10.1.25 and Tomcat 9.0.91 I get only

05-Aug-2024 10:43:29.958 INFO [main] 
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for 
TLDs yet contained no TLDs. Enable debug logging for this logger for a complete 
list of JARs that were scanned but no TLDs were found in them. Skipping 
unneeded JARs during scanning can improve startup time and JSP compilation time.

Uncommenting the line

org.apache.catalina.util.LifecycleBase.level = FINE

in logging.properties works as expected (to check, if I really looked at the 
correct files).

On Tomcat 9.0.83 I got

Aug 05, 2024 11:44:43 AM org.apache.jasper.servlet.TldScanner scanResourcePaths
FINE: No TLD files were found in resource path [/WEB-INF/].

as expected.

I could not find any open bugs for TldScanner or logging that would explain 
this behavior. Did I miss something? Could someone verify this?

Java versions:
11.0.21 for Tomcat 9
17..0.11 for Tomcat 10

Thanks,
   Andreas

* Yes, I tried FINE, FINEST and ALL...


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



AW: Problem getting logging from TldScanner

2024-08-06 Thread ESI
Hi Mark,
ah! Thanks! After I enabled

java.util.logging.ConsoleHandler.level = ALL

(and set the level to FINEST) I got the TLD messages I was missing.

Thanks,
  Andreas

-Ursprüngliche Nachricht-
Von: Mark Thomas 
Gesendet: Dienstag, 6. August 2024 09:58
An: users@tomcat.apache.org
Betreff: Re: Problem getting logging from TldScanner


WARNING: Do not click links or open attachments unless you recognize the source 
of the email and know the contents are safe.

On 05/08/2024 11:07, Döscher, Andreas (ESI) wrote:
> Moin,
> I wanted to check the TLD scanner and placed*
>
> org.apache.jasper.servlet.TldScanner.level = FINE
>
> in logging.properties, but under Tomcat 10.1.25 and Tomcat 9.0.91 I
> get only
>
> 05-Aug-2024 10:43:29.958 INFO [main] 
> org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned 
> for TLDs yet contained no TLDs. Enable debug logging for this logger for a 
> complete list of JARs that were scanned but no TLDs were found in them. 
> Skipping unneeded JARs during scanning can improve startup time and JSP 
> compilation time.



> * Yes, I tried FINE, FINEST and ALL...

You need:

... = FINEST

but you also need to update the handlers as well since they filter out 
everything below FINE by default.

Now we have started using trace (aka FINEST) level logging we need to update 
that message and probably the default logging configuration.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



AW: Track native memory of a Tomcat application

2020-09-14 Thread ESI
Moin,
ah! The no-xmx-mistake! If you ommit the memory limitation, java uses (on 
server-class machines) as default 1/4 of the physical memory.
(I found this blog entry 
https://blog.openj9.org/2020/04/30/default-java-maximum-heap-size-is-changed-for-java-8/)

Ciao,
  Andreas


-Ursprüngliche Nachricht-
Von: Arshiya Shariff  
Gesendet: Montag, 14. September 2020 10:17
An: Tomcat Users List 
Betreff: RE: Track native memory of a Tomcat application

Hi All, 

Thank you for the response Christopher .

* A single request, or a single *type* of request?
A single request (http/https) that is hit once per day

* Does it increase as the request is processed, or does the JVM take that 4GiB 
immediately upon startup?
The tomcat process was started 3 months back , but the memory has 
increased gradually to 4GB though it does not process requests continuously 
(one request per day).

* The first thing to do would be to post the effective command-line options 
that are being used when launching your JVM. One of the easiest ways to do that 
is to run "ps | grep catalina" which will give you the full command-line for 
the process.
There is no Xmx set:
ogw  30853  0.1  3.1 22048736 2068856 ?Sl   Jun09 154:10 
/opt/java//jdk1.8.0_201-amd64/bin/java 
-Djava.util.logging.config.file=/opt/webstart//conf/logging.properties 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djdk.tls.ephemeralDHKeySize=2048 
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources 
-Dorg.apache.catalina.security.SecurityListener.UMASK=0027 
-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=false 
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=false 
-Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=false 
-Dorg.apache.catalina.connector.RECYCLE_FACADES=false -Dignore.endorsed.dirs= 
-classpath /opt/webstart//bin/bootstrap.jar:/opt/webstart//bin/tomcat-juli.jar 
-Dcatalina.base=/opt/webstart/ -Dcatalina.home=/opt/webstart/ 
-Djava.io.tmpdir=/opt/webstart//temp org.apache.catalina.startup.Bootstrap start

Thanks and Regards
Arshiya Shariff


-Original Message-
From: Christopher Schultz 
Sent: Friday, September 11, 2020 10:54 PM
To: users@tomcat.apache.org
Subject: Re: Track native memory of a Tomcat application

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Arshiya,

On 9/11/20 13:06, Arshiya Shariff wrote:
> We have a standalone tomcat web application(Version 9.0.22) which runs 
> on Linux . The application is used to process only  a single http 
> request.

A single request, or a single *type* of request?

> But the physical memory usage of the application has increased to 4GB 
> (output from the "top" command of Linux) , of which the heap has only
> 16 MB of live data.

Does it increase as the request is processed, or does the JVM take that 4GiB 
immediately upon startup?

Remember that the heap is only a part of the JVM's memory usage.
Examples of things that don't go into the heap are the native memory used by 
the JVM itself (thinking of the JVM itself as a usual OS process), stacks for 
each native thread, compiled Java code produced by the JIT, and various I/O 
buffers.

> Is there a way to track the native memory of a tomcat process ?

The native memory of a Java application is very difficult to inspect, etc. 
unless you are *very* familiar with JVMs, the memory manager being used by your 
JVM, and the platform and architecture on which the JVM is running.

The first thing to do would be to post the effective command-line options that 
are being used when launching your JVM. One of the easiest ways to do that is 
to run "ps | grep catalina" which will give you the full command-line for the 
process.

That will show any memory parameters you may have specified on the JVM at 
launch time, which will definitely affect the amount of native memory your JVM 
process might end up taking up.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - 
https://urldefense.proofpoint.com/v2/url?u=https-3A__protect2.fireeye.com_v1_url-3Fk-3Dafccd87f-2Df17c45e5-2Dafcc98e4-2D867b36d1634c-2D0bbd1bba405711b0-26q-3D1-26e-3D6321ad9b-2D27ed-2D403c-2D8d47-2D1699f85d092b-26u-3Dhttps-253A-252F-252Fwww.enigmail.net-252F&d=DwIFAg&c=xu_5lAfKHjInGFR3ndoZrw&r=N4b05szNzfzzBzdbzV7Q3p9SBOn_HZzSPs2tWonR2w4&m=yTRL9WIPqtP9RANn6t-iknJaPpQ-ZKPy785Odqn87SE&s=_DCyphjSrtIWDUlNeetiTF90ZuyoLkG4mzR_9jErg_c&e=
 

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl9bsqoACgkQHPApP6U8
pFhfOA//cb427EP07vqPihuQUNWZtbfRyiDn+9B1AWEXLxKChpomSznUDmZWXs/t
w7YE6v6h741M8MiHKCJeUNz537DRxzMMCdoIlFFE48mZ/SFrg6xPgpMr2wQksz5S
zyKmInSXRmjKFfv1VUZ1tS6nF8dSxC+iSgC+axyBxU3cywVdJ/hCq8ylgq1mc9F7
JllfyxpQ2cRyioYkJWSR04BVDtXMFlyIhuBat8/OrXAEtsqhXCDXvM3cp8RvcIp6
Sg05MCb3nNM2495xt/m8jc1ffcyho5S4CDD1mfNfTLGG5vie5D81i95ExkPt6Voj
8TTI+Yk9MhauSyeroAX67SVJaTDMPqK3fUMuz+IX31tFo/5YMaQAMIe+XF+LW6Kz
EsbSDMRB460j8zAigPIt/9KTSfA8xT8R0t3dMPZytaB01tZZi7atq89QcoR+irrP
bFiFmErEcTdtyNZWWFeBQiEy1qZ+0J5GZ

Problem with the redirect after j_security_check

2023-07-22 Thread Wiemann, Helge (ESI)
Hi all,

we are using Tomcat 9 and the still the JDBC Realm for authentication.

Our starting URL (which is protected) ends with "/boot1#index"
The form authentication is then processed through the common url 
j_security_check.
But after a successful login, he is not redirecting to "boot1#index" but only 
to "boot1", he is missing the #index but this is necessary for our application.

Any idea why he is removing this #index string or any possible solution to fix?

Best regards,

Helge



 [cid:image001.png@01D9BCBE.79E020C0] 
Helge Wiemann
Application Developer

Mary-Somerville-Str. 4, DE- 28359 Bremen
T: +49 800 000 6898

helge.wiem...@adp.com

[LinkedIn][Twitter][Facebook][YouTube][Instagram]
ADP Employer Services GmbH; Sitz der Gesellschaft: Neu-Isenburg; 
Registergericht: Amtsgericht Offenbach am Main HRB 11980;
Geschäftsführer Martijn Brand (Vorsitzender), Virginia Magliulo; 
Aufsichtsratsvorsitzende: Marcela Uribe


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.


Problem with session timeout

2023-07-25 Thread Wiemann, Helge (ESI)
Hi all,

we have a problem that we have set the tomcat timeout to 10 minutes. But after 
a successful login with a realm, the user is automatically logged out, 
sometimes after one minute, sometimes other times.

I have downloaded the source code, want to set a breakpoint. Does anybody know 
a code place in tomcat where I can set a breakpoint when the session timeout is 
handled?

Best regards,

Helge



 [cid:image001.png@01D9BEEA.8EF13F20] 
Helge Wiemann
Application Developer

Mary-Somerville-Str. 4, DE- 28359 Bremen
T: +49 800 000 6898

helge.wiem...@adp.com

[LinkedIn][Twitter][Facebook][YouTube][Instagram]
ADP Employer Services GmbH; Sitz der Gesellschaft: Neu-Isenburg; 
Registergericht: Amtsgericht Offenbach am Main HRB 11980;
Geschäftsführer Martijn Brand (Vorsitzender), Virginia Magliulo; 
Aufsichtsratsvorsitzende: Marcela Uribe


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.