on websphere,i call an method of an entity bean from jboss.but websphere said that it can't get the home interface!
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   li_xiaotang
Posted On:   Sunday, June 1, 2003 11:46 PM

codes are: InitialContext ctx = null; java.util.Properties props= new java.util.Properties(); props.put(javax.naming.Context.PROVIDER_URL,"localhost:1099/"); props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); ctx = new InitialContext(props); Object homeObject = ctx.lookup("ejb/com/bank/Transfer1Home"); Transfer1Home piHome = (Transfer1Home)javax.rmi.PortableRemoteObject.narrow(homeObject, Transfer1Home.class); Transfer1 t1 = piHome.create(); but websphere said that "transfer1Home can't be resolved or is not a type!" but i have make the java class and ejb-jar.xml of jboss in the .ja   More>>

codes are:
InitialContext ctx = null;
java.util.Properties props= new java.util.Properties();
props.put(javax.naming.Context.PROVIDER_URL,"localhost:1099/");
props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
ctx = new InitialContext(props);
Object homeObject = ctx.lookup("ejb/com/bank/Transfer1Home");
Transfer1Home piHome = (Transfer1Home)javax.rmi.PortableRemoteObject.narrow(homeObject, Transfer1Home.class);
Transfer1 t1 = piHome.create();
but websphere said that "transfer1Home can't be resolved or is not a type!"
but i have make the java class and ejb-jar.xml of jboss in the .jar file and put it on the websphere.
please tell me the reason.
thanks.

   <<Less
About | Sitemap | Contact