Re: How to make database connection pool show in JMX

2018-01-25 Thread Pawel Veselov
Keiichi,

On Thu, Jan 25, 2018 at 1:48 AM, Keiichi Fujino  wrote:
>
> Hi
>
> The Docs of jdbc-pool describe like this.
> ==
> If you're running outside of a container, you can register the DataSource
> yourself under any object name you specify, and it propagates the
> registration to the underlying pool. To do this you would call
> mBeanServer.registerMBean(dataSource.getPool().getJmxPool(),objectname).
> Prior to this call, ensure that the pool has been created by calling
> dataSource.createPool().
> ==
> http://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html#JMX
>
> Thus you must register the DataSource as MBean.

Thank you. I dug around more after your pointers.
I am using 8.0.x (I should have said that). I found a few things
problematic with JMX around data sources.

I ended up calling MBeanRegistration.preRegister() on the data source.
This way I don't have to cast it to Tomcat classes. It does the job,
but not in a right way. I looked around and I noticed these facts:

- DataSource.createPool() is always called anyway when the data source
is created, by DataSourceFactory.createDataSource()
- Pool object is not supposed to be registered JMX object, there is a
special JMX object that is created is jmxEnabled is true.
- DataSource implementation looks like a JMX bean, it implements
MBeanRegistration and ConnectionPoolMBean, but trying to register it
directly throws a non-compliant JMX bean exception
- MBeanRegistration implementation of the DataSource violates API
contract. It doesn't return the ObjectName that is being used, and it
actually registers the bean with JMX (it shouldn't)

I had problems with that last fact, because if I register the bean, I
need to clean it up on shutdown, but I can't get the actual name that
the bean is registered as (except for copying the code that
preRegister ends up calling). I ended up fishing the bean out by
querying it before unregistering it.

I hope things are, in fact, better in 9.

Thank you,
  Pawel.

> 2018-01-24 10:48 GMT+09:00 Pawel Veselov :
>
> > Hello.
> >
> > I'd like to get some JMX stats out of the JDBC connection pools. But
> > they don't seem to register
> > in JMX, even though they are based on ConnectionPoolMBean.
> >
> > I do create the pools programmatically, by binding the factory into
> > the JNDI, the creation snippet is
> > copied below. When I search for JMX objects, I don't see anything that
> > looks like the pool info,
> > but I'm also not sure what the object name is supposed to be. I expect
> > it to be in "Catalina"
> > domain, though some of the code I saw suggests it may be in
> > "tomcat.jdbc" domain instead... I
> > don't have any "tomcat." domains at all.
> >
> > Any clues are appreciated.
> >
> > --
> > Properties p = new Properties();
> >
> > p.setProperty("type", "javax.sql.Datasource");
> > p.setProperty("defaultAutoCommit", "false");
> > // <...> set some other properties here
> > // enable JMX
> > p.setProperty("jmxEnabled", String.valueOf(Boolean.TRUE));
> > // JNDI of the actual data source
> > p.setProperty("dataSourceJNDI", pooledDSName);
> > Class dsfClass =
> > Class.forName("org.apache.tomcat.jdbc.pool.DataSourceFactory");
> > Object dsf = dsfClass.newInstance();
> > Method m = dsfClass.getDeclaredMethod("createDataSource",
> > Properties.class);
> > return m.invoke(dsf, p);
> > // the result is bound into JNDI
> > --
> >
> > Thank you!

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



Fw: Re: Fw: No movement at Debug mode

2018-01-25 Thread Karen Goh
Hi chris,

The database problem has been resolved cos apparently, there is a old version 
of J-connector that is not removed inside Eclipse.

But, now I am facing the No movement at Debug mode again.

I used to be able to received logger infor when when run debug that shows me 
the stack when the 'compiler' steps thru the programme but I am not seeing this 
now.

All I get is Daemon thread running...

Furthermore, I am getting the below log :

127.0.0.1 - - [26/Jan/2018:11:04:44 +0800] "GET / HTTP/1.1" 404 1073
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET /Hi5S/tutorRegister.jsp 
HTTP/1.1" 200 13656
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/BootStrap/css/modern-business.css HTTP/1.1" 200 1413
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/BootStrap/css/bootstrap.min.css HTTP/1.1" 200 132281
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/BootStrap/css/checkbox.css HTTP/1.1" 200 434
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/BootStrap/css/bootstrap-multiselect.css HTTP/1.1" 200 1454
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/BootStrap/font-awesome/css/font-awesome.min.css HTTP/1.1" 200 21984
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/BootStrap/Checkbox.js HTTP/1.1" 404 1107
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/BootStrap/bootstrap-multiselect.js HTTP/1.1" 404 1120
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET /Hi5S/js/bootstrap.min.js 
HTTP/1.1" 404 1105
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET /Hi5S/js/jquery.js 
HTTP/1.1" 404 1098
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET 
/Hi5S/js/jqBootstrapValidation.js HTTP/1.1" 404 1113
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET /Hi5S/js/contact_me.js 
HTTP/1.1" 404 1102
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:04:53 +0800] "GET /Hi5S/Image/aa1.png 
HTTP/1.1" 404 1099
0:0:0:0:0:0:0:1 - - [26/Jan/2018:11:14:25 +0800] "POST /Hi5S/addTutor HTTP/1.1" 
200 -

