-
2. Re: Moving from JBoss 4.0.1 to 4.0.4
rdoust Jul 3, 2006 11:11 PM (in response to rdoust)Thanks for that tip Scott, but I'm thinking that's not the solution to my problem. I'm actually looking up a remote home interface from the web tier at the point where an exception occurs because the home is not bound.
I used the jboss installer script when I installed jboss 4.0.4, and one of the questions it asked was whether it should use pass-by-value semantics by default. I didn't select that option when I first installed. I thought that might have something to do with my problem, so I removed the install and did it again, this time checking the option. The log entries are a little different, though mostly the same as I recall, which made me think I hadn't solved the problem, but I was able to bring up the application with no further problems. -
3. Re: Moving from JBoss 4.0.1 to 4.0.4
rdoust Jul 6, 2006 7:21 PM (in response to rdoust)I'm going to try to be more specific.
I have a session bean defined in a jar file that's packaged with a war file into an ear. The session bean is declared in its ejb-jar.xml as follows:<session> <display-name>The Shopping Client Controller</display-name> <ejb-name>TheShoppingClientController</ejb-name> <home>com.control.ejb.ShoppingClientControllerHome</home> <remote>com.control.ejb.ShoppingClientController</remote> <ejb-class>com.control.ejb.ShoppingClientControllerEJB</ejb-class> <session-type>Stateful</session-type> <transaction-type>Container</transaction-type> . . </session>
The jboss.xml file contains the following:<session> <ejb-name>TheShoppingClientController</ejb-name> <jndi-name>foo/scc</jndi-name> . . </session>
The web.xml contains the following:<ejb-ref> <ejb-ref-name>ejb/scc/Scc</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>com.control.ejb.ShoppingClientControllerHome</home> <remote>com.control.ejb.ShoppingClientController</remote> </ejb-ref>
The jboss-web.xml contains the following:
<ejb-ref>
<ejb-ref-name>ejb/scc/Scc</ejb-ref-name>
<jndi-name>foo/scc</jndi-name>
</ejb-ref>
In the web-tier the code does this:public static ShoppingClientControllerHome getSCCHome() throws javax.naming.NamingException { InitialContext initial = new InitialContext(); Object objref = initial.lookup("java:comp/env/ejb/scc/Scc"); return (ShoppingClientControllerHome) PortableRemoteObject.narrow(objref, ShoppingClientControllerHome.class); }
-
4. Re: Moving from JBoss 4.0.1 to 4.0.4
rdoust Jul 6, 2006 7:49 PM (in response to rdoust)This code worked without a hitch under JBoss 4.0.1. In 4.0.4 it works if the system is installed with Pass By Value semantics by default (PBV), but PortableRemoteObject's narrow method throws a ClassCastException if 4.0.4 is installed without the Pass By Value semantics by default (PBR).
When the application is deployed into PBR, there is output in server.log to the effect that ShoppingClientController cannot be Bound because it has no local or local home interfaces. It then says it's (re-)Binding, and that seems to throw no exceptions, so, presumably, something has been bound. In the PBV version, no error messages having to do with missing interfaces are produced. I have added the allegedly missing interfaces in the PBR version and gotten rid of the complaints in the server.log, but the code still doesn't work, i.e., it still produces a ClassCastException.
I'm trying to move my application to a hosted server with JBoss pre-installed in the PBV configuration and would like for this code to work there. -
5. Re: Moving from JBoss 4.0.1 to 4.0.4
rdoust Jul 6, 2006 8:07 PM (in response to rdoust)Mistake in last sentence. I want to deploy to a server with JBoss pre-installed in the PBR configuration.
-
6. Re: Moving from JBoss 4.0.1 to 4.0.4
rdoust Jul 6, 2006 11:44 PM (in response to rdoust)Wow! I don't know how people keep up with this stuff. I've just read this page:
http://jira.jboss.com/jira/browse/JBAS-1691
The most important thing I found on that page was this:
(in tomcat55.sar/META-INF/jboss-service.xml)
To revert to pre-4.0.2 config use:
true
true
Works like a charm again. How do you people keep up with this class loading nightmare? -
7. Re: Moving from JBoss 4.0.1 to 4.0.4
rdoust Jul 6, 2006 11:45 PM (in response to rdoust)To revert to pre-4.0.2 config use:
<attribute name="Java2ClassLoadingCompliance">true</attribute> <attribute name="UseJBossWebLoader">true</attribute>