You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Prasad Kashyap (JIRA)" <ji...@apache.org> on 2007/01/23 20:41:49 UTC

[jira] Created: (GERONIMO-2778) Deployer should NOT always require interfaces elements in

Deployer should NOT always require interfaces elements in <ejb-ref>
-------------------------------------------------------------------

                 Key: GERONIMO-2778
                 URL: https://issues.apache.org/jira/browse/GERONIMO-2778
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: deployment
    Affects Versions: 2.0-M2, 2.0
            Reporter: Prasad Kashyap
            Priority: Critical
             Fix For: 2.0-beta2, 2.0


3.0 EJBs can now implement POJO interfaces. So when you reference them in say, a web-xml, the <ejb-ref> and <ejb-local-ref>  need not contain the traditional interfaces elements inside them   (  <home>, <remote>, <local-home>, <local>)

Here is the latest schema.. http://java.sun.com/xml/ns/javaee/javaee_5.xsd

However, our deployer has a hard requirement on those elements. This is what you get when those elements are missing from the <ejb-ref>

Using GERONIMO_BASE:   C:\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT
Using GERONIMO_HOME:   C:\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT
Using GERONIMO_TMPDIR: C:\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT\var\temp
Using JRE_HOME:        C:\jdk1.5.0_08\jre
    Error: Unable to distribute
    calculator-stateless-ear-2.0-SNAPSHOT.ear: Error processing 'remote'
    element for EJB Reference 'ejb/Calculator' for module
    'calculator-stateless-war-2.0-SNAPSHOT.war': interface name cannot
    be blank

    org.apache.geronimo.common.DeploymentException: Error processing
    'remote' element for EJB Reference 'ejb/Calculator' for module
    'calculator-stateless-war-2.0-SNAPSHOT.war': interface name cannot
    be blank

    	at   org.apache.geronimo.openejb.deployment.ejbref.RemoteEjbRefBuilder.createEjbRef(RemoteEjbRefBuilder.java:94)
    	at    org.apache.geronimo.openejb.deployment.ejbref.RemoteEjbRefBuilder.buildNaming(RemoteEjbRefBuilder.java:79)
    	at    org.apache.geronimo.openejb.deployment.ejbref.RemoteEjbRefBuilder$$FastClassByCGLIB$$769e975.invoke(<generated>)
    	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    	at    org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    	at    org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
    	at    org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:820)
    	at    org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    	at    org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    	at    org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    	at    org.apache.geronimo.j2ee.deployment.NamingBuilder$$EnhancerByCGLIB$$4c1ce297.buildNaming(<generated>)
    	at    org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:58)
    	at    org.apache.geronimo.j2ee.deployment.NamingBuilderCollection$$FastClassByCGLIB$$5fe23b0e.invoke(<generated>)
    	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-2778) Deployer should always fill in required or interfaces elements in

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-2778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483956 ] 

David Jencks commented on GERONIMO-2778:
----------------------------------------

Isn't this implemented by now?

> Deployer should always fill in required <local> or <remote> interfaces elements in <ejb-ref>
> --------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2778
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2778
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 2.0-M2, 2.0
>            Reporter: Prasad Kashyap
>            Priority: Critical
>             Fix For: 2.0-beta1, 2.0
>
>
> For a proper ejb-ref to an EJB 3.0 bean (i.e. a business interface) it *must* have the <remote> or <local> and must *not* have the <home> or <local-home>.  
> These can only be omitted in the case of dependency injection where the code using the @EJB to generate a metadata-complete ejb-ref should *always* fill in the <remote> element of the <ejb-ref> element.  If the user does not specify the 'beanInterface' attribute of the @EJB annotation, then the code building the reference must use the class type of the field or method as the value of '<remote>'.
> There is an edge case where you truly do not know if the @EJB is pointing to a local object or a remote object and therefore don't know whether to build a ejb-ref or an ejb-local-ref.  For OpenEJB we build an ejb-ref and flag it as being "ambiguous", then in the jndi building code we try to resolve it against the full list of available ejbs.  We'll have to figure out some way to communicate this edge case to the ejb naming builder so we can deal with it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-2778) Deployer should always fill in required or interfaces elements in

Posted by "Prasad Kashyap (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-2778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prasad Kashyap closed GERONIMO-2778.
------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.0-M4)

This has now been fixed. David Blevins too confirmed this for me.

> Deployer should always fill in required <local> or <remote> interfaces elements in <ejb-ref>
> --------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2778
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2778
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 2.0-M2, 2.0-M5
>            Reporter: Prasad Kashyap
>            Priority: Critical
>             Fix For: 2.0-M5
>
>
> For a proper ejb-ref to an EJB 3.0 bean (i.e. a business interface) it *must* have the <remote> or <local> and must *not* have the <home> or <local-home>.  
> These can only be omitted in the case of dependency injection where the code using the @EJB to generate a metadata-complete ejb-ref should *always* fill in the <remote> element of the <ejb-ref> element.  If the user does not specify the 'beanInterface' attribute of the @EJB annotation, then the code building the reference must use the class type of the field or method as the value of '<remote>'.
> There is an edge case where you truly do not know if the @EJB is pointing to a local object or a remote object and therefore don't know whether to build a ejb-ref or an ejb-local-ref.  For OpenEJB we build an ejb-ref and flag it as being "ambiguous", then in the jndi building code we try to resolve it against the full list of available ejbs.  We'll have to figure out some way to communicate this edge case to the ejb naming builder so we can deal with it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-2778) Deployer should always fill in required or interfaces elements in

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-2778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins updated GERONIMO-2778:
------------------------------------

    Description: 