Could you kindly explain why I am getting 404 even though I am able to get the 
tutorRegister.jsp and then there is a 404 at Checkbox.js... which I do not 
understand the error.

The addTutor which is my controller servlet I got a 200 but I am not seeing 
data being inserted into my database.

Hope you could advise me. Tks.


--- On Thu, 1/25/18, Karen Goh  wrote:

> From: Karen Goh 
> Subject: Re: Fw: No movement at Debug mode
> To: "Tomcat Users List" 
> Date: Thursday, January 25, 2018, 1:23 PM
> 
> 
> On Tue, 1/23/18, Christopher Schultz
> 
> wrote:
> 
>  Subject: Re: Fw: No movement at Debug
> mode
>  To: users@tomcat.apache.org
>  Date: Tuesday, January 23, 2018, 11:58
> PM
>  
>  -BEGIN PGP SIGNED MESSAGE-
>  Hash: SHA256
>  
>  Karen,
>  
>  On 1/21/18 10:49 AM, Karen Goh wrote:
>  > I want to add in additional
> infor
>  :
>  > 
>  > After I stopped the server, the
>  console has the following error
>  > message which beats me.
>  > 
>  > WARNING: The web application
>  [Hi5S] appears to have started a
>  > thread named [Abandoned
> connection
>  cleanup thread] but has failed
>  > to stop it. This is very likely
> to
>  create a memory leak. Stack
>  > trace of thread:
> 
> java.io.WinNTFileSystem.canonicalize0(Native
>  > Method) 
>  >
> 
> java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428)
>  
>  >
> 
> java.io.File.getCanonicalPath(File.java:618) 
>  >
> 
> org.apache.catalina.webresources.AbstractFileResourceSet.file(Abstract
>  FileResourceSet.java:90)
>  >
>  > 
> 
> org.apache.catalina.webresources.DirResourceSet.getResource(DirResourceS
>  et.java:101)
>  >
> 
> org.apache.catalina.webresources.StandardRoot.getResourceInternal(Stan
>  dardRoot.java:281)
>  >
>  > 
> 
> org.apache.catalina.webresources.CachedResource.validateResource(CachedR
>  esource.java:97)
>  >
> 
> org.apache.catalina.webresources.Cache.getResource(Cache.java:69)
>  
>  >
> 
> org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot
>  .java:216)
>  >
>  > 
> 
> org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(Sta
>  ndardRoot.java:225)
>  >
> 
> org.apache.catalina.loader.WebappClassLoaderBase.findResource(WebappCl
>  assLoaderBase.java:884)
>  >
>  > 
> 
> org.apache.catalina.loader.WebappClassLoaderBase.getResource(WebappClass
>  LoaderBase.java:1005)
>  >
> 
> com.mysql.jdbc.AbandonedConnectionCleanupThread.checkContextClassLoade
> 
> rs(AbandonedConnectionCleanupThread.java:90)
>  >
>  > 
> 
> com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionC
>  leanupThread.java:63)
>  >
> 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j
>  ava:1149)
>  >
>  > 
> 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
>  va:624)
>  >
>  java.lang.Thread.run(Thread.java:748)
>  > 
>  > I hope with the new 

Re: tomcat version question

