|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Constructors in JCN |
« View previous topic :: View next topic » |
Author |
Message
|
Prasi |
Posted: Thu Nov 14, 2013 12:50 pm Post subject: Constructors in JCN |
|
|
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 |
|
 |
mgk |
Posted: Thu Nov 14, 2013 12:59 pm Post subject: |
|
|
 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 |
|
 |
Prasi |
Posted: Fri Nov 15, 2013 8:47 am Post subject: |
|
|
Apprentice
Joined: 03 Aug 2011 Posts: 42
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|