Configuring an @MessageDriven bean on JBoss AS7

If you forget to add the destination property to the activationConfig for an MDB, when deploying to JBoss AS7 you’ll get this NullPointerException. Would be better if it told you what required property was missing:

16:30:29,007 WARN  [org.hornetq.ra.inflow.HornetQActivation] (default-short-running-threads-threads - 1) Failure in HornetQ activation org.hornetq.ra.inflow.HornetQActivationSpec(ra=org.hornetq.ra.HornetQResourceAdapter@6ba59338 destination=null destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15): java.lang.NullPointerException
    at javax.naming.NameImpl.<init>(NameImpl.java:281) [rt.jar:1.7.0_04]
    at javax.naming.CompositeName.<init>(CompositeName.java:231) [rt.jar:1.7.0_04]
    at org.jboss.as.naming.util.NameParser.parse(NameParser.java:49)
    at org.jboss.as.naming.NamingContext.parseName(NamingContext.java:440)
    at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:213)
    at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_04]
    at org.hornetq.ra.Util.lookup(Util.java:174) [hornetq-ra-2.2.11.Final.jar:]
    at org.hornetq.ra.inflow.HornetQActivation.setupDestination(HornetQActivation.java:454) [hornetq-ra-2.2.11.Final.jar:]
    at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:287) [hornetq-ra-2.2.11.Final.jar:]
    at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:605) [hornetq-ra-2.2.11.Final.jar:]
    at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:212)
    at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
    at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)
    at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
    at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

Here’s a correctly configured MDB:

@MessageDriven(mappedName = "queue/QueueName", activationConfig = {
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/queueName") })
public class QueueListener implements MessageListener {
...
}

 

Upgrade to Windows 8 for $39.99?

I primarily use Mac OS X and Linux at home, although for work I’m still obliged to used Windows 7 as it’s the corporate desktop standard. I occasionally run some Windows games on XP using Bootcamp on my Mac, but I’ve never felt the need to shell out the cash for Windows 7, it just seems like too much given that I’d only rarely use it.

Microsoft just announced their upgrade prices for Windows 8, and at $39.99 it’s almost in the trivial cost ballpark, low enough that I might upgrade my XP in Bootcamp and not think twice. I imagine at this price point this is the effect that Microsoft is looking for, given the trouble they’ve had in recent years trying to get people to upgrade from their older Windows versions. Given a low enough price that it’s a no brainer, I’m sure a number of people will jump on board and upgrade. Any more than that though, I know I wouldn’t. I’d still rather something in the $20 to $30 price range like the typical Mac OS X upgrade prices though.

Rod Johnson, founder of the Spring Framework, leaves VMWare/SpringSource

When Rod Johnson started the Spring Framework back in the early 2000s, he showed J2EE developers that there are better ways to build enterprise Java apps, and he provided the framework to help you do it. Anyone having experienced the pain of developing EJB 2.x beans during this time with it’s clunky api and verbose deployment descriptors and then since worked with the Spring Framework can attest to the huge benefits of developing apps using Spring’s much simpler, lightweight approach. Spring’s success has arguably been a significant influence on the ‘ease of use’ focus for the simplifications and improvements made in EE5 and EE6 in recent years.

Rod recently announced that he’s leaving VMWare to pursue other interests – I wish him success in his future endeavors and thanks for the impact you’ve made to enterprise Java development in the past 10+ years.