users@glassfish.java.net

Re: PostConstruct not invoked for MDB

From: <glassfish_at_javadesktop.org>
Date: Wed, 04 Jul 2007 02:00:03 PDT

Hi,
I'm also getting a similar error for my MDB (cause = IllegalArgumentException, see exception below)... I don't even have a PostConstruct method. The MDB itself is almost empty. The error occurs immediately after deployment is reported as successful.

exception:
DeferredRegistrationThread.retryItem: Deferred registration FAILED for "com.sun.appserv:application=MyApp,name=bean-pool,type=bean-pool,category=monitor,ejb-module=MyApp-ejb_jar,ejb=OrderProcessorMdb,server=server"due to Exception of type java.lang.IllegalArgumentException


code:

@MessageDriven(mappedName = "jms/myQueue", activationConfig = {
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    })
public class OrderProcessorMdb implements MessageListener {
    
    /** Creates a new instance of OrderProcessorMdb */
    public OrderProcessorMdb() {
    }

    public void onMessage(Message message) {
        if (logger.isDebugEnabled())
            logger().debug("Processing order");
    }
    
    @Resource
    MessageDrivenContext mdContext;
    
    org.apache.commons.logging.Log logger() { return logger; }
    static org.apache.commons.logging.Log logger =
            org.apache.commons.logging.LogFactory.getLog(OrderProcessorMdb.class);
}
[Message sent by forum member 'sagimann' (sagimann)]

http://forums.java.net/jive/thread.jspa?messageID=225166