Skip to content
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

[regression] [runtime] Some components not loaded by the MeteorServlet #228

Closed
cmarginean opened this issue Mar 15, 2012 · 3 comments
Closed

Comments

@cmarginean
Copy link

When using the MeteorSerlvet, other features (like using a JMSBroadcaster for example) are not available. Looking at the code, I can see the constructor overrides the definition of the "protected AtmosphereFramework framework":

public MeteorServlet(boolean isFilter) {
    framework = new AtmosphereFramework(isFilter) {
   ...

Is it that we might need to extend the framework configuration instead of overriding it? I managed to implement the following change that would solve the problem of accessing different components (JMS components in my case). Please let me know if this makes sense

Cheers,
Cosmin

....
public MeteorServlet() {
}

public MeteorServlet(boolean isFilter) {
    super(isFilter);
}

@Override
public void init(final ServletConfig sc) throws ServletException {
    super.init(sc);

    String servletClass = sc.getInitParameter(SERVLET_CLASS);
    String mapping = sc.getInitParameter(MAPPING);
    String filterClass = sc.getInitParameter(FILTER_CLASS);
    String filterName = sc.getInitParameter(FILTER_NAME);

    ReflectorServletProcessor r = new ReflectorServletProcessor();
    r.setServletClassName(servletClass);
    r.setFilterClassName(filterClass);
    r.setFilterName(filterName);

    if (mapping == null) {
        mapping = "/*";
    }
    framework.addAtmosphereHandler(mapping, r);
}
.....
@jfarcand
Copy link
Member

Good catch, this is a regression. Will fix it asap

@jfarcand
Copy link
Member

Fixed. Sorry for the regression.

@cmarginean
Copy link
Author

Awesome. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants