Bug 790431

Summary: remove-old-service will throw ServiceNotFoundException, skip registerEpr
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Martin Weiler <mputz>
Component: JBossESBAssignee: tcunning
Status: VERIFIED --- QA Contact: Jiri Pechanec <jpechane>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2.0 GACC: jpechane, ldimaggi, rwagner, soa-p-jira, tcunning
Target Milestone: ER1   
Target Release: 5.3.0 GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
A problem occurs when the user tries to deploy a service for the frist time. When adding the remove-old-service attribute to the EPR, the service registration fails and a ServiceNotFoundException error is thrown. The registerEpr should be moved to prevent this from occuring.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Weiler 2012-02-14 14:27:03 UTC
Description of problem:

In case the service is being deployed for the first time, this setting prevents it from being registered:

            try
            {
                    if ("true".equalsIgnoreCase(removeOldService))                    
                            registry.unRegisterService(category, name);
                    
                registry.registerEPR(category, name,
                    serviceDescription, epr, eprDescription) ;
            }
            catch (ServiceNotFoundException ex)
            {
                    // ignore as it's possible another client just did the removal for us.
                    
                    logger.debug("Could not unregister service < "+category+", "+name+" >.");
            }

The registry.registerEPR call should happen after the ServiceNotFoundException is caught?

How reproducible:
always

Steps to Reproduce:
1. Add remove-old-service attribute to EPR:
    <jms-listener name="JMS-ESBListener"  busidref="quickstartEsbChannel">
        <property name="remove-old-service" value="true"/>
    </jms-listener>  
2. Start against a clean DB
3. Service registration fails
  
Actual results:
Service not registered

Expected results:
Service getting registered

Comment 1 JBoss JIRA Server 2012-02-23 20:27:39 UTC
Tom Cunningham <tcunning> updated the status of jira JBESB-3747 to Resolved

Comment 2 JBoss JIRA Server 2012-02-23 20:27:39 UTC
Tom Cunningham <tcunning> made a comment on jira JBESB-3747

Move the registerEpr so that it will happen whether or not a ServiceNotFoundException occurs.

Comment 3 JBoss JIRA Server 2012-02-23 20:27:44 UTC
Tom Cunningham <tcunning> updated the status of jira JBESB-3747 to Closed

Comment 4 Rick Wagner 2012-03-19 21:49:03 UTC
Customer-facing, seems done.  Please include this 'medium' issue if at all possible.

Comment 5 Suz 2012-06-13 04:34:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
A problem occurs when launching the JBoss ESB which prevents it from being registered. When adding the remove-old-service attribute to the EPR, the service registration fails and a ServiceNotFoundException error is thrown. The registerEpr should be moved to prevent this from occuring.

Comment 6 Jiri Pechanec 2012-06-13 06:16:52 UTC
Verified in ER3

Comment 7 David Le Sage 2012-06-14 03:31:38 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-A problem occurs when launching the JBoss ESB which prevents it from being registered. When adding the remove-old-service attribute to the EPR, the service registration fails and a ServiceNotFoundException error is thrown. The registerEpr should be moved to prevent this from occuring.+A problem occurs when the user tries to deploy a service for the frist time. When adding the remove-old-service attribute to the EPR, the service registration fails and a ServiceNotFoundException error is thrown. The registerEpr should be moved to prevent this from occuring.