2018-01-25 Thread Konstantin Kolinko
2018-01-26 1:03 GMT+03:00 Robert J. Carr :
> Hello.
>
> There is a "which version" page on the main site which is really useful,
> and it lists all the versions of the various specs related to the version
> of tomcat, but a really important one IMO that is missing is the Java EE
> version, so I can look up the api docs.
>
> Is there a reason why this is omitted?  Currently, I have to look up the
> servlet spec, and then cross reference that with the Java EE to find the
> appropriate docs.
>
> Or am I missing something?

Have you seen the Specifications page in the Wiki?
https://wiki.apache.org/tomcat/Specifications

I updated the whichversion page with a link to there (r1822243).

Best regards,
Konstantin Kolinko

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



Re: tomcat version question

2018-01-25 Thread Mark Thomas
On 25/01/18 22:03, Robert J. Carr wrote:
> Hello.
> 
> There is a "which version" page on the main site which is really useful,
> and it lists all the versions of the various specs related to the version
> of tomcat, but a really important one IMO that is missing is the Java EE
> version, so I can look up the api docs.
> 
> Is there a reason why this is omitted?  Currently, I have to look up the
> servlet spec, and then cross reference that with the Java EE to find the
> appropriate docs.
> 
> Or am I missing something?

Minimum Java version == Java EE version (at least for Tomcat 7.x, 8.x
and 9.x).

Tomcat doesn't implement the full Java EE spec so I'd be cautious about
listing it in case it causes confusion. If we can find the right wording
to use I wouldn't have any objection to adding a Java EE column.

What will happen now Java EE is moving to Eclipse is a whole other issue...

Mark

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



tomcat version question

2018-01-25 Thread Robert J. Carr
Hello.

There is a "which version" page on the main site which is really useful,
and it lists all the versions of the various specs related to the version
of tomcat, but a really important one IMO that is missing is the Java EE
version, so I can look up the api docs.

Is there a reason why this is omitted?  Currently, I have to look up the
servlet spec, and then cross reference that with the Java EE to find the
appropriate docs.

Or am I missing something?

Thanks-
Robert


Re: ALv2 Tomcat Training material

2018-01-25 Thread Alex O'Ree
Understanding web.xml

Understanding webapps without web.xml

Security, authn and authz, ldap setups

fIle system permissions

On Jan 25, 2018 6:04 AM, "Mark Thomas"  wrote:

