cancel
Showing results for 
Search instead for 
Did you mean: 

EJB Adapter Module - Message Id

markus_schalk
Participant
0 Kudos

Hello experts,

does anybody know how i can get access to the message id in an ejb adapter module?

And what exactly is the channel id, which i can get access to with getChannelID()?

Thanks in advance.

Kind regards,

Markus Schalk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Your function header looks like this:

public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException 

and your code should be:


Object obj=null;
MessageKey key = null;
Message msg = null;
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;

you get the message id with


msg.getMessageId();

Answers (2)

Answers (2)

Former Member
0 Kudos

>>getChannelID()

Is used to retrieve the current channel which is getting used and from this u can get the adapter type like file, JDBC etc

for instance

chk my reply in this thread:

Former Member
0 Kudos

hi Markus,

For the MessageId, see this very interesting SAP guide [PI7.1 - How tou2026 create Modules for the JEE Adapter Engine|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa?QuickLink=index&overridelayout=true]... in Appendix for the Java code.

regards.

Mickael

markus_schalk
Participant
0 Kudos

Thanks to you both for your quick answers. Seems to me that i was pretty blind ;-)...

See you,

Markus Schalk