You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "michael-o (via GitHub)" <gi...@apache.org> on 2023/06/09 11:27:39 UTC

[GitHub] [tomcat] michael-o opened a new pull request, #624: Add ContextNamingInfoListener

michael-o opened a new pull request, #624:
URL: https://github.com/apache/tomcat/pull/624

   A listener which creates context naming information environment entries.
   
   This is something which I have been using for years at work. It suited for all components which dot not have access to Tomcat internals, but need context information, e.g., 
   
   In Logback:
   ```
   <configuration>
   	<insertFromJNDI env-entry-name="java:comp/env/context/baseName" as="contextName" />
   	<contextName>${contextName}</contextName>
   ...
   </configuration>
   ```
   
   In Spring:
   ```
   <beans:bean id="contextSource" class="org.springframework.ldap.pool2.factory.PooledContextSource">
   	<beans:constructor-arg>
   		<beans:bean class="org.springframework.ldap.pool2.factory.PoolConfig" p:testOnBorrow="true"
   			p:minEvictableIdleTimeMillis="300000" p:maxWaitMillis="5000"
   			p:jmxNameBase="org.apache.commons.pool2:context=${context/name},type=GenericKeyedObjectPool,name=" />
   	</beans:constructor-arg>
   </beans:bean>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [tomcat] markt-asf commented on pull request #624: Add ContextNamingInfoListener

Posted by "markt-asf (via GitHub)" <gi...@apache.org>.
markt-asf commented on PR #624:
URL: https://github.com/apache/tomcat/pull/624#issuecomment-1588774994

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [tomcat] rmaucher commented on pull request #624: Add ContextNamingInfoListener

Posted by "rmaucher (via GitHub)" <gi...@apache.org>.
rmaucher commented on PR #624:
URL: https://github.com/apache/tomcat/pull/624#issuecomment-1587415361

   No problem. I don't really mind the default value, it could go either way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [tomcat] michael-o merged pull request #624: Add ContextNamingInfoListener

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o merged PR #624:
URL: https://github.com/apache/tomcat/pull/624


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [tomcat] michael-o commented on pull request #624: Add ContextNamingInfoListener

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #624:
URL: https://github.com/apache/tomcat/pull/624#issuecomment-1588662647

   > No problem. I don't really mind the default value, it could go either way.
   
   Great, if there aren't any objections I will happily merge later this day.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [tomcat] rmaucher commented on pull request #624: Add ContextNamingInfoListener

Posted by "rmaucher (via GitHub)" <gi...@apache.org>.
rmaucher commented on PR #624:
URL: https://github.com/apache/tomcat/pull/624#issuecomment-1584598111

   I think I saw this feature before in the past. No problem, although emptyOnRoot may not be very useful, so I'm not sure why this is a good idea to change things from the actual values by default.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [tomcat] michael-o commented on pull request #624: Add ContextNamingInfoListener

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #624:
URL: https://github.com/apache/tomcat/pull/624#issuecomment-1584626395

   > I think I saw this feature before in the past. No problem, although emptyOnRoot may not be very useful, so I'm not sure why this is a good idea to change things from the actual values by default.
   
   I posted this also on SO some years ago as well as with Logback's JIRA. The purpose of this flag is not to have an empty string if you try to resolve `name`. E.g., you use it for a file on the FS. `.foo`, but rather `ROOT.foo`. Same for context path.
   
   I can, of course, make the standard behavior default. It only affects root applications, though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [tomcat] michael-o commented on pull request #624: Add ContextNamingInfoListener

Posted by "michael-o (via GitHub)" <gi...@apache.org>.
michael-o commented on PR #624:
URL: https://github.com/apache/tomcat/pull/624#issuecomment-1587322206

   @rmaucher I have now applied the default context behavior. Please have a look again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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