Thursday, November 21, 2013

The inbound OSB file transport flow explained

The working of the OSB file transport can be explained  as follows:
  • File written to a polling directory
  • Metadata messages posted in internal JMS queue by the file transport and file moved to staging directory
  • OSB Proxy Service triggered by message on the JMS queue
  • Proxy service reads file from staging directory and moves the file to the archive folder when completed
This blogs explains the behavior when you suspend the flow on 3 different places of the flow. In general I think disabling the Proxy Service will be the best alternative in most situations. Anyway, by writing this blog I also hope to increase awareness about the internal working of the file transport in OSB. 

Note: I have tested this all before 11.1.1.7, but I have not read anything that indicates that the behavior should be different between 11.1.1.6 and 11.1.1.7

Action: Disabling the production internal file jms queue

    Error in OSB log:

weblogic.jms.common.IllegalStateException: Destination jmsResources!wlsb.internal.transport.task.queue.file is paused for new message production
        at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)
        at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncTran(DispatcherAdapter.java:53)
        at weblogic.jms.client.JMSProducer.toFEProducer(JMSProducer.java:1289)
        at weblogic.jms.client.JMSProducer.deliveryInternal(JMSProducer.java:796)
        at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:541)
        Truncated. see log file for complete stacktrace


  • Message read from the polling directory, but placed in the error directory because of the above error

Action: Disabling the consumption internal file jms queue

  •     Messages read from the polling directory on each poll cycle
  •     Messages moved to the stage directory on each poll cycle
  •     Messages not picked up by the proxy service and remain in the staging directory
  •     After enabling consumption again the stage directory was immediately emptied and messages eventually ended up in the archive folder

Action: Disabling proxy service


    The following error can be seen when the proxy is disabled during a poll cycle execution:

#### <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <88685c90d4ac9d24:-768bd09e:1392b67272a:-8000-000000000000029f> <1345055025030>  javax.ejb.EJBException: nested exception is: com.bea.wli.sb.transports.TransportException: ProxyService default/PS_FILE_INBOUND has been disabled.
javax.ejb.EJBException: nested exception is: com.bea.wli.sb.transports.TransportException: ProxyService default/PS_FILE_INBOUND has been disabled
        at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB.__onMessage(PolledMessageListenerMDB.java:55)
        at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB.access$000(PolledMessageListenerMDB.java:31)
        at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB$1.run(PolledMessageListenerMDB.java:41)
        at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB$1.run(PolledMessageListenerMDB.java:39)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.security.Security.runAs(Security.java:41)
        at com.bea.wli.sb.transports.poller.listener.PolledMessageListenerMDB.onMessage(PolledMessageListenerMDB.java:39)
        at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:583)
        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:486)
        at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:388)
        at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4659)
        at weblogic.jms.client.JMSSession.execute(JMSSession.java:4345)
        at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3821)
        at weblogic.jms.client.JMSSession.access$000(JMSSession.java:115)
        at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5170)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

  • The error above ONLY occurs when messages are picked up from the polling directory and in-flight when the PS is disabled. All 10 messages of that poll cycle are moved to the error directory. From here they can be recovered
  •  No messages are picked up from the polling directory after the PS is disabled

No comments: