ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMQI 2.1 , Call EJB method from java plugin node

Post new topic  Reply to topic
 WMQI 2.1 , Call EJB method from java plugin node « View previous topic :: View next topic » 
Author Message
Saraswathy
PostPosted: Tue Jun 01, 2004 9:29 pm    Post subject: WMQI 2.1 , Call EJB method from java plugin node Reply with quote

Newbie

Joined: 01 Jun 2004
Posts: 9

I have a java plugin node that makes a call to an EJB method. The bean is deployed on WAS 5.0
An exception is raised when I try to retrieve the initial context.
b4 context
exe Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory

Broker is on z/OS , WMQI 2.1.
I have faced this issue with HP UX too. Has anyone got this working ?
_________________
----------------------------------
Saraswathy
IBM Certified Solution Designer - WebSphere MQ
IBM Certified Specialist -MQSeries
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Jun 01, 2004 10:28 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Do you get this error at deploy time or at runtime?
Are there more errors logged into system error log? Is your classpath set correctly?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Saraswathy
PostPosted: Wed Jun 02, 2004 3:15 am    Post subject: Reply with quote

Newbie

Joined: 01 Jun 2004
Posts: 9

kirani wrote:
Do you get this error at deploy time or at runtime?
Are there more errors logged into system error log? Is your classpath set correctly?


I get this error at runtime, when i put a message and the evaluate method is executed.
This is my code in evaluate
public void evaluate(MbMessageAssembly assembly, MbInputTerminal in)
throws MbException
{
System.out.println("Start Of Evaluate");
try {

File elogFile = new File ("/tmp/mfplugin.log");
PrintStream elog = new PrintStream (new FileOutputStream (elogFile), true);
System.setOut (elog);
MbMessage glb_env = assembly.getGlobalEnvironment();
System.out.println("After MnMessage");
MbElement mbElem_env = glb_env.getRootElement();
System.out.println("After MbElement");
String name = (String)((mbElem_env.getLastChild()).getName());
System.out.println("Element Name " + name);

MbElement mbElem_env1 =
mbElem_env.getFirstElementByPath("/Variables/MyVar");
String val = (String)mbElem_env1.getValue();
System.out.println("Element Val " + val);
System.out.println("Test the new jar " );
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY,INITIAL_CONTEXT_FACTORY );
env.put( Context.PROVIDER_URL, "iiop://10.100.81.3:2809");
System.out.println("b4 context");
Context cxt = new InitialContext( env );
System.out.println("after context");
System.out.println("before lookup");
Object obj = cxt.lookup("cell/nodes/test/HelloWorldHome");
System.out.println("af lookup");
System.out.println("The Class Name is");
System.out.println(obj.getClass().getName());
HelloWorldHome home =
(HelloWorldHome) PortableRemoteObject.narrow(
obj,
HelloWorldHome.class);

System.out.println("To create remote : " );
HelloWorld bean = home.create();
System.out.println("Invoking Bean Function");
System.out.println(bean.hello(val));
System.out.println("After a call to Bean Function");

}catch( Exception exe ){
System.out.println("exe " + exe.getMessage());
exe.printStackTrace();
}
_________________
----------------------------------
Saraswathy
IBM Certified Solution Designer - WebSphere MQ
IBM Certified Specialist -MQSeries
Back to top
View user's profile Send private message
JLRowe
PostPosted: Wed Jun 02, 2004 4:42 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

I would suggest you get the ejb call working as a standalone client first, before implementing as a plugin.
Back to top
View user's profile Send private message Send e-mail
Saraswathy
PostPosted: Wed Jun 02, 2004 7:19 am    Post subject: Reply with quote

Newbie

Joined: 01 Jun 2004
Posts: 9

jlrowe wrote:
I would suggest you get the ejb call working as a standalone client first, before implementing as a plugin.


Yes , It works fine from a standalone program
_________________
----------------------------------
Saraswathy
IBM Certified Solution Designer - WebSphere MQ
IBM Certified Specialist -MQSeries
Back to top
View user's profile Send private message
JLRowe
PostPosted: Wed Jun 02, 2004 8:47 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

Well, in that case you've probably got jar's missing from the jplugin directory that contain the JNDI provider.

Check the classpath for your standalone program, and make sure everything is present in the jplugin directory.
Back to top
View user's profile Send private message Send e-mail
Saraswathy
PostPosted: Thu Jun 03, 2004 9:27 pm    Post subject: Reply with quote

Newbie

Joined: 01 Jun 2004
Posts: 9

jlrowe wrote:
Well, in that case you've probably got jar's missing from the jplugin directory that contain the JNDI provider.

Check the classpath for your standalone program, and make sure everything is present in the jplugin directory.


Tried it on Windows Broker , I used the 'interact with desktop option to see the system messages' it hangs after printing b4 context.

Why do u say the 'jplugin ' directory? I have only the java node jar in the jplugin folder and the rest are in the classes folder where wmqi system jars are present.Does'nt it load from there?
_________________
----------------------------------
Saraswathy
IBM Certified Solution Designer - WebSphere MQ
IBM Certified Specialist -MQSeries
Back to top
View user's profile Send private message
JLRowe
PostPosted: Fri Jun 04, 2004 5:59 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

Put it in jplugin, that's where it belongs.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMQI 2.1 , Call EJB method from java plugin node
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.