> On 08/01/18 09:39, Mark Thomas wrote:
> > On 05/01/18 22:09, Don Flinn wrote:
> >> Hi Mark,
> >>
> >> I think this is an excellent and useful task. The first step is to
> define
> >> the audiences of which I would like to suggest five.
> >>
> >> 1. Experienced System administrators with experience in security and SSL
> >> 2. Experienced System administrators with no or little experience in
> >> security and SSL
> >> 3  Non system administrators with  experience in security and SSL
> >> 4. Non system administrators with  no or little experience in security
> and
> >> SSL
> >> 5. Overarching each of the above is the different CAs that might be used
> >
> > You could probably break down the audience in a similar manner for most
> > of the Tomcat topics.
> >
> >> A question would be are audiences 3 and 4 populated.  I for one fall
> >> somewhere between 3 and 4, but maybe I'm the only one.  It seems to me
> that
> >> small companies would fall into 3 and 4.  A big further complication is
> >> item 5, which applies to each of the others.
> >
> > Indeed. The general idea would be to write material that covers all of
> > these and then adjust what is actually taught to the particular audience.
> >
> >> I wrote a short write-up to this site about a month age addressing
> >> audiences 2, 3 and 4, mostly 4 and was told that this was not what was
> >> wanted, that all the information was somewhere on the web.  That is true
> >> but trying to find it, absorb and apply it is difficult.
> >
> > We do try and keep the docs succinct and direct users elsewhere for
> > background. I remember that write up - it is similar to the content of
> > the intro to TLS presentation I have given previously. It is the sort of
> > content we would want to include in the training course.
> >
> > More generally, I'm updating the wiki with the suggestions as I spot
> > them on the mailing list. Please do keep the suggestions coming and ping
> > me if I miss something.
> >
> > Mark
> >
> >
> >>
> >> Don
> >>
> >>
> >> On Thu, Jan 4, 2018 at 5:16 AM, Mark Thomas  wrote:
> >>
> >>> Hi,
> >>>
> >>> One of the things on my TODO list is to put together some Tomcat
> >>> training material licensed under the Apache License (version 2). i.e.
> >>> material that would be made freely available for folks to use.
> >>>
> >>> I'd also like to make the training material available on YouTube as
> well
> >>> as run some training courses (for a small fee) to deliver the material
> >>> face to face.
> >>>
> >>> The structure I have in mind is a series of modules (say 30 mins in
> >>> length) that can be organised in different ways to suit different
> needs.
> >>> e.g. put the introductory modules for each area together to provide an
> >>> 'Introduction to Tomcat course', put all the TLS modules together to
> >>> provide an in depth 'Tomcat and TLS' course etc.
> >>>
> >>> I think a lot of the raw content is already available. We have the
> >>> various Tomcat presentations that have been given over the years and my
> >>> employer has agreed to let me make use of the material from our (now
> >>> possibly a little dated) Tomcat training courses.
> >>>
> >>> I can't do this alone. Not in any reasonable time frame anyway. So I am
> >>> reaching out to the community for help.
> >>>
> >>> The first step is to come with:
> >>> - a list of modules
> >>> - potential courses formed from combinations of modules
> >>>
> >>> I am asking for your ideas for modules, courses and combinations of
> >>> modules that could make up those courses.
> >>>
> >>> We have a blank wiki page to host this:
> >>> https://cwiki.apache.org/confluence/display/TOMCAT/
> Tomcat+Training+Course
> >>>
> >>> Feel free to ask for edit access to that page (you'll need to create an
> >>> account and let us know the user name) so you can add ideas directly or
> >>> add ideas to this thread and I'll add them to the wiki page.
> >>>
> >>> The second step is to start populating the modules with actual content.
> >>> As a motivator to get this done, I'd like to run a public Tomcat
> >>> training course in late March / early April using this material. My
> >>> current thinking is that the course would cost ~£100 plus food per
> >>> person for the full day. Possible locations for this course are:
> >>> - Cardiff
> >>> - Birmingham
> >>> - Manchester
> >>> - Glasgow
> >>> (all in the UK - if successful we can expand to mainland Europe and
> beyond)
> >>>
> >>> My second request is for feedback on which location(s) are preferable
> >>> and what content would you like to see in the training course. I'll
> take
> >>> this feedback, put together a course and then make it available to
> book.
> >>>
> >>> I look forward to all your ideas.
>
> Ping.
>
> The current list of ideas is here:
> 

Re: ALv2 Tomcat Training material

