In the web.xml of your war, have the following entry:
来源:互联网 发布:埃及艳后哪个版本 知乎 编辑:程序博客网 时间:2024/06/05 06:51
HTML Tags and JavaScript tutorial
In the web.xml of your war, have the following entry:
In the web.xml of your war, have the following entry:
Code:
<ejb-ref>
<ejb-ref-name>GiveAnyNameByWhichYouWouldLikeToReferTheBeanInYourWebApp</ejb-ref-name>
<ejb-ref-type>session</ejb-ref-type>
<home>packageName.ClassNameOfTheHomeObjectOfTheBeanYouWantToRefer</home>
<remote>packageName.ClassNameOfTheRemoteObjectOfTheBeanYouWantToRefer</remote>
</ejb-ref>
In the jboss-web.xml of your war, have the following entry:
Code:
<ejb-ref>
<ejb-ref-name>GiveAnyNameByWhichYouWouldLikeToReferTheBeanInYourWebApp(This should be same as the one given in the
web.xml above)</ejb-ref-name>
<jndi-name>TheJndiNametoWhichTheBeanIsBound(Example:somecontext/somejndiName)YouWillFindThisJndiNameInTheJboss.
xmlOfTheEJB</jndi-name>
</ejb-ref>
For more info, have a look at the dtds of web.xml :
http://java.sun.com/dtd/web-app_2_3.dtd
and jboss-web.xml:
http://www.jboss.org/j2ee/dtd
In your code, do the lookup as:
Code:
Context ic = new InitialContext();
Object ejbHome = ic.lookup("java:comp/env/TheNameThatYouHadGivenInTheEJB-REF-NAMETagOfJbossWeb.xmlAbove");
Here's an example:
web.xml:
Code:
<ejb-ref>
<ejb-ref-name>MyTestBean</ejb-ref-name>
<ejb-ref-type>session</ejb-ref-type>
<home>com.test.ejb.MyBeanHome</home>
<remote>com.test.ejb.MyBeanRemote</remote>
</ejb-ref>
jboss-web.xml:
Code:
<ejb-ref>
<ejb-ref-name>MyTestBean</ejb-ref-name>
<jndi-name>myejb/test/MyTestBean</jndi-name>
</ejb-ref>
Lookup code:
Code:
Context ic = new InitialContext();
Object ejbHome = ic.lookup("java:comp/env/MyTestBean");
- In the web.xml of your war, have the following entry:
- 053-14 You have a very large table that your users access frequently. Which of the following advisor
- 23.Note the following structures in your database server:
- The String class is provided in the Java library. Provide your own implementation for the following
- gradle build提示You have not accepted the license agreements of the following SDK components
- 编译ionic时出错:You have not accepted the license agreements of the following SDK components
- You have not accepted the license agreements of the following SDK components的解决方案
- You have not accepted the license agreements of the following SDK components: XXX
- The following URL schemes found in your app are not in the correct format 解决方案
- Fixing "The following VMware kernal modules have been found on your system that were not installed by the VMware installer."
- Fixing "The following VMware kernal modules have been found on your system that were not installed by the VMware installer."
- The following packages have unmet dependencies:
- The following packages have unmet dependencies
- The following packages have been kept back:
- the following packages have unmet dependencies
- We are unable to complete the review of your app since one or more of your In App Purchases have not
- java web error:Choose unique values for the 'webAppRootKey' context-param in your web.xml files
- java web error:Choose unique values for the 'webAppRootKey' context-param in your web.xml files
- Janus Web/ASP.NET Server Controls v3(3.5.0.35) for VS2005
- A* 算法之误区
- 带参数的构造函数.cpp
- IT专业学生求职简历宝典(Leo谈谈写简历)
- 从《读库》关于“报人”文章感叹今日技术媒体
- In the web.xml of your war, have the following entry:
- 应用API函数在用户窗体中画圆
- 指针
- WebBrowser 类
- 浅谈软件度量
- 男人的正确洁面方式
- OpenGL教程之ZEUS教程第一课:什么是OpenGL
- 如何循序渐进向DotNet架构师发展
- SQL*PLUS命令的使用