Frequently Asked Questions

Do I need a database to use Elmo?

Elmo can use any Sesame repository that may or may not need a database. The two repositories used in this user guide, NativeStore and MemoryStore, do not use a database. Other repositories that use a backing database may scale better under higher volume or load.

Are there any alternatives to creating my own concepts?

The generator module can facilitate creating your own concepts, but Elmo also includes support for DynaBeans that allow accessing predicates by their local name, without using a concept interface.

How can I remove a concept from a entity?

Use the method removeDesignation on the manager to remove a concept from an entity.

Why aren't Entities serializable?

Entitys keep their state in the repository and cannot be serialized in isolation. However, their QName can be serialized, and the entire repository can also be serialized.

I already have existing JavaBeans; can they be moved into an Elmo entity pool?

Elmo concepts must first be created, see the Section called Compiling and Decompiling and Ontologies. Since Elmo concepts can be annotated Java interfaces or classes, a existing domain model could also be adapted to act as Elmo concepts, by adding annotations (or adding concepts and properties files), this would allow the same model to work in both Elmo and other entity pools.

How can I have two implementations of the same method?

When two behaviours implement the same method and are being integrated into the same class, Elmo chains the methods together calling one after another in no particular order until a value is returned or all methods have been called. See the Section called Chain of Responsibility for more information.

What happens when two concepts having the same property name are applied to the same subject?

If the property types are the same, both setter methods will be called when the property is set and only one will be retrieved when the property is read. If the property types are not the same an exception is thrown when the concepts are combined.

How can I implement cross cutting concerns in Elmo?

Elmo supports interceptors that can be matched to some or all methods implemented by any role. Through this, cross cutting concerns like logging and security can be implemented in an Elmo entity pool.

How do I trigger events before and after a property change?

By using interceptors to wrap a method invocation, events can be triggered before and after a method call. Elmo also provides the PropertyChangeListener stated in the Section called Observer.

How should Entities be managed in a J2EE environment?

On servlet initialization, the repository and manager factory should be initialized. For each request a new ElmoManager should be created and its Entitys can only be used within the request they were created with. The manager should be closed after the request is complete. The manager factory should be closed when the servlet is destroyed.

How can I implement an audit log with Elmo?

Create an interceptor to log the operations of every type and every method.

How do I setup a security domain over sensitive data?

Elmo supports data contexts. In the Section called Context Specific Data it was shown how property values can be stored within a context. This can be used to separate security domains.