Tim Brizard

Greenhorn
+ Follow
since May 14, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tim Brizard

Hi all,

I have one .ear file which contains a straight-forward Stateless Session Bean. I have a second .ear file that contains some JSP files. I have a ServiceLocator class(in 2nd .ear file) that is called by the JSP files in the 2nd .ear file which has the following code:



However, the call to the PortableRemoteObject.narrow method throws a
java.lang.ClassCastException. I've been reading many posts that explain the way the JBOSS classloaders work and how that it basically creates a "flat" classloader repository. I've also read that a class definition is only loaded once and the first classloader to load it wins. So, in my case I think the first .ear file, the one with the EJB and binding the object to JNDI has one classloader. The ServiceLocator is using a different classloader, which is causing this exception to occur.

So, my question is how can I get the ServiceLocator to use the same classloader that was used by the 1st .ear with the EJB?

thanks in advance

19 years ago
try something like this:

20 years ago
Jess,
In the past I've used a BusinessDelegate(s) which gets called from my Action class(s). The business delegate does not know anything about servlet classes or struts classes. So, I can write my junit tests without having to create Mock objects, just test the business functionality that is exposed by the methods on the business delegate(s). The business delegate, then uses whatever other classes you have designed (Session Facade, BOs, etc.). This way there is little testing of the Action class that is needed, because you would essentially be testing the Struts Framework. Hope this helps.
[ May 14, 2004: Message edited by: Tim Brizard ]
20 years ago
Hi,
I'm seeing a problem when submitting a form that does not make any sense. I have a simple JSP which has a single input text field and 2 image buttons. When the user enters something into the text field and presses Enter, only the text field is submitted in the request as a parameter - no image button. However, if I add another input text field, then when the user enters something into the text field the text field and image button are both submitted in the request as parameters. So, why does having only 1 text input field cause the image button to not be submitted when the user presses the Enter key?

here is the form portion of the JSP:


using the above, I have the problem I described. but if I simply add another html:text tag like the one for distributorName, then it works fine.

thanks,
Tim

[ May 14, 2004: Message edited by: Tim Brizard ]
[ May 14, 2004: Message edited by: Tim Brizard ]
20 years ago