See Debu's blog entry for more details:
http://debupanda.blogspot.com/2007/06/injecting-pojos-and-using-resource.html
In the end I was forced into using regular JNDI lookup as follows from JDeveloper 10.1.3.1 / OC4J 10.1.3.1 from a Struts Action class:
HttpSession session = request.getSession();
ResultPager bean = (ResultPager) session.getAttribute("pagerbean");
if (bean == null)
{
try
{
Context ctx = new InitialContext();
bean = (ResultPager) ctx.lookup("ResultPager");
bean.init(_pageSize, "AllObjectsRo.countAll", "AllObjectsRo.findAll");
session.setAttribute("pagerbean", bean);
}
catch (NamingException ex)
{
throw new ServletException(ex);
}
}
No comments:
Post a Comment