Announcement Announcement Module
Collapse
No announcement yet.
Help needed using XDoclet with AbstractStatelessSessionBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help needed using XDoclet with AbstractStatelessSessionBean

    Hi,

    Does any body know how to fix this problem:

    Basically my SLSB's extend AbstractStatelessSessionBean and XDoclet is used to generate the Home/Remote and Business interfaces from the bean. The real implementation is a POJO which is retrieved from the applicationContext.xml and both the EJB bean and the POJO implement the same Business interface.

    However, these generated interfaces try to refer to spring non existen files as in the following:

    Code:
    xdoclet:ejbdoclet:
    
        [echo] Compiling to c:/projects_R16/ecrm-apps/target/classes
        [javac] Compiling 103 source files to C:\projects_R16\ecrm-apps\target\classes
    C:\projects_R16\ecrm-apps\target\xdoclet\ejbdoclet\de\viaginterkom\ca\ecrm\eselfcare\ejbserver\ejb\ServiceSelection.java
    :12: cannot resolve symbol
    symbol  : class AbstractStatelessSession
    location: package support
       extends org.springframework.ejb.support.AbstractStatelessSession
                                              ^
    C:\projects_R16\ecrm-apps\target\xdoclet\ejbdoclet\de\viaginterkom\ca\ecrm\eselfcare\ejbserver\ejb\ServiceSelectionHome.
    java:12: cannot resolve symbol
    symbol  : class AbstractStatelessSessionHome
    location: package support
       extends org.springframework.ejb.support.AbstractStatelessSessionHome
                                              ^
    C:\projects_R16\ecrm-apps\target\xdoclet\ejbdoclet\de\viaginterkom\ca\ecrm\eselfcare\ejbserver\ejb\ServiceSelectionLocal
    .java:12: cannot resolve symbol
    symbol  : class AbstractStatelessSessionLocal
    location: package support
       extends org.springframework.ejb.support.AbstractStatelessSessionLocal
                                              ^
    C:\projects_R16\ecrm-apps\target\xdoclet\ejbdoclet\de\viaginterkom\ca\ecrm\eselfcare\ejbserver\ejb\ServiceSelectionLocal
    Home.java:12: cannot resolve symbol
    symbol  : class AbstractStatelessSessionLocalHome
    location: package support
       extends org.springframework.ejb.support.AbstractStatelessSessionLocalHome
                                              ^
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -deprecation for details.
    4 errors
    
    BUILD FAILED
    File...... c:\projects_R16\.maven\cache\maven-java-plugin-1.4\plugin.jelly
    Element... ant:javac
    Line...... 52
    Column.... 48
    Compile failed; see the compiler error output for details.
    Total time: 53 seconds
    Finished at: Mon Mar 20 16:21:00 CET 2006

    Here is the XDoclet section in my EJB if it helps.

    Code:
    /** 
     * @ejb.bean 
     * 			 type="Stateless" 			 
     * 			 name="ServiceSelection" 
     * 			 display-name="ServiceSelection"  
     * 			 description="This stateless session bean encapsulates the option selection and home zone change use cases" 
     * 			 view-type="both"
     * 			 local-jndi-name="eSelfCare.ServiceSelectionLocalHome"
     * 			 jndi-name="eSelfCare.ServiceSelectionHome"
     * 			 transaction-type="Container"
     * 
     * @ejb.transaction 
     * 			 type="NotSupported"
     *
     * @ejb.resource-ref res-ref-name="jdbc/salcus"
     * 					 description="Internal JNDI name for the user database connection pool (resolved in container config)"
     *					 res-type="javax.sql.DataSource"
     *					 res-auth="Container"
     *
     * @weblogic:pool
     *    		max-beans-in-free-pool="100"
     *    		initial-beans-in-free-pool="5"
     * 
     * @weblogic.transaction-descriptor 
     * 			trans-timeout-seconds="600"
     * 
     * @weblogic:enable-call-by-reference True
     * 
     * @weblogic:resource-description
     *    		res-ref-name="jdbc/salcus"
     *    		jndi-name="datasource.salcusDb" 
     * 
     * @ejb.env-entry
     *   name="BeanFactoryPath" 
     *   value="applicationContext.xml"
     * 
     */
    Any help here would be great.

    Regards

    Steve

  • #2
    OK I fixed it

    OK All,

    I fixed the problem. I was missing a couple of ejbDoclet tags for the generation of the correct interfaces.

    The final ejb tags should have been

    Code:
    /** 
     * @ejb.bean 
     * 			 type="Stateless" 			 
     * 			 name="ServiceSelection" 
     * 			 display-name="ServiceSelection"  
     * 			 description="This stateless session bean encapsulates the option selection and home zone change use cases" 
     * 			 view-type="both"
     * 			 local-jndi-name="eSelfCare.ServiceSelectionLocalHome"
     * 			 jndi-name="eSelfCare.ServiceSelectionHome"
     * 			 transaction-type="Container"
     * 
     * @ejb.transaction 
     * 			 type="NotSupported"
     *
     * @ejb.resource-ref res-ref-name="jdbc/salcus"
     * 					 description="Internal JNDI name for the user database connection pool (resolved in container config)"
     *					 res-type="javax.sql.DataSource"
     *					 res-auth="Container"
     *
     * @weblogic:pool
     *    		max-beans-in-free-pool="100"
     *    		initial-beans-in-free-pool="5"
     * 
     * @weblogic.transaction-descriptor 
     * 			trans-timeout-seconds="600"
     * 
     * @weblogic:enable-call-by-reference True
     * 
     * @weblogic:resource-description
     *    		res-ref-name="jdbc/salcus"
     *    		jndi-name="datasource.salcusDb" 
     * 
     * @ejb.env-entry
     *  		name="BeanFactoryPath" 
     * 			type="java.lang.String"
     *			value="applicationContext.xml"
     * 
     * @ejb.home extends="javax.ejb.EJBHome" local-extends="javax.ejb.EJBLocalHome" 
     * @ejb.interface extends="javax.ejb.EJBObject" local-extends="javax.ejb.EJBLocalObject"
     * 
     */
    I found a post from Bill Poitras that pointed me in the right direction. All now compiles OK

    Regards

    Comment

    Working...
    X