Author: keith Date: Sun Jul 20 22:49:57 2008 New Revision: 19713 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19713
Log: Fixing Mashup.jsp cause it breaks when its accessed when a service is stopped Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java trunk/mashup/java/modules/www/mashup.jsp Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java?rev=19713&r1=19712&r2=19713&view=diff ============================================================================== --- trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java (original) +++ trunk/mashup/java/modules/core/src/org/wso2/mashup/utils/MashupUtils.java Sun Jul 20 22:49:57 2008 @@ -1105,6 +1105,14 @@ .getService(serviceName).isExposedTransport(transportName); } + public static boolean isMashupActive(String serviceName) throws AxisFault { + ServerManager serverManager = ServerManager.getInstance(); + ConfigurationContext configContext = serverManager.configContext; + AxisConfiguration configuration = configContext.getAxisConfiguration(); + AxisService service = configuration.getService(serviceName); + return service.isActive(); + } + public static String getServerURL(String serverName) { ServerManager serverManager = ServerManager.getInstance(); ConfigurationContext configContext = serverManager.configContext; Modified: trunk/mashup/java/modules/www/mashup.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/mashup.jsp?rev=19713&r1=19712&r2=19713&view=diff ============================================================================== --- trunk/mashup/java/modules/www/mashup.jsp (original) +++ trunk/mashup/java/modules/www/mashup.jsp Sun Jul 20 22:49:57 2008 @@ -552,7 +552,8 @@ </tr> <% //Service transports handling will only be available to the service author and admins - if((author.equals(currentUser)) || (RegistryUtils.isAdminRole(userRegistry))){%> + if (((author.equals(currentUser)) || (RegistryUtils.isAdminRole(userRegistry))) && + MashupUtils.isMashupActive(mashupServiceName)) {%> <tr> <td class="mashup_label"> <nobr>configuration:</nobr> _______________________________________________ Mashup-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev
