Can't delete temp destination - Weblogic

This is a discussion on Can't delete temp destination - Weblogic ; I get weblogic.jms.common.JMSException: Destination is in use whenever I try to delete a temp queue. I narrowed it down to the following code, it just creates a temp dest and tries to delete it without ever using it: it still ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Can't delete temp destination

  1. Can't delete temp destination


    I get weblogic.jms.common.JMSException: Destination is in use whenever I try to
    delete a temp queue. I narrowed it down to the following code, it just creates
    a temp dest and tries to delete it without ever using it: it still produces the
    exception:

    // create a temporary queue for the responses ( one per application )
    TemporaryQueue respQueue = queueSession.createTemporaryQueue();
    QueueReceiver respReceiver = queueSession.createReceiver ( respQueue );

    respReceiver = null;
    respQueue.delete();

    I tried everything: to force gc and finalizers right before calling delete() :
    still getting the same exception ( I'm running Weblogic 8.1 on Linux ). By the
    way temp dest works just fine when I use it: I just can never delete it. here's
    the exception generating call stack:

    Exception occured: weblogic.jms.common.JMSException: Destination is in use
    weblogic.jms.common.JMSException: Destination is in use
    at weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:138)
    at weblogic.jms.dispatcher.DispatcherImpl_811_WLStub. dispatchSyncFuture(Unknown
    Source)
    at weblogic.jms.dispatcher.DispatcherWrapperState.dis patchSync(DispatcherWrapperState.java:333)
    at weblogic.jms.client.JMSConnection.destroyTemporary Destination(JMSConnection.java:1070)
    at weblogic.jms.common.DestinationImpl.delete(Destina tionImpl.java:458)
    at EchoClient.main(EchoClient.java:167)
    Caused by: weblogic.jms.common.JMSException: Destination is in use
    at weblogic.jms.backend.BEDestination.deleteTempDesti nation(BEDestination.java:3073)
    at weblogic.jms.backend.BackEnd.removeTempDestination (BackEnd.java:2329)
    at weblogic.jms.backend.BackEnd.invoke(BackEnd.java:2 871)
    at weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:609)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy ncInternal(DispatcherImpl.java:128)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy nc(DispatcherImpl.java:119)
    at weblogic.jms.dispatcher.Request.dispatchAsync(Requ est.java:828)
    at weblogic.jms.frontend.FEConnection.destroyTemporar yDestination(FEConnection.java:1438)
    at weblogic.jms.frontend.FEConnection.invoke(FEConnec tion.java:1633)
    at weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:609)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy ncInternal(DispatcherImpl.java:128)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cFuture(DispatcherImpl.java:180)
    at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invo ke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicS erverRef.java:466)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:409)
    at weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubject.java:353)
    at weblogic.security.service.SecurityManager.runAs(Se curityManager.java:144)
    at weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:404)
    at weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:170)

  2. Re: Can't delete temp destination

    Did you try calling "close" on either the QueueReceiver or the QueueSession
    object before calling "delete"? That should work. You don't have to (and
    should not) depend on finalizers to do the work of closing the consumer for
    you in this case.

    greg

    "Lev" wrote in message news:4002ce31$1@newsgroups.bea.com...
    >
    > I get weblogic.jms.common.JMSException: Destination is in use whenever I

    try to
    > delete a temp queue. I narrowed it down to the following code, it just

    creates
    > a temp dest and tries to delete it without ever using it: it still

    produces the
    > exception:
    >
    > // create a temporary queue for the responses ( one per

    application )
    > TemporaryQueue respQueue = queueSession.createTemporaryQueue();
    > QueueReceiver respReceiver = queueSession.createReceiver (

    respQueue );
    >
    > respReceiver = null;
    > respQueue.delete();
    >
    > I tried everything: to force gc and finalizers right before calling

    delete() :
    > still getting the same exception ( I'm running Weblogic 8.1 on Linux ). By

    the
    > way temp dest works just fine when I use it: I just can never delete it.

    here's
    > the exception generating call stack:
    >
    > Exception occured: weblogic.jms.common.JMSException: Destination is in use
    > weblogic.jms.common.JMSException: Destination is in use
    > at

    weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108
    )
    > at

    weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:138)
    > at

    weblogic.jms.dispatcher.DispatcherImpl_811_WLStub. dispatchSyncFuture(Unknown
    > Source)
    > at

    weblogic.jms.dispatcher.DispatcherWrapperState.dis patchSync(DispatcherWrappe
    rState.java:333)
    > at

    weblogic.jms.client.JMSConnection.destroyTemporary Destination(JMSConnection.
    java:1070)
    > at

    weblogic.jms.common.DestinationImpl.delete(Destina tionImpl.java:458)
    > at EchoClient.main(EchoClient.java:167)
    > Caused by: weblogic.jms.common.JMSException: Destination is in use
    > at

    weblogic.jms.backend.BEDestination.deleteTempDesti nation(BEDestination.java:
    3073)
    > at

    weblogic.jms.backend.BackEnd.removeTempDestination (BackEnd.java:2329)
    > at weblogic.jms.backend.BackEnd.invoke(BackEnd.java:2 871)
    > at

    weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:609)
    > at

    weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy ncInternal(DispatcherImpl.
    java:128)
    > at

    weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy nc(DispatcherImpl.java:119
    )
    > at weblogic.jms.dispatcher.Request.dispatchAsync(Requ est.java:828)
    > at

    weblogic.jms.frontend.FEConnection.destroyTemporar yDestination(FEConnection.
    java:1438)
    > at

    weblogic.jms.frontend.FEConnection.invoke(FEConnec tion.java:1633)
    > at

    weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:609)
    > at

    weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy ncInternal(DispatcherImpl.
    java:128)
    > at

    weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cFuture(DispatcherImpl.jav
    a:180)
    > at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invo ke(Unknown

    Source)
    > at

    weblogic.rmi.internal.BasicServerRef.invoke(BasicS erverRef.java:466)
    > at

    weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:409)
    > at

    weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubjec
    t.java:353)
    > at

    weblogic.security.service.SecurityManager.runAs(Se curityManager.java:144)
    > at

    weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:404)
    > at

    weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:3
    0)
    > at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:197)
    > at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:170)




  3. Re: Can't delete temp destination


    QueueSession.close() always worked: I just wanted to be able to create and delete
    temp destinations without closing the session. The problem was I completely forgot
    about MessageConsumer's close () ( QueueReceiver extends MessageConsumer ). Thanks
    Greg!

    P.S. Of course one shouldn't call and/or rely on gc() and runFinalizers() : I
    did it just for the investigation sake ;-)

    "Greg Brail" wrote:
    >Did you try calling "close" on either the QueueReceiver or the QueueSession
    >object before calling "delete"? That should work. You don't have to (and
    >should not) depend on finalizers to do the work of closing the consumer
    >for
    >you in this case.
    >
    > greg
    >
    >"Lev" wrote in message news:4002ce31$1@newsgroups.bea.com...
    >>
    >> I get weblogic.jms.common.JMSException: Destination is in use whenever

    >I
    >try to
    >> delete a temp queue. I narrowed it down to the following code, it just

    >creates
    >> a temp dest and tries to delete it without ever using it: it still

    >produces the
    >> exception:
    >>
    >> // create a temporary queue for the responses ( one per

    >application )
    >> TemporaryQueue respQueue = queueSession.createTemporaryQueue();
    >> QueueReceiver respReceiver = queueSession.createReceiver (

    >respQueue );
    >>
    >> respReceiver = null;
    >> respQueue.delete();
    >>
    >> I tried everything: to force gc and finalizers right before calling

    >delete() :
    >> still getting the same exception ( I'm running Weblogic 8.1 on Linux

    >). By
    >the
    >> way temp dest works just fine when I use it: I just can never delete

    >it.
    >here's
    >> the exception generating call stack:
    >>
    >> Exception occured: weblogic.jms.common.JMSException: Destination is

    >in use
    >> weblogic.jms.common.JMSException: Destination is in use
    >> at

    >weblogic.rjvm.BasicOutboundRequest.sendReceive(Bas icOutboundRequest.java:108
    >)
    >> at

    >weblogic.rmi.internal.BasicRemoteRef.invoke(BasicR emoteRef.java:138)
    >> at

    >weblogic.jms.dispatcher.DispatcherImpl_811_WLStub. dispatchSyncFuture(Unknown
    >> Source)
    >> at

    >weblogic.jms.dispatcher.DispatcherWrapperState.dis patchSync(DispatcherWrappe
    >rState.java:333)
    >> at

    >weblogic.jms.client.JMSConnection.destroyTemporary Destination(JMSConnection.
    >java:1070)
    >> at

    >weblogic.jms.common.DestinationImpl.delete(Destina tionImpl.java:458)
    >> at EchoClient.main(EchoClient.java:167)
    >> Caused by: weblogic.jms.common.JMSException: Destination is in use
    >> at

    >weblogic.jms.backend.BEDestination.deleteTempDesti nation(BEDestination.java:
    >3073)
    >> at

    >weblogic.jms.backend.BackEnd.removeTempDestination (BackEnd.java:2329)
    >> at weblogic.jms.backend.BackEnd.invoke(BackEnd.java:2 871)
    >> at

    >weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:609)
    >> at

    >weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy ncInternal(DispatcherImpl.
    >java:128)
    >> at

    >weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy nc(DispatcherImpl.java:119
    >)
    >> at weblogic.jms.dispatcher.Request.dispatchAsync(Requ est.java:828)
    >> at

    >weblogic.jms.frontend.FEConnection.destroyTemporar yDestination(FEConnection.
    >java:1438)
    >> at

    >weblogic.jms.frontend.FEConnection.invoke(FEConnec tion.java:1633)
    >> at

    >weblogic.jms.dispatcher.Request.wrappedFiniteState Machine(Request.java:609)
    >> at

    >weblogic.jms.dispatcher.DispatcherImpl.dispatchAsy ncInternal(DispatcherImpl.
    >java:128)
    >> at

    >weblogic.jms.dispatcher.DispatcherImpl.dispatchSyn cFuture(DispatcherImpl.jav
    >a:180)
    >> at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invo ke(Unknown

    >Source)
    >> at

    >weblogic.rmi.internal.BasicServerRef.invoke(BasicS erverRef.java:466)
    >> at

    >weblogic.rmi.internal.BasicServerRef$1.run(BasicSe rverRef.java:409)
    >> at

    >weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(AuthenticatedSubjec
    >t.java:353)
    >> at

    >weblogic.security.service.SecurityManager.runAs(Se curityManager.java:144)
    >> at

    >weblogic.rmi.internal.BasicServerRef.handleRequest (BasicServerRef.java:404)
    >> at

    >weblogic.rmi.internal.BasicExecuteRequest.execute( BasicExecuteRequest.java:3
    >0)
    >> at weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:197)
    >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:170)

    >
    >



+ Reply to Thread