2018-01-25 Thread Mark Thomas
On 08/01/18 09:39, Mark Thomas wrote:
> On 05/01/18 22:09, Don Flinn wrote:
>> Hi Mark,
>>
>> I think this is an excellent and useful task. The first step is to define
>> the audiences of which I would like to suggest five.
>>
>> 1. Experienced System administrators with experience in security and SSL
>> 2. Experienced System administrators with no or little experience in
>> security and SSL
>> 3  Non system administrators with  experience in security and SSL
>> 4. Non system administrators with  no or little experience in security and
>> SSL
>> 5. Overarching each of the above is the different CAs that might be used
> 
> You could probably break down the audience in a similar manner for most
> of the Tomcat topics.
> 
>> A question would be are audiences 3 and 4 populated.  I for one fall
>> somewhere between 3 and 4, but maybe I'm the only one.  It seems to me that
>> small companies would fall into 3 and 4.  A big further complication is
>> item 5, which applies to each of the others.
> 
> Indeed. The general idea would be to write material that covers all of
> these and then adjust what is actually taught to the particular audience.
> 
>> I wrote a short write-up to this site about a month age addressing
>> audiences 2, 3 and 4, mostly 4 and was told that this was not what was
>> wanted, that all the information was somewhere on the web.  That is true
>> but trying to find it, absorb and apply it is difficult.
> 
> We do try and keep the docs succinct and direct users elsewhere for
> background. I remember that write up - it is similar to the content of
> the intro to TLS presentation I have given previously. It is the sort of
> content we would want to include in the training course.
> 
> More generally, I'm updating the wiki with the suggestions as I spot
> them on the mailing list. Please do keep the suggestions coming and ping
> me if I miss something.
> 
> Mark
> 
> 
>>
>> Don
>>
>>
>> On Thu, Jan 4, 2018 at 5:16 AM, Mark Thomas  wrote:
>>
>>> Hi,
>>>
>>> One of the things on my TODO list is to put together some Tomcat
>>> training material licensed under the Apache License (version 2). i.e.
>>> material that would be made freely available for folks to use.
>>>
>>> I'd also like to make the training material available on YouTube as well
>>> as run some training courses (for a small fee) to deliver the material
>>> face to face.
>>>
>>> The structure I have in mind is a series of modules (say 30 mins in
>>> length) that can be organised in different ways to suit different needs.
>>> e.g. put the introductory modules for each area together to provide an
>>> 'Introduction to Tomcat course', put all the TLS modules together to
>>> provide an in depth 'Tomcat and TLS' course etc.
>>>
>>> I think a lot of the raw content is already available. We have the
>>> various Tomcat presentations that have been given over the years and my
>>> employer has agreed to let me make use of the material from our (now
>>> possibly a little dated) Tomcat training courses.
>>>
>>> I can't do this alone. Not in any reasonable time frame anyway. So I am
>>> reaching out to the community for help.
>>>
>>> The first step is to come with:
>>> - a list of modules
>>> - potential courses formed from combinations of modules
>>>
>>> I am asking for your ideas for modules, courses and combinations of
>>> modules that could make up those courses.
>>>
>>> We have a blank wiki page to host this:
>>> https://cwiki.apache.org/confluence/display/TOMCAT/Tomcat+Training+Course
>>>
>>> Feel free to ask for edit access to that page (you'll need to create an
>>> account and let us know the user name) so you can add ideas directly or
>>> add ideas to this thread and I'll add them to the wiki page.
>>>
>>> The second step is to start populating the modules with actual content.
>>> As a motivator to get this done, I'd like to run a public Tomcat
>>> training course in late March / early April using this material. My
>>> current thinking is that the course would cost ~£100 plus food per
>>> person for the full day. Possible locations for this course are:
>>> - Cardiff
>>> - Birmingham
>>> - Manchester
>>> - Glasgow
>>> (all in the UK - if successful we can expand to mainland Europe and beyond)
>>>
>>> My second request is for feedback on which location(s) are preferable
>>> and what content would you like to see in the training course. I'll take
>>> this feedback, put together a course and then make it available to book.
>>>
>>> I look forward to all your ideas.

Ping.

The current list of ideas is here:
https://cwiki.apache.org/confluence/display/TOMCAT/Tomcat+Training+Course

More ideas are welcome.

Based on what we have so far, a "Tomcat for system admins" course aimed
at experienced system admins who are unfamiliar with Tomcat looks like
the best fit.

Any feedback regarding location?

Mark

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

Re: Modify JspServlet config in application web.xml?

2018-01-25 Thread Mark Thomas
On 25/01/18 05:25, Christopher Schultz wrote:



> You can also use  in WEB-INF/web.xml for the JSP servlet.
> You will probably have to copy those settings you want from the JSP
> configuration in conf/web.xml because I don't think Tomcat will merge
> init-param between the two files.

Tomcat should merge the init-param entries. The rules for merging the
default web.xml file are as follows.

1. Web fragments, annotations etc. are merged into the main web.xml as
per the Servlet spec merge rules to created an updated main web.xml.

2. The default web.xml is them merged into the updated main web.xml as
if the default web.xml was a web fragment again following the Servlet
spec rules with one exception. If there is a conflict, rather than
triggering an error, the updated main web.xml always takes precedence.

The code that does this is in ContextConfig and WebXml.

Mark

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



Re: roles stripped when using login() in tomcat 8.5 but not 8.0

2018-01-25 Thread Mark Thomas
On 24/01/18 22:45, Robert J. Carr wrote:



> Hi Mark, Konstantin-
> 
> I looked in on that defect ticket and it appears you found and fixed a
> problem.  Great!  But I also noticed you said the same problems were
> happening for you in 8 and 8.5 and even happening in the same version of 8
> I was testing against.
> 
> So I went and grabbed a clean version of 8.0.43 and sure enough, you're
> right, I'm seeing the same problems there as well.  But this is good news,
> as it means there's a config that can likely fix the problem.
> 
> I was in the process of writing this long email, hoping you could help me
> find the config that makes the difference, and *finally* I found it.  Turns
> out if you turn on single sign-on then this bug doesn't present itself.  I
> had forgot I had turned that on in my test server.
> 
> So, although you fixed the bug, I thought you'd like to have that
> information.  And to say thanks for indirectly helping me to find a
> solution!

