I have local tessted SessionBean ( the same is tof LocalEntityBean).
In jboss.xml I have settings for set localEJB to the global INDI Namespace

  <enterprise-beans>

    <ejb-name>Counter</ejb-name>
    <local-jndi-name>Counter</local-jndi-name>
  
  </enterprise-beans>


on jmx-console pages I can check that JNDI name is coorect.

  +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
  +- Counter (proxy: $Proxy49 implements interface session1.CountLocalHome)
  +- invokers (class: org.jnp.interfaces.NamingContext)


I have tested class in web to communicate with local EJB.

.....
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
        "org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put("java.naming.factory.url.pkgs",
        "org.jboss.naming:org.jnp.interfaces");
String message="get message";
int i=1;
Context ctx = new InitialContext(env);
Object obj=ctx.lookup("Counter");
CountLocalHome home=(CountLocalHome)obj; 
.....

That code is correct in JBoss-3.2.5, but 
in JBoss-4.0.0 it is not correct

I have Exception
21:34:07,523 INFO  [STDOUT] java.lang.ClassCastException
21:34:07,523 INFO  [STDOUT]     at test.Session1.getSession1(Unknown Source)
21:34:07,523 INFO  [STDOUT]     at 
org.apache.jsp.test_jsp._jspService(test_jsp.java:74)

What is wrong?

I can send tested ear package and sources.
riwat
[EMAIL PROTECTED]

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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to