For a proper ejb-ref to an EJB 3.0 bean (i.e. a business interface) it *must* have the <remote> or <local> and must *not* have the <home> or <local-home>.  

These can only be omitted in the case of dependency injection where the code using the @EJB to generate a metadata-complete ejb-ref should *always* fill in the <remote> element of the <ejb-ref> element.  If the user does not specify the 'beanInterface' attribute of the @EJB annotation, then the code building the reference must use the class type of the field or method as the value of '<remote>'.

There is an edge case where you truly do not know if the @EJB is pointing to a local object or a remote object and therefore don't know whether to build a ejb-ref or an ejb-local-ref.  For OpenEJB we build an ejb-ref and flag it as being "ambiguous", then in the jndi building code we try to resolve it against the full list of available ejbs.  We'll have to figure out some way to communicate this edge case to the ejb naming builder so we can deal with it.



  was:
3.0 EJBs can now implement POJO interfaces. So when you reference them in say, a web-xml, the <ejb-ref> and <ejb-local-ref>  need not contain the traditional interfaces elements inside them   (  <home>, <remote>, <local-home>, <local>)

Here is the latest schema.. http://java.sun.com/xml/ns/javaee/javaee_5.xsd

However, our deployer has a hard requirement on those elements. This is what you get when those elements are missing from the <ejb-ref>

Using GERONIMO_BASE:   C:\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT
Using GERONIMO_HOME:   C:\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT
Using GERONIMO_TMPDIR: C:\Apache\geronimo-jetty6-jee5-2.0-SNAPSHOT\var\temp
Using JRE_HOME:        C:\jdk1.5.0_08\jre
    Error: Unable to distribute
    calculator-stateless-ear-2.0-SNAPSHOT.ear: Error processing 'remote'
    element for EJB Reference 'ejb/Calculator' for module
    'calculator-stateless-war-2.0-SNAPSHOT.war': interface name cannot
    be blank

    org.apache.geronimo.common.DeploymentException: Error processing
    'remote' element for EJB Reference 'ejb/Calculator' for module
    'calculator-stateless-war-2.0-SNAPSHOT.war': interface name cannot
    be blank

    	at   org.apache.geronimo.openejb.deployment.ejbref.RemoteEjbRefBuilder.createEjbRef(RemoteEjbRefBuilder.java:94)
    	at    org.apache.geronimo.openejb.deployment.ejbref.RemoteEjbRefBuilder.buildNaming(RemoteEjbRefBuilder.java:79)
    	at    org.apache.geronimo.openejb.deployment.ejbref.RemoteEjbRefBuilder$$FastClassByCGLIB$$769e975.invoke(<generated>)
    	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    	at    org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    	at    org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
    	at    org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:820)
    	at    org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    	at    org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    	at    org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    	at    org.apache.geronimo.j2ee.deployment.NamingBuilder$$EnhancerByCGLIB$$4c1ce297.buildNaming(<generated>)
    	at    org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:58)
    	at    org.apache.geronimo.j2ee.deployment.NamingBuilderCollection$$FastClassByCGLIB$$5fe23b0e.invoke(<generated>)
    	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)

        Summary: Deployer should always fill in required <local> or <remote> interfaces elements in <ejb-ref>  (was: Deployer should NOT always require interfaces elements in <ejb-ref>)

> Deployer should always fill in required <local> or <remote> interfaces elements in <ejb-ref>
> --------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-2778
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2778
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: deployment
>    Affects Versions: 2.0-M2, 2.0
>            Reporter: Prasad Kashyap
>            Priority: Critical
>             Fix For: 2.0-beta2, 2.0
>
>
> For a proper ejb-ref to an EJB 3.0 bean (i.e. a business interface) it *must* have the <remote> or <local> and must *not* have the <home> or <local-home>.  
> These can only be omitted in the case of dependency injection where the code using the @EJB to generate a metadata-complete ejb-ref should *always* fill in the <remote> element of the <ejb-ref> element.  If the user does not specify the 'beanInterface' attribute of the @EJB annotation, then the code building the reference must use the class type of the field or method as the value of '<remote>'.
> There is an edge case where you truly do not know if the @EJB is pointing to a local object or a remote object and therefore don't know whether to build a ejb-ref or an ejb-local-ref.  For OpenEJB we build an ejb-ref and flag it as being "ambiguous", then in the jndi building code we try to resolve it against the full list of available ejbs.  We'll have to figure out some way to communicate this edge case to the ejb naming builder so we can deal with it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.