@Override
    public BrowseCursor getBrowseCursor(SelectionCriteria criteria) throws SIResourceException, SISelectorSyntaxException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "getBrowseCursor", criteria);

        NonLockingCursor msgStoreCur = null;
        MessageSelectorFilter filter = null;
        BrowseCursor cursor = null;
        try
        {
            //if there is a selection criteria then we have to
            //create a MessageStore filter
            if (criteria != null &&
                ((criteria.getSelectorString() != null && !criteria.getSelectorString().equals("")) ||
                (criteria.getDiscriminator() != null && !criteria.getDiscriminator().equals(""))))
            {
                filter = new MessageSelectorFilter(_messageProcessor, criteria);
            }

            //try to get a new browseCursor from the message store
            if (itemStream != null)
                msgStoreCur = itemStream.newNonLockingItemCursor(filter);
            else if (subscriptionItemStream != null)
                msgStoreCur = subscriptionItemStream.newNonLockingCursor(filter);

            cursor = new JSBrowseCursor(msgStoreCur);

        } catch (SISelectorSyntaxException e)
        {
            // shouldn't occur so FFDC.
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor",
                                        "1:2314:1.280.5.25",
                                        this);

            SibTr.exception(tc, e);
            SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                        new Object[] {
                                      "com.ibm.ws.sib.processor.impl.ConsumerDispatcher",
                                      "1:2321:1.280.5.25",
                                      e });

            if (cursor != null)
            {
                //try and finish off this bad cursor
                try
                {
                    cursor.finished();
                } catch (SISessionDroppedException e1)
                {
                    //an error trying to close the bad cursor. We swallow this error
                    //and instead throw the exception that caused us to try and close
                    FFDCFilter.processException(
                                                e1,
                                                "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor",
                                                "1:2338:1.280.5.25",
                                                this);

                    SibTr.exception(tc, e1);
                    SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                new Object[] {
                                              "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor",
                                              "1:2345:1.280.5.25",
                                              SIMPUtils.getStackTrace(e1) });
                }
            }

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "getBrowseCursor", e);
            throw e;
        } catch (Exception e)
        {
            // shouldn't occur so FFDC.
            FFDCFilter.processException(
                                        e,
                                        "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor",
                                        "1:2361:1.280.5.25",
                                        this);

            SibTr.exception(tc, e);
            SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                        new Object[] {
                                      "com.ibm.ws.sib.processor.impl.ConsumerDispatcher",
                                      "1:2368:1.280.5.25",
                                      e });

            if (cursor != null)
            {
                try
                {
                    cursor.finished();
                } catch (SISessionDroppedException e1)
                {
                    FFDCFilter.processException(
                                                e1,
                                                "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor",
                                                "1:2382:1.280.5.25",
                                                this);

                    SibTr.exception(tc, e1);
                    SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                new Object[] {
                                              "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor",
                                              "1:2389:1.280.5.25",
                                              SIMPUtils.getStackTrace(e1) });
                }
            }

            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "getBrowseCursor", e);

            throw new SIResourceException(
                            nls.getFormattedMessage(
                                                    "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                    new Object[] {
                                                                  "com.ibm.ws.sib.processor.impl.ConsumerDispatcher",
                                                                  "1:2402:1.280.5.25",
                                                                  e },
                                                    null),
                            e);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getBrowseCursor", cursor);
        //return the cursor or null
        return cursor;
    }
@ Override public BrowseCursor getBrowseCursor ( SelectionCriteria criteria ) throws SIResourceException , SISelectorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getBrowseCursor" , criteria ) ; NonLockingCursor msgStoreCur = null ; MessageSelectorFilter filter = null ; BrowseCursor cursor = null ; try { if ( criteria != null && ( ( criteria . getSelectorString ( ) != null && ! criteria . getSelectorString ( ) . equals ( "" ) ) || ( criteria . getDiscriminator ( ) != null && ! criteria . getDiscriminator ( ) . equals ( "" ) ) ) ) { filter = new MessageSelectorFilter ( _messageProcessor , criteria ) ; } if ( itemStream != null ) msgStoreCur = itemStream . newNonLockingItemCursor ( filter ) ; else if ( subscriptionItemStream != null ) msgStoreCur = subscriptionItemStream . newNonLockingCursor ( filter ) ; cursor = new JSBrowseCursor ( msgStoreCur ) ; } catch ( SISelectorSyntaxException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor" , "1:2314:1.280.5.25" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher" , "1:2321:1.280.5.25" , e } ) ; if ( cursor != null ) { try { cursor . finished ( ) ; } catch ( SISessionDroppedException e1 ) { FFDCFilter . processException ( e1 , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor" , "1:2338:1.280.5.25" , this ) ; SibTr . exception ( tc , e1 ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor" , "1:2345:1.280.5.25" , SIMPUtils . getStackTrace ( e1 ) } ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getBrowseCursor" , e ) ; throw e ; } catch ( Exception e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor" , "1:2361:1.280.5.25" , this ) ; SibTr . exception ( tc , e ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher" , "1:2368:1.280.5.25" , e } ) ; if ( cursor != null ) { try { cursor . finished ( ) ; } catch ( SISessionDroppedException e1 ) { FFDCFilter . processException ( e1 , "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor" , "1:2382:1.280.5.25" , this ) ; SibTr . exception ( tc , e1 ) ; SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher.getBrowseCursor" , "1:2389:1.280.5.25" , SIMPUtils . getStackTrace ( e1 ) } ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getBrowseCursor" , e ) ; throw new SIResourceException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.ConsumerDispatcher" , "1:2402:1.280.5.25" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getBrowseCursor" , cursor ) ; return cursor ; }
/*
(non-Javadoc)

@see com.ibm.ws.sib.processor.impl.Browsable#getBrowseCursor(com.ibm.ws.sib.store.Filter)