...
Declaration in Config DDL
@AppInjectionPoint
public
void
initialize(AepEngine engine) {
// for messaging
<
app
Code Block | ||
---|---|---|
| ||
<app name="processor" |
mainClass="com.sample.Application"> |
<
messaging
>
<
factories
>
<
factory
<messaging> <factories> <factory name="com.sample.messages.MessageFactory"/> |
</
factories
>
</
messaging
>
<
storage
enabled
=
"true"
>
<
factories
>
<
factory
name
=
"com.sample.state.StateFactory"
/>
</
factories
>
</
storage
>
</
app
>
Programmatic Registration
</factories>
</messaging>
</app> |
Programmatic Registration
Code Block | ||
---|---|---|
| ||
@AppInjectionPoint public void initialize(AepEngine engine) { // for messaging engine.registerFactory(new |
com.sample.messages.MessageFactory()); |
} |
Enable Storage
To actually achieve high availability storage must be configured for the application. The primary means of storage is for Talon apps is through clustered replication to a backup instance. Talon also logs state changes to a disk based transaction log as a fallback mechanism. Storage and persistence can be enabled in the application's configuration xml.
...