users@glassfish.java.net

Re: Problem with JMS - filling my log with SPAM :)

From: Piero Filippin <filippinp_at_yahoo.co.uk>
Date: Wed, 17 Oct 2007 16:09:49 +0100

I just undeployed my application - the warnings keep being posted on the
log (both the createConnection and the destroy).

I think this is caused just by the fact I created a connectionFactory in
GF, I tried setting the "idle timeout" to 60 seconds instead of 300, and
now I have the 16 warnings (8 destroy and 8 createConnection) in the
log posted every minute!

Piero Filippin wrote:
> Hi Ramesh,
> Thank you for the explanation.
>
> I am definitely using createConnection with credentials, but initially
> (just before I started noticing the problem) I was using the
> parameterless version.
> Only at a later stage I tried supplying "guest","guest" as credentials.
>
> So, I am getting the
>
> "createConnection API used w/ username, password for Container Auth"
>
> (I am supposing w/ stands for "with") even is I am NOT supplying the
> username/password! (also, I get it 8 times, just after the timer
> destroys 8 connections)
>
> Piero
>
> Ramesh Parthasarathy wrote:
>> Hi,
>> What is the res-auth in the generated deployment descriptor. If you
>> have not annotated this, by default it should be Container.
>>
>> So, the message
>> "createConnection API used w/ username, password for Container Auth"
>>
>> is because you have specified the res-auth type as container auth, but
>> created a connection in your app using createConnection(uname,
>> password). Ideally when Container auth is specified you are supposed to
>> supply the default-resource-principal (user and password) through the
>> sun-ejb-jar.xml. If not, just do a createConnection() without
>> arguments, assuming that you have not deleted the default user "guest"
>> from the mq broker your connection creation will be successful, and you
>> will not see the warning message.
>>
>> On the other hand if you want to create a connection programatically in
>> your application using createConnection (uname, password) , then you
>> should modify the res-auth as "Application".
>> So the warning message you are seeing for create connection is quite
>> appropriate.
>>
>> I was more concerned about the destroy() message.
>>
>> Thanks
>> -Ramesh
>>
>>
>>
>>
>>
>> Piero Filippin wrote On 10/16/07 15:33,:
>>
>>> Well, they are marked as "WARNING" - so it looks like it is my fault -
>>> but from your answer it looks like it is not....
>>>
>>> I will create an issues ASAP
>>>
>>> Ramesh Parthasarathy wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> I think these messages should not be displayed at default log levels,
>>>> could you please create an issue for this in the issue tracker
>>>>
>>>> Thanks
>>>> -Ramesh
>>>> Piero Filippin wrote On 10/15/07 15:50,:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>> can someone please help me with this issue?
>>>>>
>>>>> I have this warning in the log from the moment I started using JMS
>>>>> in GF (v58g), this is not a serious problem but it is driving me
>>>>> nuts and it is filling my logs (it is repeated every 10 minutes):
>>>>>
>>>>> It looks like there is something opening a connection for JMS
>>>>> purposes (8 of them as set in GF) and after 10 minutes (another
>>>>> thing you can set in GF) of inactivity the connections are
>>>>> released and recreated.
>>>>>
>>>>> I am using a single connection from a @Stateful bean, I modified
>>>>> my code so everytime I have to post a message I open the
>>>>> connection, post the message and then close the connection.
>>>>>
>>>>> createConnection API used w/ username, password for Container Auth
>>>>> - this is because the connection is not using any auth, I am using
>>>>>
>>>>> Connection connection =
>>>>> connectionFactory.createConnection("guest", "guest");
>>>>>
>>>>> reading other posts it seems this message is created if you use
>>>>> connectionFactory.createConnection(); with no parameters.
>>>>>
>>>>> _destroy():called on a connection that was not closed.| - I
>>>>> cannot find out where this connection is opened in the first place!
>>>>>
>>>>> Any clue?
>>>>>
>>>>> These are some entries:
>>>>> ------------------------------------------------------------
>>>>> [#|2007-10-15T16:25:22.732+0100|WARNING|sun-appserver9.1|javax.jms.Connection.mqjmsra|_ThreadID=19;_ThreadName=Timer-6;_RequestID=86c7e9e0-febb-4aed-99a3-83c30626b25d;|MQJMSRA_DC2001:
>>>>> connectionId=6449459936493169920:_destroy():called on a connection
>>>>> that was not closed.|#]
>>>>>
>>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>