Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Example Use Case

We start out with a simple JSR175 annotation type called DeploymentInfo.

Generate Phase

This generates a DeploymentInfoAnnoBean that implements DeploymentInfo:

Override Phase

Notice that DeploymentInfoAnnoBean has a setter. We're now going to create an AnnoOverrider} which uses that setter to effectively change the size of the cache on {{TinyCacheEJB. We first create an instance of StoredAnnoOverrider, which is a helper class Annogen provides for building simple AnnoOverriders.

StoredAnnoOverrider requires us to make an ElementId} for the {{TinyCacheEJB class:

The StoredAnnoOverrider will provide this DeplyomentInfoAnnoBean as a replacement for the DeploymentInfo annotation on TinyCacheEJB. So, if we change the value of cacheSize on it:

We have changed the value of cache size for TinyCacheEJB as it appears to our framework code.

  • No labels