0 Replies Latest reply on Nov 27, 2001 9:09 PM by Shyam

    custom mbeans, queues and QueueConnectionFactory

    Shyam Newbie

      I have written a custom mbean and I want to connect the mbean to a queue:

      My code is as follows:

      in jboss.jcml file I have defined a queue called myqueue (under the section JBossMQ)

      and for my custom bean I have an attribute as follows:

      Now, in my custom mbean which extends org.jboss.util.ServiceMBean, I have the following member variables:
      private String name;
      private Queue queue;

      and the setter and getter methods for the attribute abc as
      public void getAbcQueue(){ return name; }
      public void setAbcQueue(String name){
      this.queue = (Queue) new InitialContext.lookup(name)

      and in my startService method of the custom mbean, I'm calling setAbcQueue("queue/myqueue");

      When I start the custom mbean, I'm getting a null pointer exception in the persistence manager and also a mbean exception in the setter method. Can anybody help me out? Thanks in advance.