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 » Constructors in JCN

Post new topic  Reply to topic
 Constructors in JCN « View previous topic :: View next topic » 
Author Message
Prasi
PostPosted: Thu Nov 14, 2013 12:50 pm    Post subject: Constructors in JCN Reply with quote

Apprentice

Joined: 03 Aug 2011
Posts: 42

Hi, Can I have constructors in java compute node. I can give you an example:
public class LoadQueue extends MbJavaComputeNode {

private static final long serialVersionUID = 1L;
private String QueueName1;
private String QueueName2;
private Boolean InUse;




LoadQueue(String x,String y, Boolean z)
{
QueueName1=x;
QueueName2=y;
InUse=z;
}
}

When I do so, I am getting below exception when I deplo:

( IB9NODE.default ) Failed to deploy Java code resource ''JAR''. The Java stack trace is: ''Frame : 0 java.lang.InstantiationException: queueCollection
@: java.lang.J9VMInternals.newInstanceImpl(Native Method)
@: java.lang.Class.newInstance(Class.java:1600)
@: com.ibm.broker.plugin.MbNode.createMbNode(MbNode.java:1170)
@: com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.createJavaComputeNode(Native Method)
@: com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.updateNodeClass(MbRuntimeJavaComputeNode.java:428)
@: com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.updateNodeClass(MbRuntimeJavaComputeNode.java:362)
@: com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.prepare(MbRuntimeJavaComputeNode.java:183)
''

The Java JAR file deployment to the broker failed.

This is an internal error. Contact your IBM support center.


Can someone help me with this problem.
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Nov 14, 2013 12:59 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

You can use a default constructor, or use the onInitialize method to initialize data, but not a constructor with parameters.

Kind regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Prasi
PostPosted: Fri Nov 15, 2013 8:47 am    Post subject: Reply with quote

Apprentice

Joined: 03 Aug 2011
Posts: 42

Thank you mgk...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Constructors in JCN
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.