Bug 790431 - remove-old-service will throw ServiceNotFoundException, skip registerEpr
remove-old-service will throw ServiceNotFoundException, skip registerEpr
Status: VERIFIED
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.2.0 GA
Unspecified Unspecified
medium Severity medium
: ER1
: 5.3.0 GA
Assigned To: tcunning
Jiri Pechanec
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-14 09:27 EST by Martin Weiler
Modified: 2015-03-12 07:24 EDT (History)
6 users (show)

See Also:
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:


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBESB-3747 Major Closed remove-old-service will throw ServiceNotFoundException, skip registerEpr 2012-07-30 22:37:40 EDT

  None (edit)
Description Martin Weiler 2012-02-14 09:27:03 EST
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 15:27:39 EST
Tom Cunningham <tcunning@redhat.com> updated the status of jira JBESB-3747 to Resolved
Comment 2 JBoss JIRA Server 2012-02-23 15:27:39 EST
Tom Cunningham <tcunning@redhat.com> 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 15:27:44 EST
Tom Cunningham <tcunning@redhat.com> updated the status of jira JBESB-3747 to Closed
Comment 4 Rick Wagner 2012-03-19 17:49:03 EDT
Customer-facing, seems done.  Please include this 'medium' issue if at all possible.
Comment 5 Suz 2012-06-13 00:34:47 EDT
    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 02:16:52 EDT
Verified in ER3
Comment 7 David Le Sage 2012-06-13 23:31:38 EDT
    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.

Note You need to log in before you can comment on or make changes to this bug.