You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ENP <pr...@stc.donpac.ru> on 2006/06/02 12:02:39 UTC
Autocreate topics on startup
Hi,
Can I create topics on AMQ startup? I need to give only write or read
permission for topic to some group, but I don't wish to give them ability to
create new topics.
--
View this message in context: http://www.nabble.com/Autocreate-topics-on-startup-t1721833.html#a4677143
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Connection close
Posted by Adrian Tarau <ad...@daxtechnologies.com>.
In incubator-activemq-4-0.
And I meant to say : "
and the connection and *broker* on a shutdown hook:
Christopher G. Stach II wrote:
> Adrian Tarau wrote:
>
>> Well, I searched again the whole code(after close() ), and is not too
>> much code to search, I close only Consumers, Producers, Writers,
>> OutputStreams, and the connection and browse on a shutdown hook. Maybe
>> I'm wrong but I'm pretty sure I do I don't close the connection.
>> The strange thing is that is happened random, cannot figure out the
>> conditions. Once it was at 3 minutes after I started the application,
>> that was strange !!!
>>
>> James Strachan wrote:
>>
>>> On 6/2/06, Adrian Tarau <ad...@daxtechnologies.com> wrote:
>>>
>>>> I have broker with VM connector and I keep one session to this
>>>> connector. After a while I cannot consume messages, I got
>>>> "avax.jms.IllegalStateException: The Session is closed" even if I don't
>>>> close the connection.
>>>>
>>> Sounds like the connection was closed. You positive you're not closing
>>> it someplace? You're not using Spring's JmsTemplate or anything?
>>>
>>>
>>>
>>>> Is not safe to keep a session opened for a long time?
>>>>
>>> It should work.
>>>
>>>
>>>> There is some
>>>> background job that close long running sessions?
>>>>
>>> We have an inactivity timeout you can enable on a transport which will
>>> close inactive connections on the broker side - other than that no.
>>>
>
> I might have missed it, but which version? We have this happen with
> 3.2.2 all of the time, and 4.0 in certain conditions involving rollbacks.
>
>
Re: Connection close
Posted by "Christopher G. Stach II" <cg...@ldsys.net>.
Adrian Tarau wrote:
> Well, I searched again the whole code(after close() ), and is not too
> much code to search, I close only Consumers, Producers, Writers,
> OutputStreams, and the connection and browse on a shutdown hook. Maybe
> I'm wrong but I'm pretty sure I do I don't close the connection.
> The strange thing is that is happened random, cannot figure out the
> conditions. Once it was at 3 minutes after I started the application,
> that was strange !!!
>
> James Strachan wrote:
>> On 6/2/06, Adrian Tarau <ad...@daxtechnologies.com> wrote:
>>>
>>> I have broker with VM connector and I keep one session to this
>>> connector. After a while I cannot consume messages, I got
>>> "avax.jms.IllegalStateException: The Session is closed" even if I don't
>>> close the connection.
>>
>> Sounds like the connection was closed. You positive you're not closing
>> it someplace? You're not using Spring's JmsTemplate or anything?
>>
>>
>>> Is not safe to keep a session opened for a long time?
>>
>> It should work.
>>
>>> There is some
>>> background job that close long running sessions?
>>
>> We have an inactivity timeout you can enable on a transport which will
>> close inactive connections on the broker side - other than that no.
>
I might have missed it, but which version? We have this happen with
3.2.2 all of the time, and 4.0 in certain conditions involving rollbacks.
--
Christopher G. Stach II
Re: Connection close
Posted by Adrian Tarau <ad...@daxtechnologies.com>.
Well, I searched again the whole code(after close() ), and is not too
much code to search, I close only Consumers, Producers, Writers,
OutputStreams, and the connection and browse on a shutdown hook. Maybe
I'm wrong but I'm pretty sure I do I don't close the connection.
The strange thing is that is happened random, cannot figure out the
conditions. Once it was at 3 minutes after I started the application,
that was strange !!!
James Strachan wrote:
> On 6/2/06, Adrian Tarau <ad...@daxtechnologies.com> wrote:
>>
>> I have broker with VM connector and I keep one session to this
>> connector. After a while I cannot consume messages, I got
>> "avax.jms.IllegalStateException: The Session is closed" even if I don't
>> close the connection.
>
> Sounds like the connection was closed. You positive you're not closing
> it someplace? You're not using Spring's JmsTemplate or anything?
>
>
>> Is not safe to keep a session opened for a long time?
>
> It should work.
>
>> There is some
>> background job that close long running sessions?
>
> We have an inactivity timeout you can enable on a transport which will
> close inactive connections on the broker side - other than that no.
Re: Connection close
Posted by James Strachan <ja...@gmail.com>.
On 6/2/06, Adrian Tarau <ad...@daxtechnologies.com> wrote:
>
> I have broker with VM connector and I keep one session to this
> connector. After a while I cannot consume messages, I got
> "avax.jms.IllegalStateException: The Session is closed" even if I don't
> close the connection.
Sounds like the connection was closed. You positive you're not closing
it someplace? You're not using Spring's JmsTemplate or anything?
> Is not safe to keep a session opened for a long time?
It should work.
> There is some
> background job that close long running sessions?
We have an inactivity timeout you can enable on a transport which will
close inactive connections on the broker side - other than that no.
--
James
-------
http://radio.weblogs.com/0112098/
Connection close
Posted by Adrian Tarau <ad...@daxtechnologies.com>.
I have broker with VM connector and I keep one session to this
connector. After a while I cannot consume messages, I got
"avax.jms.IllegalStateException: The Session is closed" even if I don't
close the connection.
Is not safe to keep a session opened for a long time? There is some
background job that close long running sessions?
Thanks.
Re: Autocreate topics on startup
Posted by Adrian Tarau <ad...@daxtechnologies.com>.
Sorry for posting with this subject, please ignore this message
Adrian Tarau wrote:
> I have broker with VM connector and I keep one session to this
> connector. After a while I cannot consume messages, I got
> "avax.jms.IllegalStateException: The Session is closed" even if I
> don't close the connection.
>
> Is not safe to keep a session opened for a long time? There is some
> background job that close long running sessions?
> Thanks.
Re: Autocreate topics on startup
Posted by Adrian Tarau <ad...@daxtechnologies.com>.
I have broker with VM connector and I keep one session to this
connector. After a while I cannot consume messages, I got
"avax.jms.IllegalStateException: The Session is closed" even if I don't
close the connection.
Is not safe to keep a session opened for a long time? There is some
background job that close long running sessions?
Thanks.
Re: Autocreate topics on startup
Posted by James Strachan <ja...@gmail.com>.
On 6/2/06, ENP <pr...@stc.donpac.ru> wrote:
>
> Can I create new topics only by sending message to it?
No - you can also create topics using the MBeans.
> Can't I define topics before using them in activemq.xml?
Not currently no
--
James
-------
http://radio.weblogs.com/0112098/
Re: Autocreate topics on startup
Posted by ENP <pr...@stc.donpac.ru>.
Can I create new topics only by sending message to it?
Can't I define topics before using them in activemq.xml?
--
View this message in context: http://www.nabble.com/Autocreate-topics-on-startup-t1721833.html#a4678135
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Autocreate topics on startup
Posted by James Strachan <ja...@gmail.com>.
read = consume messages, write = publsh messages, admin = create new
destinations. So you should be able to set up whatever permissions you
need.
James
On 6/2/06, ENP <pr...@stc.donpac.ru> wrote:
>
> in http://incubator.apache.org/activemq/security.html I see only permissions
> explanation. I already write in my activemq.xml:
>
> <authorizationEntry topic="monitoring.>" read="consumers" write="producers"
> admin="admins" />
>
> producers must write to existing topics monitoring.t1 or monitoring.t2, but
> how can I create them? How I can only give admin permissions for
> monitoring.> to producers an so they will create it. But with this rights
> they can create monitoring.t3. It's bad.
> --
> View this message in context: http://www.nabble.com/Autocreate-topics-on-startup-t1721833.html#a4677820
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/
Re: Autocreate topics on startup
Posted by ENP <pr...@stc.donpac.ru>.
in http://incubator.apache.org/activemq/security.html I see only permissions
explanation. I already write in my activemq.xml:
<authorizationEntry topic="monitoring.>" read="consumers" write="producers"
admin="admins" />
producers must write to existing topics monitoring.t1 or monitoring.t2, but
how can I create them? How I can only give admin permissions for
monitoring.> to producers an so they will create it. But with this rights
they can create monitoring.t3. It's bad.
--
View this message in context: http://www.nabble.com/Autocreate-topics-on-startup-t1721833.html#a4677820
Sent from the ActiveMQ - User forum at Nabble.com.
Re: Autocreate topics on startup
Posted by James Strachan <ja...@gmail.com>.
On 6/2/06, ENP <pr...@stc.donpac.ru> wrote:
>
> Hi,
>
> Can I create topics on AMQ startup?
http://incubator.apache.org/activemq/security.html
"> I need to give only write or read
> permission for topic to some group, but I don't wish to give them ability to
> create new topics.
See
http://incubator.apache.org/activemq/security.html
--
James
-------
http://radio.weblogs.com/0112098/