[jira] Created: (MUSE-254) ServiceGroup can't reference other ServiceGroups

View: New views
10 Messages — Rating Filter:   Alert me  

[jira] Created: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

ServiceGroup can't reference other ServiceGroups
------------------------------------------------

                 Key: MUSE-254
                 URL: https://issues.apache.org/jira/browse/MUSE-254
             Project: Muse
          Issue Type: Bug
         Environment: Muse 2.2.0, Eclipse 3.2.1
            Reporter: Vinh Nguyen
            Assignee: Dan Jemiolo


SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.

The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.

The fix:
1) Remove filter logic in resourceAdded() that checks for ServiceGroup and Entry capabilities.
   Filter is no longer needed.
2) In createEntry(), remove the code chunk at the end which:
   a) calls resource.initialize()
   b) adds the resource to ResourceManager
   c) sets termination time on the resource
3) Move the above code to a new initializeEntry(WsResource,Date) method.
4) In resourceAdded(), remove code block which gets termination time of the parent resource.
   It's not needed because the new Entry resource doesn't need a termination time.
   It'll automatically be removed in resourceRemoved().  See Muse-253.
5) In resourceAdded(), remove the call to addEntry(resource).  Replace with this logic:

        WsResource entry = createEntry(epr, null, null);
        addEntry(epr, entry);
        try
        {
            initializeEntry(entry, null);
        }
        catch (Exception exc)
        {
            removeEntry(entry);
            throw new AddRefusedFault(exc);
        }

Basically, the logic flow is more streamlined.
Create the entry but DON'T initialize it yet.
Add the Entry, then initialize it.
If initialization fails, then remove it.
So now, a ServiceGroup is able to reference other ServiceGroups:)


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinh Nguyen updated MUSE-254:
-----------------------------

    Attachment: ServiceGroup.java

Custom class which shows code patches for Muse bugs in SimpleServiceGroup.java

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>         Attachments: ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic in resourceAdded() that checks for ServiceGroup and Entry capabilities.
>    Filter is no longer needed.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In resourceAdded(), remove the call to addEntry(resource).  Replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinh Nguyen updated MUSE-254:
-----------------------------

    Description:
SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.

The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.

The fix:
1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
2) In createEntry(), remove the code chunk at the end which:
   a) calls resource.initialize()
   b) adds the resource to ResourceManager
   c) sets termination time on the resource
3) Move the above code to a new initializeEntry(WsResource,Date) method.
4) In resourceAdded(), remove code block which gets termination time of the parent resource.
   It's not needed because the new Entry resource doesn't need a termination time.
   It'll automatically be removed in resourceRemoved().  See Muse-253.
5) In resourceAdded(), remove the call to addEntry(resource).  Replace with this logic:

        WsResource entry = createEntry(epr, null, null);
        addEntry(epr, entry);
        try
        {
            initializeEntry(entry, null);
        }
        catch (Exception exc)
        {
            removeEntry(entry);
            throw new AddRefusedFault(exc);
        }

Basically, the logic flow is more streamlined.
Create the entry but DON'T initialize it yet.
Add the Entry, then initialize it.
If initialization fails, then remove it.
So now, a ServiceGroup is able to reference other ServiceGroups:)


  was:
SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.

The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.

The fix:
1) Remove filter logic in resourceAdded() that checks for ServiceGroup and Entry capabilities.
   Filter is no longer needed.
2) In createEntry(), remove the code chunk at the end which:
   a) calls resource.initialize()
   b) adds the resource to ResourceManager
   c) sets termination time on the resource
3) Move the above code to a new initializeEntry(WsResource,Date) method.
4) In resourceAdded(), remove code block which gets termination time of the parent resource.
   It's not needed because the new Entry resource doesn't need a termination time.
   It'll automatically be removed in resourceRemoved().  See Muse-253.
5) In resourceAdded(), remove the call to addEntry(resource).  Replace with this logic:

        WsResource entry = createEntry(epr, null, null);
        addEntry(epr, entry);
        try
        {
            initializeEntry(entry, null);
        }
        catch (Exception exc)
        {
            removeEntry(entry);
            throw new AddRefusedFault(exc);
        }

Basically, the logic flow is more streamlined.
Create the entry but DON'T initialize it yet.
Add the Entry, then initialize it.
If initialization fails, then remove it.
So now, a ServiceGroup is able to reference other ServiceGroups:)



Editted fix step #1.  Still need to filter Entry resources, but just not ServiceGroup resources.

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>         Attachments: ServiceGroup.java, ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In resourceAdded(), remove the call to addEntry(resource).  Replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinh Nguyen updated MUSE-254:
-----------------------------

    Attachment: ServiceGroup.java

Updated resourceAdded() to filter only ServiceGroup.  Still need to filter Entry resources.

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>         Attachments: ServiceGroup.java, ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In resourceAdded(), remove the call to addEntry(resource).  Replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinh Nguyen updated MUSE-254:
-----------------------------

    Description:
SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.

The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.

The fix:
1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
2) In createEntry(), remove the code chunk at the end which:
   a) calls resource.initialize()
   b) adds the resource to ResourceManager
   c) sets termination time on the resource
3) Move the above code to a new initializeEntry(WsResource,Date) method.
4) In resourceAdded(), remove code block which gets termination time of the parent resource.
   It's not needed because the new Entry resource doesn't need a termination time.
   It'll automatically be removed in resourceRemoved().  See Muse-253.
5) In addEntry(), replace with this logic:

        WsResource entry = createEntry(epr, null, null);
        addEntry(epr, entry);
        try
        {
            initializeEntry(entry, null);
        }
        catch (Exception exc)
        {
            removeEntry(entry);
            throw new AddRefusedFault(exc);
        }

Basically, the logic flow is more streamlined.
Create the entry but DON'T initialize it yet.
Add the Entry, then initialize it.
If initialization fails, then remove it.
So now, a ServiceGroup is able to reference other ServiceGroups:)


  was:
SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.

The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.

The fix:
1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
2) In createEntry(), remove the code chunk at the end which:
   a) calls resource.initialize()
   b) adds the resource to ResourceManager
   c) sets termination time on the resource
3) Move the above code to a new initializeEntry(WsResource,Date) method.
4) In resourceAdded(), remove code block which gets termination time of the parent resource.
   It's not needed because the new Entry resource doesn't need a termination time.
   It'll automatically be removed in resourceRemoved().  See Muse-253.
5) In resourceAdded(), remove the call to addEntry(resource).  Replace with this logic:

        WsResource entry = createEntry(epr, null, null);
        addEntry(epr, entry);
        try
        {
            initializeEntry(entry, null);
        }
        catch (Exception exc)
        {
            removeEntry(entry);
            throw new AddRefusedFault(exc);
        }

Basically, the logic flow is more streamlined.
Create the entry but DON'T initialize it yet.
Add the Entry, then initialize it.
If initialization fails, then remove it.
So now, a ServiceGroup is able to reference other ServiceGroups:)



Updated fix step #5. New create/add/init code should actually be in addEntry, not resourceAdded().

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>         Attachments: ServiceGroup.java, ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In addEntry(), replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinh Nguyen updated MUSE-254:
-----------------------------

    Attachment:     (was: ServiceGroup.java)

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>         Attachments: ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In addEntry(), replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinh Nguyen updated MUSE-254:
-----------------------------

    Attachment: ServiceGroup.java

Custom class which shows code patches for Muse bugs in SimpleServiceGroup.java

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>         Attachments: ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In addEntry(), replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vinh Nguyen updated MUSE-254:
-----------------------------

    Attachment:     (was: ServiceGroup.java)

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Dan Jemiolo
>         Attachments: ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In addEntry(), replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Assigned: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Twiner reassigned MUSE-254:
---------------------------------

    Assignee: Chris Twiner  (was: Dan Jemiolo)

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Chris Twiner
>         Attachments: ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In addEntry(), replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...


[jira] Resolved: (MUSE-254) ServiceGroup can't reference other ServiceGroups

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/MUSE-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Twiner resolved MUSE-254.
-------------------------------

    Resolution: Fixed

marking as resolved, asked Vinh to verify the fixes in head match his latest patches.

> ServiceGroup can't reference other ServiceGroups
> ------------------------------------------------
>
>                 Key: MUSE-254
>                 URL: https://issues.apache.org/jira/browse/MUSE-254
>             Project: Muse
>          Issue Type: Bug
>         Environment: Muse 2.2.0, Eclipse 3.2.1
>            Reporter: Vinh Nguyen
>            Assignee: Chris Twiner
>             Fix For: 2.2.1
>
>         Attachments: ServiceGroup.java
>
>
> SimpleServiceGroup has a bug. It doesn't allow a ServiceGroup to add references to other ServiceGroups.  But I think this should be allowed.
> The current limitation/flaw is in resourceAdded() and createEntry().  In the current logic, it creates and initializes at the same time.  So even before it can be added to the ServiceGroup mappings, the ResourceManager invokes the resourceAdded() listener method...which is why it currently can't allow adding SGs because it will go into an endless loop.
> The fix:
> 1) Remove filter logic at top of resourceAdded() which filters ServiceGroups. Still need to filter Entry resources though.
> 2) In createEntry(), remove the code chunk at the end which:
>    a) calls resource.initialize()
>    b) adds the resource to ResourceManager
>    c) sets termination time on the resource
> 3) Move the above code to a new initializeEntry(WsResource,Date) method.
> 4) In resourceAdded(), remove code block which gets termination time of the parent resource.
>    It's not needed because the new Entry resource doesn't need a termination time.
>    It'll automatically be removed in resourceRemoved().  See Muse-253.
> 5) In addEntry(), replace with this logic:
>         WsResource entry = createEntry(epr, null, null);
>         addEntry(epr, entry);
>         try
>         {
>             initializeEntry(entry, null);
>         }
>         catch (Exception exc)
>         {
>             removeEntry(entry);
>             throw new AddRefusedFault(exc);
>         }
> Basically, the logic flow is more streamlined.
> Create the entry but DON'T initialize it yet.
> Add the Entry, then initialize it.
> If initialization fails, then remove it.
> So now, a ServiceGroup is able to reference other ServiceGroups:)

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@...
For additional commands, e-mail: muse-dev-help@...