You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Chopra, Sumeet (Cognizant)" <CS...@cal.cognizant.com> on 2003/05/23 17:48:56 UTC

Append Method problem

Hi All,

I am using a custom JMS Appender.
In that appender class I have a a ValueObject declared as a class 
variable .Using a set method I am setting its properties.
and thru a get method i retrieve its instance.

like :
JMSValueObject myJMSVO = new JMSValueObject();//class level

//set method
setAttributes(JMSValueObject jmsvo)
{
	jmsvo.setUserID(jmvo.getUserID());
	jmsvo.setMessage(jmvo.getMessage());
}

//get method 

public JMSValueObject getAttributes()
{
  return myJMSVO;
}

In append method I am calling get methods om valueobject and printing it out
but it gives me null :

//in append method

JMSValueObject appendVO = getAttributes();
System.out.println("User id is as "+appendVO.getUserID());
System.out.println("Message from value object is "+appendVO.getMessage());

Any ideas y it is happeneing so ?

Cheers,
Sumeet Chopra.