on 2007 Nov 07 3:44 PM
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
Hi Armin,
Isn't your local interface, IncRecRfcConnServiceLocal, missing the @Local annotation before the interface declaration?
package de.td.ir_as.modeled.appsrv.increcrfcconn;
@Local
public interface IncRecRfcConnServiceLocal{
...
}
Best regards,
Dobrinka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
12 | |
11 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.