Thanks for posting the results of your research. It is always helpful
when people post the solution / work-around to their issue.

Mark

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



Re: How to make database connection pool show in JMX

2018-01-25 Thread Keiichi Fujino
Hi

The Docs of jdbc-pool describe like this.
==
If you're running outside of a container, you can register the DataSource
yourself under any object name you specify, and it propagates the
registration to the underlying pool. To do this you would call
mBeanServer.registerMBean(dataSource.getPool().getJmxPool(),objectname).
Prior to this call, ensure that the pool has been created by calling
dataSource.createPool().
==
http://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html#JMX

Thus you must register the DataSource as MBean.


2018-01-24 10:48 GMT+09:00 Pawel Veselov :

> Hello.
>
> I'd like to get some JMX stats out of the JDBC connection pools. But
> they don't seem to register
> in JMX, even though they are based on ConnectionPoolMBean.
>
> I do create the pools programmatically, by binding the factory into
> the JNDI, the creation snippet is
> copied below. When I search for JMX objects, I don't see anything that
> looks like the pool info,
> but I'm also not sure what the object name is supposed to be. I expect
> it to be in "Catalina"
> domain, though some of the code I saw suggests it may be in
> "tomcat.jdbc" domain instead... I
> don't have any "tomcat." domains at all.
>
> Any clues are appreciated.
>
> --
> Properties p = new Properties();
>
> p.setProperty("type", "javax.sql.Datasource");
> p.setProperty("defaultAutoCommit", "false");
> // <...> set some other properties here
> // enable JMX
> p.setProperty("jmxEnabled", String.valueOf(Boolean.TRUE));
> // JNDI of the actual data source
> p.setProperty("dataSourceJNDI", pooledDSName);
> Class dsfClass =
> Class.forName("org.apache.tomcat.jdbc.pool.DataSourceFactory");
> Object dsf = dsfClass.newInstance();
> Method m = dsfClass.getDeclaredMethod("createDataSource",
> Properties.class);
> return m.invoke(dsf, p);
> // the result is bound into JNDI
> --
>
> Thank you!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
> --
> Keiichi.Fujino
> 


[ANN] Apache Tomcat 7.0.84 released

2018-01-25 Thread Violeta Georgieva
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 7.0.84.

Apache Tomcat is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Expression Language and Java
WebSocket technologies.

This release contains a number of bug fixes and improvements compared to
version 7.0.82. The notable changes since 7.0.82 include:


- Java 9 is fully supported

- Update the packaged version of the Tomcat Native Library to
  1.2.16 to pick up the latest Windows binaries built with
  APR 1.6.3 and OpenSSL 1.0.2m

- Add a new system property
  (org.apache.jasper.runtime.BodyContentImpl.BUFFER_SIZE) to control the
  size of the buffer used by Jasper when buffering tag bodies.


Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Downloads:
http://tomcat.apache.org/download-70.cgi

Migration guides from Apache Tomcat 5.5.x and 6.0.x:
http://tomcat.apache.org/migration.html

Enjoy

The Apache Tomcat team


[ANN] Apache Tomcat 8.0.49 released

2018-01-25 Thread Violeta Georgieva
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 8.0.49.

Please note that Tomcat 8.x users should normally be using 8.5.x
releases in preference to 8.0.x releases. The Apache Tomcat team
announced that support for Apache Tomcat 8.0.x will end on
30 June 2018.

Apache Tomcat 8.0 is an open source software implementation of the Java
Servlet, JavaServer Pages, Java Unified Expression Language and Java
WebSocket technologies.

Apache Tomcat 8.0.49 includes fixes for issues identified in 8.0.48 as
well as other enhancements and changes. The notable changes since
8.0.48 include:


- Add a new system property
  (org.apache.jasper.runtime.BodyContentImpl.BUFFER_SIZE) to control the
  size of the buffer used by Jasper when buffering tag bodies.


Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-8.0-doc/changelog.html

Downloads:
http://tomcat.apache.org/download-80.cgi

Migration guides from Apache Tomcat 5.5.x, 6.0.x and 7.0.x:
http://tomcat.apache.org/migration.html

Enjoy

The Apache Tomcat team