[Tomcat Wiki] Update of "FrontPage" by KonstantinKolinko

2018-03-30 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "FrontPage" page has been changed by KonstantinKolinko:
https://wiki.apache.org/tomcat/FrontPage?action=diff=40=41

Comment:
Add steps on how to create a Wiki name, following suggestion by Charlie Arehart 
on the users' list

  
  This is the Wiki for Apache Tomcat, a Servlet and Java Server Pages container 
developed under the Apache License. The main documentation for this product is 
at [[http://tomcat.apache.org|tomcat.apache.org]]. Below is a list of some 
useful pages: we encourage everyone to contribute to these pages or start new 
ones as desired. But before you do, please check out the main documentation 
site as well as the [[FAQ]] and the 
[[http://tomcat.apache.org/lists.html|mailing lists]] (whose archives are 
searchable).
  
- If you do decide to contribute, you will need to create a Wiki login name and 
then send an e-mail to the Tomcat developers' mailing list or 
[[FAQ/Tomcat_User|Tomcat users' mailing list]], see 
[[http://tomcat.apache.org/lists.html|mailing lists]] page for details, asking 
to be added to the ContributorsGroup. Please remember to provide your Wiki 
name. (Do not send personal e-mails to committers. Ask on a mailing list, so 
that a public record of this remains in an archive.) Apologies for this extra 
step, but it's necessary to combat spam.
+ If you do decide to contribute, you will need to create a Wiki login name 
(click "Login" link at the top of the page, then "create one now") and then 
send an e-mail to the Tomcat developers' mailing list or 
[[FAQ/Tomcat_User|Tomcat users' mailing list]], see 
[[http://tomcat.apache.org/lists.html|mailing lists]] page for details, asking 
to be added to the ContributorsGroup. Please remember to provide your Wiki 
name. (Do not send personal e-mails to committers. Ask on a mailing list, so 
that a public record of this remains in an archive.) Apologies for this extra 
step, but it's necessary to combat spam.
  
   * '''[[GettingStarted|Getting Started]]''' - Getting started with Tomcat.
   * '''[[TomcatVersions|Tomcat versions]]''' - A list of every Tomcat version 
and its current status.

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



[Tomcat Wiki] Update of "ContributorsGroup" by ChristopherSchultz

2018-03-30 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "ContributorsGroup" page has been changed by ChristopherSchultz:
https://wiki.apache.org/tomcat/ContributorsGroup?action=diff=32=33

   * AndreaBrugiolo
   * AndrewCarr
   * BrianBurch
+  * CharlieArehart
   * CoreyNorthcutt
   * dblevins
   * developintelligence

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



Re: Permalinks to presentations

2018-03-30 Thread Christopher Schultz
Rainer,

On 3/29/18 9:51 PM, Rainer Jung wrote:
> Am 30.03.2018 um 02:30 schrieb Christopher Schultz:
>> All,
>>
>> Occasionally, we all have the need to give a reference to a presentation
>> to someone e.g. on the users mailing list. For example:
>>
>> https://lists.apache.org/thread.html/6b604dd26142038a4abb1c378af49beee12d4ae1d2d8dc65391fd701@%3Cusers.tomcat.apache.org%3E
>>
>>
>> In that case, I gave a direct link to a specific presentation (my
>> Monitoring w/JMX presentation from ApacheCon NA 2016).
>>
>> I think this isn't good for 2 reasons:
>>
>> 1. Links are fragile. I may remove my presentation from
>> people.a.o/~username, that stuff may be relocated, etc.
>>
>> 2. It may not be the most up-to-date version of that presentation. I
>> gave a similar talk at ApacheCon NA 2015 but the 2016 version is better.
>> If I do another one in 2018, presumably it will be the best, most
>> up-to-date one and yet I've emailed-out links directly to the 2017 (and
>> presumably 2015) version.
>>
>> 3. It avoids the Tomcat "presentations" page. Presumably, someone
>> interested in one presentation may be interested in the others.
>>
>> The alternative is to say "go to /presentations.html" and search for
>> "topic X", but as that page fills-up, I suspect people will be unlikely
>> to actually find and read the document. I think a direct-link is
>> probably best, if possible.
>>
>> I'm wondering if there might be a way to fix these. My initial idea was
>> something like an "always up-to-date link to presentation X" where X is
>> whatever presentations we often refer to (e.g. Mark's "tracking-down
>> memory leaks in web applications"). That doesn't fix issue #3 but maybe
>> someone else has an idea.
>>
>> What are our options when it comes to something like a URL which is an
>> alias to the "latest presentation X"? If I were in control of the web
>> server(s), I'd use something like mod_alias to perform a
>> temporary-redirect from tomcat.apache.org/presentations/current-X to
>> people.a.o/~user/whatever. That just needs to be updated any time the
>> presentation is updated.
>>
>> That's a little fragile, too, since anyone making a presentation would
>> have to register the presentation under a well-known name and then
>> submit requests to update it. That means work for someone here (likely
>> Mark, part of Infra). Is there a way we could do this such that any
>> committer could update such redirects?
>>
>> Any other thoughts or ideas?
>>
>> In order to satisfy #3 above, perhaps we could have a dynamic (or maybe
>> auto-generated but not actually dynamic) page which lists all the
>> presentation topics and floats the "requested" one up to the top.
>> Something like:
>>
>> [Tomcat Presentations]
>>
>> You have requested the latest version of "Monitoring Tomcat w/JMX". You
>> can find it here: [direct link to latest]
>>
>> You may be interested in these other presentations as well:
>>
>> * [Other topic A, link to latest]
>> * [Other topic B, link to latest]
>> * ...
>>
>> Or even more good stuff: [link to /presentations.html]
>>
>> WDYT?
> 
> Our ASF link shortener s.apache.org seems to allow to edit shortened
> URLs later. So this would give us:
> 
> - short auto.generated permalink or alternatively a self-chosen URI
> - the ability to change the target of the permalink if necessary
> 
> I don't know whether only the creator of the original short link can
> edit it, but I think so. Just try the freshly created:
> 
> https://s.apache.org/tomcat-jmx-presentation.pdf
> 
> and after you have seen the redirect, got the the mini-GUI at
> s.apache.org and see whether you can edit that link (ID) and let it
> point to another URL. When submitting the data it will ask you for your
> apache user id. The experiment will tell us, if any apache committer can
> edit any s.apache.org URL, or only the original creator of a URL.

I tried to edit yours, and it says:

"
Only the original author of this short-link (rjung) can override it!
"

Maybe we can persuade Infra to add a feature where, during the creation
of a URL ID, the creator can say "any committer can modify this" or
something.

-chris



signature.asc
Description: OpenPGP digital signature


svn commit: r1828068 - /tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java

2018-03-30 Thread remm
Author: remm
Date: Fri Mar 30 15:09:16 2018
New Revision: 1828068

URL: http://svn.apache.org/viewvc?rev=1828068=rev
Log:
Avoid changing the static createDataSource method as it seems valid to call it 
from user code.

Modified:
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java?rev=1828068=1828067=1828068=diff
==
--- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java 
Fri Mar 30 15:09:16 2018
@@ -272,7 +272,7 @@ public class BasicDataSourceFactory impl
 }
 }
 
-return createDataSource(properties);
+return createDataSourceInstance(properties);
 }
 
 /**
@@ -335,7 +335,20 @@ public class BasicDataSourceFactory impl
  * @return the data source instance
  * @throws Exception if an error occurs creating the data source
  */
-public BasicDataSource createDataSource(final Properties properties) 
throws Exception {
+public static BasicDataSource createDataSource(final Properties 
properties) throws Exception {
+return (new 
BasicDataSourceFactory()).createDataSourceInstance(properties);
+}
+
+/**
+ * Creates and configures a {@link BasicDataSource} instance based on the
+ * given properties.
+ * Note: duplicates the static createDataSource to avoid an API change
+ *
+ * @param properties the datasource configuration properties
+ * @return the data source instance
+ * @throws Exception if an error occurs creating the data source
+ */
+public BasicDataSource createDataSourceInstance(final Properties 
properties) throws Exception {
 final BasicDataSource dataSource = new BasicDataSource();
 configureDataSource(dataSource, properties);
 return dataSource;



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



buildbot success in on tomcat-trunk

2018-03-30 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/3161

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1828066
Blamelist: remm

Build succeeded!

Sincerely,
 -The Buildbot




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



svn commit: r1828067 - /tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java

2018-03-30 Thread remm
Author: remm
Date: Fri Mar 30 14:48:54 2018
New Revision: 1828067

URL: http://svn.apache.org/viewvc?rev=1828067=rev
Log:
Make it possible to extend the BasicDataSource object factory without having to 
copy everything.

Modified:
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java?rev=1828067=1828066=1828067=diff
==
--- tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/BasicDataSourceFactory.java 
Fri Mar 30 14:48:54 2018
@@ -335,8 +335,21 @@ public class BasicDataSourceFactory impl
  * @return the data source instance
  * @throws Exception if an error occurs creating the data source
  */
-public static BasicDataSource createDataSource(final Properties 
properties) throws Exception {
+public BasicDataSource createDataSource(final Properties properties) 
throws Exception {
 final BasicDataSource dataSource = new BasicDataSource();
+configureDataSource(dataSource, properties);
+return dataSource;
+}
+
+/**
+ * Configures a {@link BasicDataSource} instance based on the
+ * given properties.
+ *
+ * @param properties the datasource configuration properties
+ * @param dataSource the data source instance
+ * @throws Exception if an error occurs creating the data source
+ */
+public void configureDataSource(final BasicDataSource dataSource, final 
Properties properties) throws Exception {
 String value = null;
 
 value = properties.getProperty(PROP_DEFAULTAUTOCOMMIT);
@@ -595,9 +608,6 @@ public class BasicDataSourceFactory impl
 if (dataSource.getInitialSize() > 0) {
 dataSource.getLogWriter();
 }
-
-// Return the configured DataSource instance
-return dataSource;
 }
 
 /**



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



svn commit: r1828066 - in /tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed: PoolableManagedConnectionFactory.java TransactionRegistry.java

2018-03-30 Thread remm
Author: remm
Date: Fri Mar 30 14:31:33 2018
New Revision: 1828066

URL: http://svn.apache.org/viewvc?rev=1828066=rev
Log:
Javadoc fixes.

Modified:

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionRegistry.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java?rev=1828066=1828065=1828066=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java
 Fri Mar 30 14:31:33 2018
@@ -47,6 +47,7 @@ public class PoolableManagedConnectionFa
  * Create a PoolableManagedConnectionFactory and attach it to a connection 
pool.
  *
  * @param connFactory XAConnectionFactory
+ * @param dataSourceJmxName JMX name of the datasource
  */
 public PoolableManagedConnectionFactory(final XAConnectionFactory 
connFactory,
 final ObjectName dataSourceJmxName) {

Modified: 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionRegistry.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionRegistry.java?rev=1828066=1828065=1828066=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionRegistry.java 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionRegistry.java 
Fri Mar 30 14:31:33 2018
@@ -127,7 +127,7 @@ public class TransactionRegistry {
 
 /**
  * Unregisters a destroyed connection from {@link TransactionRegistry}
- * @param connection
+ * @param connection The connection
  */
 public synchronized void unregisterConnection(final Connection connection) 
{
 final Connection key = getConnectionKey(connection);



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



buildbot failure in on tomcat-trunk

2018-03-30 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/3160

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1828065
Blamelist: remm

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot




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



svn commit: r1828065 [1/2] - in /tomcat/trunk: java/javax/transaction/ java/javax/transaction/xa/ java/org/apache/tomcat/dbcp/dbcp2/managed/ res/checkstyle/ webapps/docs/

2018-03-30 Thread remm
Author: remm
Date: Fri Mar 30 14:15:56 2018
New Revision: 1828065

URL: http://svn.apache.org/viewvc?rev=1828065=rev
Log:
Add missing managed package to DBCP, so that it is possible to use it with a 
transaction manager. The removal was not actually documented, it simply stated 
DBCP2 was included so no change in the docs.
The transaction manager or user code will have to provide the object factory to 
create the BasicManagedDataSource instance and call setTransactionManager on it.

Added:
tomcat/trunk/java/javax/transaction/
tomcat/trunk/java/javax/transaction/HeuristicCommitException.java   (with 
props)
tomcat/trunk/java/javax/transaction/HeuristicMixedException.java   (with 
props)
tomcat/trunk/java/javax/transaction/HeuristicRollbackException.java   (with 
props)
tomcat/trunk/java/javax/transaction/InvalidTransactionException.java   
(with props)
tomcat/trunk/java/javax/transaction/NotSupportedException.java   (with 
props)
tomcat/trunk/java/javax/transaction/RollbackException.java   (with props)
tomcat/trunk/java/javax/transaction/Status.java   (with props)
tomcat/trunk/java/javax/transaction/Synchronization.java   (with props)
tomcat/trunk/java/javax/transaction/SystemException.java   (with props)
tomcat/trunk/java/javax/transaction/Transaction.java   (with props)
tomcat/trunk/java/javax/transaction/TransactionManager.java   (with props)
tomcat/trunk/java/javax/transaction/TransactionRequiredException.java   
(with props)
tomcat/trunk/java/javax/transaction/TransactionRolledbackException.java   
(with props)
tomcat/trunk/java/javax/transaction/TransactionSynchronizationRegistry.java 
  (with props)
tomcat/trunk/java/javax/transaction/UserTransaction.java   (with props)
tomcat/trunk/java/javax/transaction/xa/
tomcat/trunk/java/javax/transaction/xa/XAException.java   (with props)
tomcat/trunk/java/javax/transaction/xa/XAResource.java   (with props)
tomcat/trunk/java/javax/transaction/xa/Xid.java   (with props)
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java
   (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/DataSourceXAConnectionFactory.java
   (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/LocalXAConnectionFactory.java
   (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/ManagedConnection.java   
(with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/ManagedDataSource.java   
(with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnection.java
   (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java
   (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionContext.java  
 (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionContextListener.java
   (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/TransactionRegistry.java 
  (with props)

tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/XAConnectionFactory.java 
  (with props)
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/package-info.java   
(with props)
Modified:
tomcat/trunk/res/checkstyle/javax-import-control.xml
tomcat/trunk/res/checkstyle/org-import-control.xml
tomcat/trunk/webapps/docs/changelog.xml

Added: tomcat/trunk/java/javax/transaction/HeuristicCommitException.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/transaction/HeuristicCommitException.java?rev=1828065=auto
==
--- tomcat/trunk/java/javax/transaction/HeuristicCommitException.java (added)
+++ tomcat/trunk/java/javax/transaction/HeuristicCommitException.java Fri Mar 
30 14:15:56 2018
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.transaction;
+
+public class HeuristicCommitException extends java.lang.Exception {
+public HeuristicCommitException() {
+super();
+}
+
+public HeuristicCommitException(String msg) {
+  

svn commit: r1828065 [2/2] - in /tomcat/trunk: java/javax/transaction/ java/javax/transaction/xa/ java/org/apache/tomcat/dbcp/dbcp2/managed/ res/checkstyle/ webapps/docs/

2018-03-30 Thread remm
Added: 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnection.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnection.java?rev=1828065=auto
==
--- 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnection.java
 (added)
+++ 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnection.java
 Fri Mar 30 14:15:56 2018
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tomcat.dbcp.dbcp2.managed;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Collection;
+
+import org.apache.tomcat.dbcp.dbcp2.PoolableConnection;
+import org.apache.tomcat.dbcp.pool2.ObjectPool;
+
+/**
+ * PoolableConnection that unregisters from TransactionRegistry on Connection 
real destroy.
+ *
+ * @see PoolableConnection
+ * @since 2.0
+ */
+public class PoolableManagedConnection extends PoolableConnection {
+private final TransactionRegistry transactionRegistry;
+
+
+/**
+ * Create a PoolableManagedConnection.
+ *
+ * @param transactionRegistry transaction registry
+ * @param conn underlying connection
+ * @param pool connection pool
+ */
+public PoolableManagedConnection(final TransactionRegistry 
transactionRegistry,
+final Connection conn, final ObjectPool pool) {
+this(transactionRegistry, conn, pool, null, false);
+}
+
+
+/**
+ * Create a PoolableManagedConnection.
+ *
+ * @param transactionRegistry transaction registry
+ * @param conn underlying connection
+ * @param pool connection pool
+ * @param disconnectSqlCodes SQL_STATE codes considered fatal 
disconnection errors
+ * @param fastFailValidation true means fatal disconnection errors cause 
subsequent
+ *validations to fail immediately (no attempt to run query or 
isValid)
+ */
+public PoolableManagedConnection(final TransactionRegistry 
transactionRegistry,
+final Connection conn, final ObjectPool pool,
+final Collection disconnectSqlCodes,
+final boolean fastFailValidation) {
+super(conn, pool, null, disconnectSqlCodes, fastFailValidation);
+this.transactionRegistry = transactionRegistry;
+}
+
+
+/**
+ * Actually close the underlying connection.
+ */
+@Override
+public void reallyClose() throws SQLException {
+try {
+super.reallyClose();
+} finally {
+transactionRegistry.unregisterConnection(this);
+}
+}
+}

Propchange: 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnection.java
--
svn:eol-style = native

Added: 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java?rev=1828065=auto
==
--- 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java
 (added)
+++ 
tomcat/trunk/java/org/apache/tomcat/dbcp/dbcp2/managed/PoolableManagedConnectionFactory.java
 Fri Mar 30 14:15:56 2018
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language 

[GitHub] tomcat pull request #105: Iamtjw patch 1

2018-03-30 Thread IAMTJW
GitHub user IAMTJW opened a pull request:

https://github.com/apache/tomcat/pull/105

Iamtjw patch 1

set ervery war deployed timeout  when  a war  has endless loop and other 
war cannot deploy success,set timeout that some war can deploy success

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/IAMTJW/tomcat IAMTJW-patch-1

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tomcat/pull/105.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #105


commit 31b668626c7510ddd2fff3871981cb43862f23ed
Author: tianjunwei <924862077@...>
Date:   2017-09-16T06:53:48Z

改造为maven工程

commit 35f14cca4cd59fd15f1842774062442f64bdd7e6
Author: TJW 
Date:   2018-03-30T08:57:59Z

Update HostConfig.java

set time out ,when a war deployed and endless loop protect other war can 
deploy success

commit c975bf5769a23e36f541c989c2ca20d12f954e9c
Author: TJW 
Date:   2018-03-30T09:04:43Z

Delete pom.xml

删除pom.xml




---

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



Re: DBCP2 in Tomcat

2018-03-30 Thread Rémy Maucherat
On Thu, Mar 29, 2018 at 10:31 PM, Mark Thomas  wrote:

> On 29/03/18 20:58, Mark Thomas wrote:
> > On 29/03/18 14:39, Christopher Schultz wrote:
> >> On 3/29/18 9:30 AM, Rémy Maucherat wrote:
> >>> On Thu, Mar 29, 2018 at 3:15 PM, Christopher Schultz <
> >>> ch...@christopherschultz.net> wrote:
>  On 3/29/18 8:42 AM, Rémy Maucherat wrote:
> > On Thu, Mar 29, 2018 at 2:33 PM, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >> On 3/28/18 2:25 PM, Rémy Maucherat wrote:
> >>> Hi,
> >>>
> >>> In Tomcat, DBCP2 is missing the XA portion (all contained in a
> single
> >>> "managed" package). So at work I now got some people asking about
> that
> >>> removal, and that's always a bit annoying as they have to go to a
> >> separate
> >>> vanilla DBCP2 to get the functionality. Annoying sometimes.
> >>>
> >>> So it would be possible to add the classes in Tomcat (including the
> >>> javax.transaction to build, as that's the Tomcat way to deal with
>  that),
> >>> even though the user would need to add its own transaction manager
> to
>  do
> >>> anything with it.
> >>>
> >>> Should I now add it (only in 9/trunk) or instead leave things the
> way
> >> they
> >>> are ? Both work to be honest, it's just that I've been bitten by
> the
>  "we
> >>> only ship 3/4 of DBCP and I didn't know it" bug.
>
> Sorry. I meant to reply to this bit as well but forgot.
>
> From memory I left it out on the basis few people needed it and that we
> could always add it in later if there was demand.
>
> There appears to be demand so no objections here to adding that code.
>
> Ok, so if nobody complains, I'll add the classes today [based on the
8a71764 revision that was integrated in 9.0.3], this will make my usecase
better. I had to make the casual cleanups to pass Tomcat's checkstyle,
should that be contributed to DBCP ?

Rémy