Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-463

EjbDefinitionUtility.defineEjbBeanProxy() should be able to create proxies for no-interface local beans

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0-alpha-2
    • 1.0.0
    • Java EE Integration
    • None

    Description

      Sometimes callers of EjbDefinitionUtility.defineEjbBeanProxy() will have to pass the local bean class, when @LocalBean is the only valid local business "interface".

      But, we can't pass the bean class to the proxyFactory.setInterfaces() as this causes an exeption in javassist since it's not really an interface that can be implemented. On my stack, I see

      Caused by: java.lang.RuntimeException: by java.lang.IncompatibleClassChangeError: foo.classWithLocalBeanView
      at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:509)
      at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:486)
      at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:422)
      at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:394)
      at org.apache.webbeans.util.SecurityUtil$PrivilegedActionForProxyFactory.run(SecurityUtil.java:301)
      at java.security.AccessController.doPrivileged(AccessController.java:202)
      at org.apache.webbeans.util.SecurityUtil.doPrivilegedCreateClass(SecurityUtil.java:184)
      at org.apache.webbeans.proxy.JavassistProxyFactory.defineEjbBeanProxyClass(JavassistProxyFactory.java:149)
      at org.apache.webbeans.ejb.common.util.EjbDefinitionUtility.defineEjbBeanProxy(EjbDefinitionUtility.java:73)

      Simply calling proxyFactory.setSuperClass() seems sufficient and makes sense.

      Attachments

        Activity

          People

            covener Eric Covener
            covener Eric Covener
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified