on 01-06-2010 2:56 PM
Hi Experts,
I want to call XIMailAdapterBean from my module processor. How do we do that?
I am creating following entry in the ejb-jar.xml
<ejb-local-ref>
<ejb-ref-name>XIMailAdapterBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
<local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
<ejb-link>sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean</ejb-link>
</ejb-local-ref>
and using the following code
Context initCtx = new InitialContext();
Object result = initCtx.lookup("java:comp/env/XIMailAdapterBean");
ModuleHome moduleHome = (ModuleHome) PortableRemoteObject.narrow(result, com.sap.aii.adapter.mail.app.XIMailAdapterBean.class);
inputModuleData = moduleHome.create().process(moduleContext, inputModuleData);
Is this the right way to do it?
Regards,
SK
Solution:
ejb-jar.xml
<ejb-local-ref>
<ejb-ref-name>XIMailAdapterBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
<local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
<ejb-link>XIMailAdapterBean</ejb-link>
</ejb-local-ref>
Code:
Context initCtx = new InitialContext();
Object result = initCtx.lookup("java:comp/env/XIMailAdapterBean");
ModuleLocalHome moduleLocalHome = (ModuleLocalHome) result ;
inputModuleData = moduleLocalHome.create().process(moduleContext, inputModuleData);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any response?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.