Re: [jboss-user] [JBoss AOP] - calling aspect from netty thread inside jboss 5.1
by Gabriel Bermudez
Gabriel Bermudez [http://community.jboss.org/people/elgabo] replied to the discussion
"calling aspect from netty thread inside jboss 5.1"
To view the discussion, visit: http://community.jboss.org/message/550649#550649
--------------------------------------------------------------
Hi Kabir,
> Kabir Khan escribió:
>
> Is the Thread.currentThread().getContextClassLoader() in MyNetworkListener what you would expect for your application?
>
Thanks for your response. First of all I don't know what context to expect. When the MDB calls the aspectized methods the thread context toString() method returns BaseClassLoader@1c6e768{vfszip:/home/gabriel/devel/tools/jboss-5.1.0.GA/server/default/deploy/base.jar/} it makes sense. The thread context is BaseClassLoader@d2b042{vfszip:/home/gabriel/devel/tools/jboss-5.1.0.GA/server/default/deploy/network.jar/} when the message is received.
> JBoss AOP doesn't really do anything fancy with classloaders unless your application uses isolated classloading, which I don't think is the case in your application.
> If you're using loadtime weaving, the -aop.xml stuff must be available before accessing the classes. For your basic.jar the deployers are smart enough to deploy the aop xml before the bean classes are loaded. Can you try getting rid of both jars, and then starting the server with basic.jar only. Once started deploy network.jar. If that helps, I'll dig out some resources on deployment ordering
I'm running my application inside JBoss 5.1, I'm not sure if it uses loadtime weaving by default. Actually I'm running the server using Eclipse 3.5 so if it helps here are the VM's arguments:
-Dprogram.name=run.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m
I started the server with basic.jar and the deployed network.jar, it didn't help.
Thanks for your answer.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550649#550649]
Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[JBoss Cache] - How to store information about tokens in JBoss Cache?
by Michal Szymanski
Michal Szymanski [http://community.jboss.org/people/michal_szymanski] created the discussion
"How to store information about tokens in JBoss Cache?"
To view the discussion, visit: http://community.jboss.org/message/550644#550644
--------------------------------------------------------------
Hi,
We have following problem. We have one node in Jboss Cache to store tokens (used for authorization) , each token can have a different expiration date.
I have a feeling that keeping all tokens in one node is not best solution because eviction algorithm works per node basis in our example we would like to use LRUAlgorithm but we cannot use it because as I wrote before all element are in one node (eviction works per-node basis :( ).
The second solution is to store each token in separate node but in such solution we can have 50000 nodes with one element ! I'm affraid that finding a token (=finding a node instead element) an be very slow because we will look for node instead of element also creating node as I know is not fast operation but in this solution we have to create node each time when token is created.
What is proper solution for our problem? It is a pitty that there is now eviction per element basis :(
Michal Szymanski
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550644#550644]
Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
Re: [jboss-user] [JBoss Tools] - Problem with Jboss Tools Maven
by Alexander Lengson
Alexander Lengson [http://community.jboss.org/people/sanches] replied to the discussion
"Problem with Jboss Tools Maven"
To view the discussion, visit: http://community.jboss.org/message/550605#550605
--------------------------------------------------------------
Hello http://community.jboss.org/people/snjeza Snjezana,
I've got similar problem with multiple nested lib directories with Eclipse Galileo 3.5.2.
Luckily, I found your message and resolved it with (Patches 2010 04 13). btw, I clicked Maven -> Update project settings to fix the issue with nested lib dirs.
However, another problem still hasn't gone with that patch:
For the project which should compose EAR file, eclipse generates META-INF/application.xml which is rather different from the one built by pure maven command-line. And that one generated and deployed by eclipse can not be recognized by http://jboss-5.1.0.ga/ jboss-5.1.0.GA. Stack trace:
18:36:04,769 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/jboss/ http://jboss-5.1.0.ga/server/standard/deploy/lightear.ear/ jboss-5.1.0.GA/server/standard/deploy/lightear.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying lightear.ear: failed to initialize bean container
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: failed to initialize bean container
at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:257)
at org.jboss.ejb3.mdb.MessagingContainer.<init>(MessagingContainer.java:87)
at org.jboss.ejb3.mdb.MDB.<init>(MDB.java:63)
at org.jboss.ejb3.Ejb3AnnotationHandler.getMDB(Ejb3AnnotationHandler.java:339)
at org.jboss.ejb3.Ejb3AnnotationHandler.getContainers(Ejb3AnnotationHandler.java:218)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:734)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:685)
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:667)
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:630)
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:507)
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
... 33 more
Caused by: java.lang.IllegalStateException: Null beannMetaData
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:315)
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.initialise(BeanInterceptorMetaDataBridge.java:235)
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.<init>(BeanInterceptorMetaDataBridge.java:138)
at org.jboss.ejb3.interceptors.metadata.AdditiveBeanInterceptorMetaDataBridge.<init>(AdditiveBeanInterceptorMetaDataBridge.java:48)
at org.jboss.ejb3.aop.BeanContainer.initialize(BeanContainer.java:195)
at org.jboss.ejb3.EJBContainer.<init>(EJBContainer.java:253)
... 43 more
Caused by: java.lang.NullPointerException
at org.jboss.ejb3.interceptors.metadata.BeanInterceptorMetaDataBridge.setupMetaDataLists(BeanInterceptorMetaDataBridge.java:268)
... 48 more
18:36:04,898 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
Normally, Maven generates following content for application.xml:
...
<module>
<ejb>environment.jar</ejb>
</module>
...
(and appropriate directory structure)
But fresh installed eclipse galileo plus http://download.jboss.org/jbosstools/updates/stable/galileo/ JBoss Tools 3.1 :: Eclipse 3.5.2 generates different one:
...
<module>
<ejb>environment-1.0-SNAPSHOT.ejb</ejb>
</module>
...
Differences:
1) "-1.0-SNAPSHOT" is appended
2) .ejb extension is instead of .jar
Deployed on the server directory also contains folders named ...-1.0-SNAPSHOT.ejb
As a result of such deployment descriptor+directory structure, Jboss can not recognize deployment and throws exception (above)
Is this also known problem?
Thanks,
Alexander.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550605#550605]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months