首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > Struts和EJB dipendency注射

Struts和EJB dipendency注射

  • 资源大小:17.83 MB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: struts 注射

资 源 简 介

Struts whith injection ejb Glassfish mappedName is described in: https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html Example Glassfish: ``` /** * * @author Giacomo Stefamo Gabriele */ public class SuperAction extends Action{ @EJB(mappedName="java:global/ProvaStrutsEjb/ProvaStrutsEjb-ejb/SessionBean!sessionbean.SessionBeanLocal") private SessionBeanLocal sessionBean; @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { SuperActionForm sform = (SuperActionForm) form; sform.setMessage(sessionBean.business()); return mapping.findForward("result"); } } ## Example Jboss: ## /** * * @author Giacomo Stefamo Gabriele */ public class SuperAction extends Action{ @EJB private SessionBeanLocal sessionBean; @Override public ActionForward execute(A

文 件 列 表

ProvaStrutsEjb
dist
build
ProvaStrutsEjb-ejb
ProvaStrutsEjb-war
src
lib
nbproject
build.xml

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP