Skip to content

Commit

Permalink
config xml generator fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdogan committed Apr 17, 2012
1 parent dced9aa commit ecc1cad
Showing 1 changed file with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,14 @@ public String generate(Config config) {
if (m.getMapStoreConfig() != null) {
final MapStoreConfig s = m.getMapStoreConfig();
xml.append("<map-store enabled=\"").append(s.isEnabled()).append("\">");
xml.append("<class-name>").append(s.getClassName()).append("</class-name>");
final String clazz = s.getImplementation() != null ? s.getImplementation().getClass().getName() : s.getClassName();
xml.append("<class-name>").append(clazz).append("</class-name>");
final String factoryClass = s.getFactoryImplementation() != null
? s.getFactoryImplementation().getClass().getName()
: s.getFactoryClassName();
if (factoryClass != null) {
xml.append("<factory-class-name>").append(factoryClass).append("</factory-class-name>");
}
xml.append("<write-delay-seconds>").append(s.getWriteDelaySeconds()).append("</write-delay-seconds>");
appendProperties(xml, s.getProperties());
xml.append("</map-store>");
Expand Down Expand Up @@ -250,7 +257,8 @@ public String generate(Config config) {
xml.append("<entry-listeners>");
for (EntryListenerConfig lc : m.getEntryListenerConfigs()) {
xml.append("<entry-listener include-value=\"").append(lc.isIncludeValue()).append("\" local=\"").append(lc.isLocal()).append("\">");
xml.append(lc.getClassName());
final String clazz = lc.getImplementation() != null ? lc.getImplementation().getClass().getName() : lc.getClassName();
xml.append(clazz);
xml.append("</entry-listener>");
}
xml.append("</entry-listeners>");
Expand All @@ -268,7 +276,8 @@ public String generate(Config config) {
xml.append("<entry-listeners>");
for (EntryListenerConfig lc : mm.getEntryListenerConfigs()) {
xml.append("<entry-listener include-value=\"").append(lc.isIncludeValue()).append("\" local=\"").append(lc.isLocal()).append("\">");
xml.append(lc.getClassName());
final String clazz = lc.getImplementation() != null ? lc.getImplementation().getClass().getName() : lc.getClassName();
xml.append(clazz);
xml.append("</entry-listener>");
}
xml.append("</entry-listeners>");
Expand All @@ -283,7 +292,8 @@ public String generate(Config config) {
xml.append("<message-listeners>");
for (ListenerConfig lc : t.getMessageListenerConfigs()) {
xml.append("<message-listener>");
xml.append(lc.getClassName());
final String clazz = lc.getImplementation() != null ? lc.getImplementation().getClass().getName() : lc.getClassName();
xml.append(clazz);
xml.append("</message-listener>");
}
xml.append("</message-listeners>");
Expand Down Expand Up @@ -312,7 +322,8 @@ public String generate(Config config) {
xml.append("<listeners>");
for (ListenerConfig lc : config.getListenerConfigs()) {
xml.append("<listener>");
xml.append(lc.getClassName());
final String clazz = lc.getImplementation() != null ? lc.getImplementation().getClass().getName() : lc.getClassName();
xml.append(clazz);
xml.append("</listener>");
}
xml.append("</listeners>");
Expand Down

0 comments on commit ecc1cad

Please sign in to comment.