dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05262
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1725: mobile-service: Fixed exception on service restart
------------------------------------------------------------
revno: 1725
committer: Saptarshi <sunbiz@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-04-02 18:31:27 +0200
message:
mobile-service: Fixed exception on service restart
removed:
dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.gif
added:
dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.png
modified:
dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java
dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml
dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/welcome.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java'
--- dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java 2010-04-02 02:37:49 +0000
+++ dhis-mobile/dhis-service-mobile/src/main/java/org/hisp/dhis/mobile/SmsService.java 2010-04-02 16:31:27 +0000
@@ -58,6 +58,8 @@
private static Service serv;
+ private static boolean gatewayLoaded;
+
private boolean serviceStatus;
private Properties props;
@@ -145,6 +147,9 @@
{
getService().getLogger().logError( "Interrupted Exception in sending message", ex, null );
}
+ } else
+ {
+ getService().getLogger().logError( "Service not running", null, null );
}
}
@@ -298,8 +303,10 @@
{
gateway.setOutbound( false );
}
-
- getService().addGateway( gateway );
+ if ( !gatewayLoaded )
+ {
+ getService().addGateway( gateway );
+ }
getService().getLogger().logInfo( "SMSServer: added gateway " + i + " / ", null, null );
} catch ( Exception e )
{
@@ -307,6 +314,7 @@
e.printStackTrace();
}
}
+ gatewayLoaded = true;
//</editor-fold>
}
//</editor-fold>
=== modified file 'dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml 2010-04-02 02:37:49 +0000
+++ dhis-mobile/dhis-service-mobile/src/main/resources/META-INF/dhis/beans.xml 2010-04-02 16:31:27 +0000
@@ -7,6 +7,6 @@
<!-- Service definitions -->
<bean id="org.hisp.dhis.mobile.SmsService"
- class="org.hisp.dhis.mobile.SmsService" scope="singleton">
+ class="org.hisp.dhis.mobile.SmsService">
</bean>
</beans>
=== removed file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.gif'
Binary files dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.gif 2009-12-11 10:30:31 +0000 and dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.gif 1970-01-01 00:00:00 +0000 differ
=== added file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.png'
Binary files dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.png 1970-01-01 00:00:00 +0000 and dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/images/intro.png 2010-04-02 16:31:27 +0000 differ
=== modified file 'dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/welcome.vm'
--- dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/welcome.vm 2009-12-11 10:30:31 +0000
+++ dhis-mobile/dhis-web-mobile/src/main/webapp/dhis-web-mobile/welcome.vm 2010-04-02 16:31:27 +0000
@@ -1,2 +1,2 @@
<font face"Arial" color="blue"><h1 align="center">DHIS Mobile</h1></font>
-<div align="center"><img alt="" src="images/intro.gif" /></div>
\ No newline at end of file
+<div align="center"><img height="300px" width="300px" alt="" src="images/intro.png" /></div>
\ No newline at end of file