JNDI でルックアップする代わりに、JackRabbit リポジトリを EJB 3.1 セッション Bean に注入することは可能ですか?
これが現在調べられている方法です
Context ctx = new InitialContext();
repository = (Repository) ctx.lookup("java:jcr/local");
よろしく
JNDI でルックアップする代わりに、JackRabbit リポジトリを EJB 3.1 セッション Bean に注入することは可能ですか?
これが現在調べられている方法です
Context ctx = new InitialContext();
repository = (Repository) ctx.lookup("java:jcr/local");
よろしく
はい、@Resource を使用して注入できます。
@Resource(lookup="java:jcr/local")
private Repository repository;
はい、次のように @Resource アノテーションを使用して注入できます。
private Repository repository;
[...]
@Resource(name="java:/jca/YourRepository")
public void setRepository(Repository repository) {
this.repository = repository;
}