[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-development
Subject:    [JBoss-dev] [Design of JBoss Remoting, Unified Invokers] - configuration of RMI dynamic classloading
From:       winterer <nukes () jboss ! org>
Date:       2005-03-31 18:01:06
Message-ID: 9621461.1112292066980.JavaMail.jboss () colo-br-02 ! atl ! jboss ! com
[Download RAW message or body]

Hi!

I'm currently working on a simple EJB application using EJB 3.0. One design goal is \
to not have any EJB-related code on the client - not even the remote interfaces! But \
for some reason, dynamic classloading does not work as expected.

The idea is to have a general (non-remote) interface (let's say "Calculator") that is \
extended by the remote interface (let's say "CalculatorRemote") that does not declare \
any additional methods. The implementation of the "CalculatorRemote" interface is the \
session bean "CalculatorBean". When packaging the client, it only contains the \
Calculator interface (and the client-implementation of course). But when I try to \
lookup the CalculatorBean inside the client, I get a "ClassNotFoundException: \
CalculatorRemote".

  | /* Calculator */
  | public interface Calculator {
  |   public int add(int a, int b);
  | }
  | 
  | /* CalculatorRemote */
  | @Remote
  | public interface CalculatorRemote extends Calculator { /* empty */ }
  | 
  | /* CalculatorBean */
  | @Stateless
  | public class CalculatorBean implements CalculatorRemote {
  |   public int add(int a, int b) { return a + b; }
  | }
  | 
  | /* client code */
  | ...
  | Calculator calc = (Calculator)ctx.lookup("CalculatorRemote");
  | int sum = calc.add(3, 5);
  | ...
  | 
Shouldn't the CalculatorRemote interface be dynamically loaded from the server? Is \
dynamic classloading enabled by default or do I have to change some configuration \
files on JBoss?

Thanks,
  Tex

View the original post : \
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872231#3872231

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872231



-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic