The following built-in types are supported for @Resource injection in EJBs via elements in a META-INF/ejb-jar.xml or via plain properties in a META-INF/ file.

EJB 3.0 required types:

OpenEJB 3.0 additional types:

To use an OpenEJB additional type in xml, simply declare it as java.lang.String and it will be converted on the fly to the field/setter type used by the bean class. For example:


import java.util.Date;

public class MyBean {

    private Date myDate;

Works with an ejb-jar.xml as follows:

<ejb-jar xmlns="" version="3.0"

Or with an file as follows: = 2008-04-19