[JBoss Seam] - Re: Seam and RichCliente
by stu2
"mauro(a)automaware.com.br" wrote : "gavin.king(a)jboss.com" wrote : There is no good, standards-compliant, way to pass a conversation id transparently over RMI. Even if there was, the semantics are questionable, since conversation state is local, not remotely accessible.
| |
| | For WS, the notion of a conversation is better-defined.
|
| I´m a bit confused...
| What I want to know is if I can use a Statefull Session Beans Seam Component colled remotly by an swing application (via a command handler)...
|
|
Hmm. Let's back up a bit. Stateful Session Beans are extremely useful in webapps since the main alternative for storing state between requests is generally to use the HttpSession - just a big per-user map. If you're client is a swing app, I would think you'd be fine with Stateless Session beans. Your client is more than capable of storing state on its own.
So my question is, given that you have a stateful client to begin with, and that accessing SLSB via RMI is a given, do you really need SFSB access? Seam's SFSB-JBPM integration would be one reason that would still be appealing I guess, but is that what you're after?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033325#4033325
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033325
17Â years, 9Â months
[Installation, Configuration & Deployment] - JBoss 4.0.4 using UnifiedClassLoader despite config
by Steveco
We're using JBoss 4.0.4 on Linux and OSX. We have it configured to not use the UnifiedClassLoader, but it still does for some of our classes. My immediate problem is that I'm catching an EJBException in my web app, and I want to get the exception contained in the EJBException and cast it to one of our custom exceptions so I get to the extra data in the custom exception. However the EJBException and the exception it contains are loaded by the UnifiedClassLoader and the web app code is loaded by the WebappClassLoader, so I get a ClassCastException when I try it.
Our ear file contains a jboss-app.xml, which contains this:
<jboss-app>
| <loader-repository>
| com.shopzilla:loader=shoppingcart.ear
| <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
| </loader-repository>
| </jboss-app>
Our war file contains a jboss-web.xml, which contains this:
<jboss-web>
| <class-loading java2ClassLoadingCompliance="false">
| <loader-repository>
| com.shopzilla:loader=samples.war
| <loader-repository-config>
| java2ParentDelegation=false
| </loader-repository-config>
| </loader-repository>
| </class-loading>
| </jboss-web>
I deployed those files and restarted JBoss to make sure they took effect. Now when I go to the JMX Console I see the loaders:
com.shopzilla
| * loader=samples.war
| * loader=shoppingcart.ear
but I still get the ClassCastException.
I tried changing my ear-deployer.xml to this:
<server>
| <!-- EAR deployer, remove if you are not using ear deployments -->
| <mbean code="org.jboss.deployment.EARDeployer"
| name="jboss.j2ee:service=EARDeployer">
| <!-- A flag indicating if ear deployments should have their own scoped
| class loader to isolate their classes from other deployments.
| -->
| <attribute name="Isolated">true</attribute>
| <!-- A flag indicating if the ear components should have in VM call
| optimization disabled.
| -->
| <attribute name="CallByValue">true</attribute>
| </mbean>
| </server>
and restarting JBoss, but that didn't help either.
I added some println()s to see the classloaders.
System.out.println("ee.getCausedByException().getClass().getClassLoader(): " + ee.getCausedByException().getClass().getClassLoader());
produces
09:29:04,822 INFO [STDOUT] ee.getCausedByException().getClass().getClassLoader(): org.jboss.mx.loading.UnifiedClassLoader3@1f5205c{ url=file:/home/scorwin/apps/jboss-4.0.4.GA/server/shoppingcart/tmp/deploy/tmp38558shoppingcart.ear ,addedOrder=42}
ee is an EJBException, so that's why I think that it's being loaded by the UnifiedClassLoader.
If I create an instance of my custom exception named uaeeFoo,
UsernameAlreadyExistsException uaeeFoo = new UsernameAlreadyExistsException("fubar");
| System.out.println("uaeeFoo.getClass().getClassLoader(): " + uaeeFoo.getClass().getClassLoader());
produces
09:29:04,823 INFO [STDOUT] uaeeFoo.getClass().getClassLoader(): WebappClassLoader
| delegate: false
| repositories:
| /WEB-INF/classes/
| ----------> Parent Classloader:
| java.net.FactoryURLClassLoader@d5f9b9
Is there some setting I missed that would cause it to ignore my other settings and keep using the UnifiedClassLoader?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033320#4033320
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033320
17Â years, 9Â months