[jboss-as7-dev] MSC service names in AS7

Jason T. Greene jason.greene at redhat.com
Wed Jun 1 16:49:05 EDT 2011


On 6/1/11 3:08 PM, David Bosschaert wrote:
>
>
> ----- Original Message -----
>> From: "David M. Lloyd"<david.lloyd at redhat.com> To:
>> jboss-as7-dev at lists.jboss.org Sent: Wednesday, 1 June, 2011 9:02:28
>> PM Subject: Re: [jboss-as7-dev] MSC service names in AS7 On
>> 06/01/2011 02:54 PM, David Bosschaert wrote:
>>> Hi all,
>>>
>>> Just a quick question re service names in AS7. Is there any
>>> guidelines on the names you give your AS7 services? When I use a
>>> shortlived service, does it matter what name I give it?
>>
>> All services created by us start with "jboss.". Service names
>> should be chosen in such a way as to make conflicts impossible.
>> That's about it.
>
> Ok, thanks.
>
> One further question. Let's say my service performs some async action
> in start() and when that action is finished I'm not really interested
> in the service any more. Should I remove it somehow from the system
> then?

Keep in mind that all AS services should be able to be stopped and 
started and still operate correctly. So if your start takes an action 
that must be undone to start again, then it needs a valid stop.

Maybe you could describe more what you are trying to model?

>
> Additionally, let's say I have a service that can run more than once,
> should I give it a different name every time?

Hmm perhaps you are thinking more of a Task model with an executor than 
a service model?

The name is really just a lifecycle control point that is used to track 
the service, or change its state. If more than one can be ran at the 
same time you need unique names.

-- 
Jason T. Greene
JBoss, a division of Red Hat


More information about the jboss-as7-dev mailing list