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, but I have not read anything that indicates that the behavior should be different between and

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(
        at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncTran(
        at weblogic.jms.client.JMSProducer.toFEProducer(
        at weblogic.jms.client.JMSProducer.deliveryInternal(
        at weblogic.jms.client.JMSProducer.sendInternal(
        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: ProxyService default/PS_FILE_INBOUND has been disabled.
javax.ejb.EJBException: nested exception is: ProxyService default/PS_FILE_INBOUND has been disabled
        at weblogic.ejb.container.internal.MDListener.execute(
        at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(
        at weblogic.ejb.container.internal.MDListener.onMessage(
        at weblogic.jms.client.JMSSession.onMessage(
        at weblogic.jms.client.JMSSession.execute(
        at weblogic.jms.client.JMSSession.executeMessage(
        at weblogic.jms.client.JMSSession.access$000(
        at weblogic.jms.client.JMSSession$

  • 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