-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Alternate Session Managers in Standalone War Bootstrap #5
Conversation
…property configurable in the pom.xml. By default the valve is enabled.
…s that implements a createSessionManager() function, this class will be called and used to construct the session manager you want. This is useful for having your standalone instance use the memcached-session-manager project.
You should keep commits for different pull requests in separate branches and don't mix'em up. Your solution seems to be very specific to your specific needs. I've never looked into Tomcat7RunnerCli, but I'd look for some extension points or add them, so that a value is created that's useful for others as well. Then it's more likely that your patch will be accepted. Because this is only a mirror of the official repo, do you think the PR is really noticed? (Also the last PR was merged 2 years ago, and there's one PR open since 10 months). Maybe you should see what's the "official" way to get changes into the code base. |
This is why I love the open source community.
I absolutely agree, my mistake. I decided to see if this PR would generate any constructive critiques before cleaning it up, and the other modification is minor and constructive.
You've never looked at the code, yet you are venturing an opinion on the implementation? I did look at the code, and there is no current extension point. If you have a suggestion for a more Apache-like, or Tomcat-like method for adding extensions like this, I'd be happen to consider and implement it. As is, this was a simple way to get a proof of concept going and provide something that is useful to others: namely, a way to override the SessionManager in a flexible way. Perhaps its not clear from the PR, but the MemcacheSessionManager is only one possible implementation, this PR would support any SessionManager that implements with a zero-args constructor factory class.
I filed a bug and in the official Apache JIRA and it was triaged, so I think I've got that covered, but please let me know if you think I missed anything. |
For future posterity, here is the JIRA ticket: https://issues.apache.org/jira/browse/MTOMCAT-250 |
It was not meant as an offense, I just wanted to share my impression. Basically I would try to add more general concepts that support more use
As said above, I'd try to add some Plugin concept that allows to add
Not sure if it would really would work like this, just a rough idea. But basically I think the most important thing is to get in touch with
I just voted for it :-) |
Hi @magro , first I want to apologize for being a bit sharp, I was caught off guard a bit. Based on how well structured and formalized the MSM code is, I know you are a very thorough engineer, so I respect the desire to make things as flexible and organized as possible. In this specific case, I think the tomcat-standalone code is not written with such a formalized approach, and I get the impression it was written with an "I've got a specific use case" approach by its developers, so I took that approach for this patch. If the maintainers want to take this feature request as a call for broadening the overall flexibility of the standalone code, thats fine, but I feel it is out of scope for this specific use case and no reason to delay integration of this the patch. I say that because I don't believe the style of the code implemented differs significantly from the existing code, not because I feel the existing code is as generalized as it could be. I don't consider it my place to take on that level of architectural refactoring. For the proposed patch to the MSM code I feel differently, since I realize the patch IS out of character for the existing code. |
import java.util.Map; | ||
import java.util.Properties; | ||
import java.util.StringTokenizer; | ||
import java.util.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we usually avoid using * import
pr merged. |
@jbcpollak could you please close the pr? |
Oops sorry! |
This PR adds the ability to specify a session manager factory on the command line within the standalone war. This can be used with any session manager that has a factory class with a zero-argument constructor.
Using this patch, in conjunction with a matching memcached-session-manager patch, you can use the memcached-session-manager with start your standalone project like this:
The memcached-session-manager patch can be found here:
magro/memcached-session-manager#33