1 2 3 4 Previous Next 45 Replies Latest reply: Mar 3, 2014 6:28 AM by Christina KTM Go to original post RSS
  • 15. Re: memcached session manager and jboss
    Martin Grotzke Newbie

    Hi David,

     

    This seems to be another difference of jbossweb and tomcat.

     

    I'm just checking out if I can create a version for jbossweb...

     

    Cheers,

    Martin

  • 16. Re: memcached session manager and jboss
    Martin Grotzke Newbie

    Hi David,

     

    I have created a version that should work with jbossweb (built against 2.1.7.GA). It's based on a new structure of msm, which I'm currently working on and hope to release soon.

     

    Unfortunately I couldn't get integration tests of msm to work with jbossweb due to some changes compared to tomcat.

    As I couldn't change loggers in core msm to jboss logger, I introduced an adapter for juli -> jbosslogging, with the effect, that the printed class/method is always my logadapter.info (debug or whatelse), also needs to be fixed (but doesn't compromise functionality).

     

    There are now 2 msm jars you have to put into lib: the core msm jar and the jboss specific one:

    http://dl.dropbox.com/u/1439289/msm-all-memcached-session-manager-1.5.0-SNAPSHOT.jar

    http://dl.dropbox.com/u/1439289/msm-all-memcached-session-manager-jbossweb2-1.5.0-SNAPSHOT.jar

     

     

    Cheers,

    Martin

  • 17. memcached session manager and jboss
    Martin Grotzke Newbie

    I think to make a jbossweb version you should just add the dependencies to jbossweb and jbosslogging and rebuild your package.

    I don't find a jbossweb 6.x artifact, only some 3.x (jboss.web.jbossweb) or 7.x (org.jboss.web), using the nexus search.

     

    Can you point me to the dependency spec (groupId:artifactId:version) and a repository that I need to include for jboss6 jbossweb?

    After digging around I chose these deps:

    jboss.web:jbossweb:2.1.7.GA

    org.jboss.logging:jboss-logging:3.0.0.Beta2

     

    And this repo: https://repository.jboss.org/nexus/content/repositories/releases

     

    I noticed semantical changes in StandardSession.{thisAccessedTime,lastAccessedTime} so that I had to change some msm code for this.

    Do you know other semantical changes like these?

     

    Now I have some issues left:

    1) In integration tests I start several embedded tomcats (using Embedded). The MapperListener.registerHost unfortunately uses the static ServerFactory.getServer() which always returns the first tomcat, so that for the second tomcat the engine cannot be found and an NPE is thrown. Do you have an idea how this can be fixed?

     

    2) I have integrations tests with container managed autentication. For tomcat (6, 7) I'm setting up a NamingContext with a MemoryUserDatabase, which does not exist. Additionally I'm setting a UserDatabaseRealm which is also not available in jbossweb. You can have a look at the code here. Can I do the same with jbossweb?

     

    3) Logging: I couldn't replace the juli Log references in msm core to use jboss logging Logger. For this I introduced an adapter from juli -> jboss logging. This has the effect that the printed class/method is always my introduced adapter (due to the additional method call / stack frame). Do you have an idea how I could come around this?

     

    Shall we contain discussing this here in this thread, or do you suggest s.th. else?

     

    Thx && cheers,

    Martin

  • 19. Re: memcached session manager and jboss
    Martin Grotzke Newbie

    https://repository.jboss.org/nexus/content/groups/public/org/jboss/web/jbossweb/ 3.0.x is for AS7 and 7.0.x for AS7.

    Typo? What's the difference between AS7 and AS7? Or is 3.0.x for AS6?

     

    Which version exactly should I use for Jboss AS6 Jbossweb? 3.0.0-CR1? What's the meaning of "CR" here btw?

     

    Did you see my other questions?

  • 20. Re: memcached session manager and jboss
    Jean-Frederic Clere Master

    Oops typo 3.0.x for AS6 and 7.0.x for AS7.

  • 21. memcached session manager and jboss
    Martin Grotzke Newbie

    Ok, I changed the dependency to org.jboss.web:jbossweb:3.0.0-CR1.

     

    Now I'm stuck at finding an appropriate Loader implementation to set on the context. Is there a replacement for WebappLoader?

  • 22. memcached session manager and jboss
    Jean-Frederic Clere Master

    Hm in fact you will need to use a servlet 3.0 session listener. The + is that would work for all servlet 3.0 containers.

  • 24. memcached session manager and jboss
    Martin Grotzke Newbie

    Perhaps we're talking about different things. I'm trying to get the embedded tomcat (that I'm using for integration tests) running with jbossweb 3.x.

     

    With WebappLoader I was referring to the setup of a StandardContext for integration-testing and setting a Loader on the context (like following uncommented lines):

    https://github.com/magro/memcached-session-manager/blob/msm-modules/jbossweb3/src/test/java/de/javakaffee/web/msm/integration/TestUtilsJBW3.java#L281

     

    As a side note: I just pushed my work-in-progress to github so that you can have a look at the current state of implementation. The TestUtilsJBW3 shows the jbossweb3 specific version (needs much cleanup when things compile and run).

     

    The problem is that I see the Loader interface in jbossweb 3.x but no implementation and in particular no WebappLoader.

     

    I need this as the MemcachedSessionService (main class of msm) during initialization loads the configured TranscoderFactory (responsible for serializing/deserializing sessions) using the classloader of the WebappLoader:

    https://github.com/magro/memcached-session-manager/blob/msm-modules/core/src/main/java/de/javakaffee/web/msm/MemcachedSessionService.java#L478

     

    Can you help with this? Is there a replacement of the WebappLoader in jbw3, how could I solve this differently so that it works with jbossweb?

  • 25. memcached session manager and jboss
    Martin Grotzke Newbie

    hi,how to use the  memcached session manager and jboss  on jboss4.2.2GA

     

     

    http://dl.dropbox.com/u/1439289/memcached-session-manager-1.4.2-SNAPSHOT.jar  is not open ?

     

    I can still download this file, but I also just sent you an email with it attached.

     

    But be warned, it's compiled against jbossweb 2.1.7 (IIRC), and I'm not sure if it's really working (at runtime) with jbossweb 2.1.7.

    The problem is that jbossweb contains some changes compared to tomcat that breaks some of the memcached-session-manager integration tests related to container managed authentication, so that I can't run the whole test suite.

     

    Additionally I don't know which version of jbossweb jboss4.2.2GA really uses.

     

    So everything is on your own risk - as always :-)

     

    Still, if you can tell me which version of jbossweb is used by jboss4.2.2GA I can see if I can build an msm version against this and we see how far we can push it (with the help of Jean-Frederic :-)).

     

    Cheers,
    Martin

  • 26. Re: memcached session manager and jboss
    kennyr huang Newbie

    thanks a lot

     

    About  jboss-web at jboss4.2.2GA  description ,detail please  attach ,thanks.

     

    JBoss Web v2.x is the web container in JBossAS 4.2, an implementation based on Apache Tomcat that includes the Apache Portable Runtime (APR) and Tomcat native technologies to achieve scalability and performance characteristics that match and exceed the Apache Http server. In the absence of the native libraries, JBoss Web falls back to the standard non-native connector mode. The native libraries need to be downloaded and installed separately in JBOSS_HOME/bin/native.

     

    readme.html

  • 27. memcached session manager and jboss
    Jean-Frederic Clere Master

    In 7.0.x we don't use Embedded but the StandardService.

     

    I think the  WebappLoader could be replaced by your own Loader implementation you just need the ClassLoader correct?

  • 28. memcached session manager and jboss
    kennyr huang Newbie

    I  replaced the jar  , the jboss console show :

     

    2011-05-19 13:25:38,095 ERROR [STDERR] 2011-5-19 13:25:38 org.apache.tomcat.util.digester.Digester startElement

    严重: Begin event threw error

    java.lang.NoSuchMethodError: org.apache.tomcat.util.digester.Digester.getLogger()Lorg/jboss/logging/Logger;

    at org.apache.catalina.startup.SetParentClassLoaderRule.begin(Catalina.java:704)

    at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1358)

    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644)

    at org.apache.catalina.startup.Catalina.load(Catalina.java:514)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:568)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)

    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)

    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

    at org.jboss.web.tomcat.service.JBossWeb.startService(JBossWeb.java:440)

    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)

    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

    at $Proxy0.start(Unknown Source)

    at org.jboss.system.ServiceController.start(ServiceController.java:417)

    at org.jboss.system.ServiceController.start(ServiceController.java:435)

    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

    at $Proxy4.start(Unknown Source)

    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)

    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)

    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

    at $Proxy9.deploy(Unknown Source)

    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)

    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)

    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)

    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)

    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

    at $Proxy0.start(Unknown Source)

    at org.jboss.system.ServiceController.start(ServiceController.java:417)

    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

    at $Proxy4.start(Unknown Source)

    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)

    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)

    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)

    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)jboss.bmp

    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(Abstract

  • 29. Re: memcached session manager and jboss
    Martin Grotzke Newbie

    In 7.0.x we don't use Embedded but the StandardService.

    Ok, I'll have a look at this as soon as I start creating a msm version for jbossweb 7.0.x

     

    I think the  WebappLoader could be replaced by your own Loader implementation you just need the ClassLoader correct?

    Right. The correct classloader is the classloader that's used for webapp classes (loaded from WEB-INF/classes or WEB-INF/lib).

    For integration tests I can just use the classloader of the current thread.

     

    For a running jbossweb instance, I wonder if manager.getContainer().getLoader().getClassLoader() will return the appropriate classloader. Can you tell this?