Hello,

On Thu, 22 Mar 2001, Johan Nordin wrote:

> Hi,
> 
> I just fixed the problem, it was not a JBoss problem (of course) =)
> 
> It's a bugg in JWS,
> JWS does something wrong with the classloaders.
> 
> Before creating any InitialContext, 
> this code snipped must be included:
> (Found it on the discussion forum for JWS,
> http://forum.java.sun.com/read/56761/qAWFW4miqiQgAAY-i#LR).)
> 
> 
> try {
>   final ClassLoader jnlpCL = this.getClass().getClassLoader();
>   java.awt.EventQueue eq =
> java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
>   eq.invokeAndWait(new Runnable() {
>     public void run() {
>       Thread.currentThread().setContextClassLoader(jnlpCL);
>     }
>   });
> }
> catch (Exception e) {
> }

well - it is a jboss problem, jboss is not supplying bytecode for home and
remote interfaces at it's codebase (Webserver MBean) ... or for any other
class that is in .jars of deployed EJBs (please, correct me if i'm wrong!)
... the possible problem with that would be when implementation of
interface as result of EJB methods are returned, one such situation
would be:


interface that is returned:

public interface Test extends java.io.Serializable {
  public String getName();
}


remote interface for ejb:

public interface Bean extends EJBObject {
  Test getTest() throws RemoteException;
}

bean class:

public class BeanBean implements SessionBean {

  ...

  public Test getTest() {
   return new TestImpl();
  }

  ...

  public static class TestImpl implements Test {
   public String getName() {return "just a test";}
  }
}


in this case remote user must have BeanBean.TestImpl in its classpath and
that means that each change of Test implementation makes recompile of
client code necessary - if client could obtain bytecode from codebase via
RMIClassLoader recompile of it's code after change of Test Implementation
would be unnecessary ... 


Dragan


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to