You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2016/01/07 17:13:39 UTC

[jira] [Commented] (KARAF-4166) Add karaf.lock.exclusive property to prevent a slave instance to start

    [ https://issues.apache.org/jira/browse/KARAF-4166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15087637#comment-15087637 ] 

Jean-Baptiste Onofré commented on KARAF-4166:
---------------------------------------------

Actually, in order to work with any lock impl, I'm doing the exclusive check in the Main.

> Add karaf.lock.exclusive property to prevent a slave instance to start
> ----------------------------------------------------------------------
>
>                 Key: KARAF-4166
>                 URL: https://issues.apache.org/jira/browse/KARAF-4166
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-core
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 3.0.6, 4.0.4
>
>
> By default, a Karaf slave instance starts to be able to "pre-install" bundle there.
> We can enhance the SimpleLockFile (controled a karaf.lock.exclusive property) like this:
> {code}
> boolean lock() throws Exception {
>  boolean locked = super.lock();
>  if (!locked) throw new RuntimeException("startup aborted");
>  return true;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)