Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-8806

JBoss 6: NotSerializableException org.jboss.resource.work.JBossWorkManager

XMLWordPrintable

    • Workaround Exists
    • Hide

      Switch from JNDI/RMI to direct approach:

      • add:
        import org.jboss.mx.util.MBeanServerLocator;
      • change:
        InitialContext jndiContext = new InitialContext();
        MBeanServerConnection mconn = (MBeanServerConnection) jndiContext.lookup("jmx/invoker/RMIAdaptor");
        -->
        MBeanServer mconn = MBeanServerLocator.locateJBoss();

      in the referencing code

      Show
      Switch from JNDI/RMI to direct approach: add: import org.jboss.mx.util.MBeanServerLocator; change: InitialContext jndiContext = new InitialContext(); MBeanServerConnection mconn = (MBeanServerConnection) jndiContext.lookup("jmx/invoker/RMIAdaptor"); --> MBeanServer mconn = MBeanServerLocator.locateJBoss(); in the referencing code

      Use of JBoss JCA WorkManager via JNDI throws java.io.NotSerializableException: org.jboss.resource.work.JBossWorkManager at JBossAS 6.0.0
      Sample code (and known workaround) in the referenced forum thread.
      The currently known workaround is to use more direct approach but this introduces a direct dependency on the JBoss code. As this issue affects for example Spring Framework I'm affraid such workaround isn't sufficient here.

              jpederse@redhat.com Jesper Pedersen
              petr.hostalek@bsc-ideas.com Petr Hostalek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: