Hi

thanks for your quick response.

actually I have already managed, somehow to get part of this work, 
unfortunately another error came up.

removing remotebinding gives same error 
package beans;

import javax.ejb.Stateless;
import javax.ejb.Remote;

import org.jboss.annotation.ejb.RemoteBinding;

@Stateless(name = "testBean")
@Remote(test.class)
@RemoteBinding(jndiBinding="testBean")
public class testBean {
    public testBean() {
    }

    public String hello() {
        return "Hello from bean";
    }
}

this is my bean, test.java is just interface with one method.

 Context ctx = new InitialContext();
      try {
          Object obj = ctx.lookup("testBean");
          testBean bean = (testBean)obj;
          out.print(bean.hello());
      } catch (Exception e) {
         e.printStackTrace();
      }

above is code from jsp, that is throwing ClassCast exception and now I really 
have no idea why.

as for JNDIView, I have there following line for my bean:
+- testBean (proxy: $Proxy96 implements interface beans.test,interface 
org.jboss.ejb3.JBossProxy)

after removing binding, jndi view gives following:
+- testBean (class: org.jnp.interfaces.NamingContext)
  |   +- remote (proxy: $Proxy129 implements interface beans.test,interface 
org.jboss.ejb3.JBossProxy)


how should I call hello() from jsp? where am I making mistake? and where can I 
learm something more from

thanks a lot for your help.




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120416
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to