Dynamic DAO Implementation

Note: this feature is not standard

OpenEBJ support EJB annotations on interfaces (in particular @Stateless and @Singleton).

The interface has to be annotated with @PersistenceContext to define which EntityManager to use.

Methods should respect these conventions:

Dynamic finder can have as much as you want field constraints. For String like is used and for other type equals is used. See UserDao for an example and DynamicUserDaoTest for an usage example.

Download

Download as zip

Files

APIs

${apis}

Java files

${javas}

Resource files

${resources}

APIs Used

Source

svn co http://svn.apache.org/repos/asf/openejb//examples/dynamic-dao-implementation
cd dynamic-dao-implementation
mvn clean install