cancel
Showing results for 
Search instead for 
Did you mean: 

Re-write Custom Module PI7.0 to PI 7.1

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi

I was looking a blog to force the Middleware to send a ACK when the client does not require it.

for example assume i have an async scenario and i need an ACK in the SXI_Monitor if the message could or could not be sent to the backend.

i found this blog 

scn.sap.com/community/pi-and-soa-middleware/blog/2012/03/05/acknowledgment-request-generated-by-adapters-of-adapter-engine-not-possible-not-any-more#comment-432619

but the problem in here is the code version. actually it apply for PI 7.0 and i need it for PI 7.1 i dont have much experiencie when developing custome module so i need your help.

does anyone could help me to migrate the code???

private ModuleData process_receiver(ModuleContext imc, ModuleData imd)

            throws ModuleException

      {

            try

            {

                  XIMessage aXIMessage = (XIMessage) imd.getPrincipalData();

                  amk = new AuditMessageKey(aXIMessage.getMessageId(),AuditDirection.INBOUND);

                  Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Entry_INBOUND");

//******************what do those line used for?********************************

                 XMBMessage xmb = aXIMessage.getXMBMessage();

                  Message xmbm = (Message) xmb;

//**********************************************************************************

                  MessageStore ms = MessageStore.getInstance();

                  QueueMessage qm = ms.getQueueMessage(aXIMessage.getMessageKey());

                  if(qm != null)        

      ((XIMessage)qm.getTransportableMessage()).setAckRequestType(AckRequestType.SYSTEM);

            }

            catch(Exception ex)

            {

                  Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, " Error Inbound: " + ex.getMessage());                             

            }

            return imd;

      }

Best Regards

Accepted Solutions (0)

Answers (1)

Answers (1)

gagandeep_batra
Active Contributor
0 Kudos
rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Gagan,

thanks for the information provided.

as far i can see to upgrade the modules like Stafan sugguest first all I need the source code and the deployment descriptors of your PI 7.0 adapter module. actually i dont have any of it, just and example of the SDN.

so should i need to download the libraries of PI 7.0 create module and later on upgrade it as Stafan sugguest?

the key problem i am facing refers to the old method like MessageStore and QueueMessage, seam for PI 7.1 does not exist so i dont know how to rewrite the code.

  MessageStore ms = MessageStore.getInstance();

qm = ms.getQueueMessage(aXIMessage.getMessageKey());

am i Rigth????