Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

EJB invocation of CAF Application Service

Hello!

I have create a Composite Application (Development Component) with SAP NetWeaver CE 7.1. There I have create an Application Service. The special generated EJB and its interface have this code:

<b>EJB:</b>

package de.td.ir_as.modeled.appsrv.increcrfcconn;

@javax.ejb.Stateless(name = "de.td.ir_as.modeled.appsrv.increcrfcconn.IncRecRfcConn")
@javax.ejb.Local(value = { de.td.ir_as.modeled.appsrv.increcrfcconn.IncRecRfcConnServiceLocal.class })
@javax.interceptor.Interceptors(value = { com.sap.caf.rt.interceptors.LogInterceptor.class })
public class IncRecRfcConnBeanImpl extends de.td.ir_as.modeled.appsrv.increcrfcconn.IncRecRfcConnBean {
}

<b>Abstract Class:</b>

/* ***************************************************************************
 * 			THIS FILE HAS BEEN GENERATED BY THE CAF CODE GENERATOR.
 * 			ALL CHANGES WILL BE LOST IF THE FILE IS REGENERATED!
 * ***************************************************************************/
//Application Service Template
package de.td.ir_as.modeled.appsrv.increcrfcconn;

public abstract class IncRecRfcConnBean implements de.td.ir_as.modeled.appsrv.increcrfcconn.IncRecRfcConnServiceLocal {
    public static final String _PROVIDER = "sap.com";
    public static final String _APPLICATION = "ir_as";
    public static final String _APP_SRV_NAME = "IncRecRfcConn";
    public static final String _OBJECT_NAME = _PROVIDER + "/" + _APPLICATION + "/" + _APP_SRV_NAME;
    public static final String _JARM_REQUEST = "XAP:APPSERV:" + _OBJECT_NAME;

    protected static final com.sap.tc.logging.Location _location = com.sap.tc.logging.Location.getLocation(IncRecRfcConnBean.class);
	    
    public IncRecRfcConnBean(){
    }
...
}

<b>Interface:</b>

/* ***************************************************************************
 * 			THIS FILE HAS BEEN GENERATED BY THE CAF CODE GENERATOR.
 * 			ALL CHANGES WILL BE LOST IF THE FILE IS REGENERATED!
 * ***************************************************************************/
//Application Service Template
package de.td.ir_as.modeled.appsrv.increcrfcconn;

public interface IncRecRfcConnServiceLocal{

...
	
}

I have created an other Development Component. It's a EJB Module. In this component I want to use via EJB invocation the developed Application Service. I use the @EJB invocation to use it:

@Stateless
public class IncRecRfcImplBean implements IncRecRfcImplLocal {

	@EJB(beanName="de.td.ir_as.modeled.appsrv.increcrfcconn.IncRecRfcConn")
	private IncRecRfcConnServiceLocal incRecRfcConn;
...

But if I instantiate a [/code]IncRecRfcImplBean

-object in an POJO the attribute [code]incRecRfcConn

will not be initialized at runtime.

What do I do wrong?

Regards,

Armin

Former Member
Not what you were looking for? View more on this topic or Ask a question