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 » Accessing Boolean User defined property in Java UDN

Post new topic  Reply to topic
 Accessing Boolean User defined property in Java UDN « View previous topic :: View next topic » 
Author Message
vininx
PostPosted: Fri Jan 13, 2012 9:36 am    Post subject: Accessing Boolean User defined property in Java UDN Reply with quote

Acolyte

Joined: 13 Oct 2009
Posts: 69

Hi All,
I am having a problem in accessing the boolean user defined property. I am able to access int and String properties whereas, when I access the boolean(checkbox) property, I am getting the below error,

Code:

BIP2210E: Invalid Configuration Message: attribute name 'detachEnv' not valid for target object 'Sample'


My code looks like:

Code:

boolean detachEnv;

public void setDetachEnv (Boolean detachEnv)
{
     Boolean dtchBool = new Boolean (detachEnv);
     this.detachEnv     = dtchBool.booleanValue ();
}

public boolean getDetachEnv ()
{
     return this.detachEnv;
}



Property defined:-
--------------------
Property.detachEnv=detachEnv

When I remove the boolean user defined proeprty, I am able to deploy the message flow successfully. Please advise.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Jan 13, 2012 10:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

What are the required modifiers to the primitive declaration for a java UDN?
(private, public, static, no modifier,...)?

Are you allowed a primitive field or do you need to have it "boxed"?
Does your class have to be serializable?

Find the answer to these questions and you will probably also have the answer to your problem...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Sat Jan 14, 2012 1:16 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I suspect you'll find it needs to be a Boolean not a boolean.

But I've not bothered to double-check the docs.
Back to top
View user's profile Send private message
vininx
PostPosted: Mon Jan 16, 2012 1:28 pm    Post subject: Reply with quote

Acolyte

Joined: 13 Oct 2009
Posts: 69

Hi,
I had changed my code as below,
Code:


   private Boolean detachEnv;

    public Boolean getDetachEnv ()
    {
       return this.detachEnv;
    }
   
    public void setDetachEnv (Boolean detachEnv)
    {
       this.detachEnv = detachEnv;
    }


Still I am getting the same error while deployment.
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Jan 17, 2012 2:34 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

You are trying to do ESQL programming with java.

In java compute nodes UDP's are accessed with .getUserDefinedAttribute(String name) method of MbJavaComputeNode.
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Jan 17, 2012 4:36 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Esa wrote:
You are trying to do ESQL programming with java.

In java compute nodes UDP's are accessed with .getUserDefinedAttribute(String name) method of MbJavaComputeNode.


Sorry, I did not realize that you were talking about an UDN. So you are preparing a support pack of some sort?
Back to top
View user's profile Send private message
vininx
PostPosted: Tue Jan 17, 2012 9:00 am    Post subject: Reply with quote

Acolyte

Joined: 13 Oct 2009
Posts: 69

Yes... I am creating a support pack... Can you also let me know how to access the enum property, it will be more helpful.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 17, 2012 9:29 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So when I do double-check the documentation, it tells me that you have to use a String datatype for your attributes.

How to get at an Enum is left as an exercise for the documentation.
Back to top
View user's profile Send private message
Esa
PostPosted: Tue Jan 17, 2012 9:37 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Never implemented a support pack, but it seems to me you are still using primitive datatypes and datatype wrapper classes in a mixed manner.

The example I found in the infocenter is using primitive datatypes.

I would try this:

Code:

 private boolean detachEnv;

    public boolean getDetachEnv ()
    {
       return this.detachEnv;
    }
   
    public void setDetachEnv (boolean detachEnv)
    {
       this.detachEnv = detachEnv;
    }
Back to top
View user's profile Send private message
vininx
PostPosted: Wed Jan 18, 2012 7:50 am    Post subject: Reply with quote

Acolyte

Joined: 13 Oct 2009
Posts: 69

It works now when I changed like below,
Code:


    private String detachEnv;

    public String getDetachEnv ()
    {
       return this.detachEnv;
    }
   
    public void setDetachEnv (String detachEnv)
    {
       this.detachEnv = detachEnv;
    }

Whatever be the data type, it gets it as "String" only. Thanks for your responses.
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 » Accessing Boolean User defined property in Java UDN
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.