简体   繁体   English

在Jboss 4.2.3中部署了EJB3。 我们如何访问它?

[英]Deployed EJB3 in Jboss 4.2.3. How do we access it?

I deployed my EJB3 in Jboss 4.2.3. 我在Jboss 4.2.3中部署了EJB3。 How do I access it now ? 我现在如何访问它? I don't see any JNDI names or anything displayed in the console. 我没有在控制台中看到任何JNDI名称或任何内容。 Below is the stacktrace of EJB deployment. 下面是EJB部署的堆栈跟踪。

How do I write a client to access the method in ExtractorDAOImpl ? 如何编写客户端以访问ExtractorDAOImpl中的方法?

15:38:48,535 INFO [EARDeployer] Init J2EE application: file:/C:/ejbtest/jboss-4.2.3.GA/server/default/deploy/mytestejb.ear 15:38:48,804 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer 15:38:48,811 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=mytestejb.ear,jar=mytestejb-ejb-1.0-SNAPSHOT.jar,name=ExtractorDAOImpl,service=EJB3 with dependencies: 15:38:48,848 INFO [EJBContainer] STARTED EJB: com.myorg.mytestejb.dao.ExtractorDAOImpl ejbName: ExtractorDAOImpl 15:38:48,889 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer 15:38:48,889 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=mytestejb.ear,jar=mytestejb-ejb-1.0-SNAPSHOT.jar,name=Extractor,service=EJB3 with dependencies: 15:38:48,899 INFO [EJBContainer] STARTED EJB: com.myorg.mytestejb.Extractor ejbName: Extractor 15:38:48,938 INFO [EJB3Deployer] Deployed: file:/C:/ejbtest/jboss-4.2.3.GA/server/default/tmp/deploy/tmp19095mytestejb.ear-contents/mytestejb-ejb-1.0-SNAPSHOT.jar 15:38:48,946 INFO [EARDeployer] Started J2EE application: file:/C:/ejbtest/jboss-4.2.3.GA/server/default/deploy/mytestejb.ear

I don't see any JNDI names or anything displayed in the console 我没有看到任何JNDI名称或控制台中显示的任何内容

At [myServer]:8080/jmx-console/ 在[myServer]:8080 / jmx-console /

1) go to "service=JNDIView". 1)转到“服务= JNDIView”。

2) invoke the MBean operation: java.lang.String list() 2)调用MBean操作:java.lang.String list()

3) it will show you the Global JNDI Namespace tree, where you can see the JNDI entries associated to your ejbs. 3)它会向您显示“全局JNDI命名空间”树,您可以在其中看到与ejb关联的JNDI条目。

You will see something like this: 您将看到如下内容:

+- EarName | +-耳名| +- myEjbName | +-myEjbName | +- local +-本地

For this example the JNDI name used to lookup the local interface is "EarName/myEjbName/local" 对于此示例,用于查找本地接口的JNDI名称为“ EarName / myEjbName / local”

JBoss 4.2.x has a JMX management web interface (jmx-console) which can list all the deployed EJBs and their JNDI names. JBoss 4.2.x具有一个JMX管理Web界面(jmx-console),该界面可以列出所有已部署的EJB及其JNDI名称。

In any case, the standard name pattern for JBoss versions below JBoss 6 is like 无论如何,JBoss 6以下的JBoss版本的标准名称模式就像

EARNAME/EJB-NAME/{local,remote} EARNAME / EJB-NAME / {本地,远程}

So in your case it might be: 因此,在您的情况下,可能是:

mytestejb/ExtractorDAOImpl/local mytestejb / ExtractorDAOImpl /本地

I'm not too sure about the EJB name here, you'd have to post some code to show how you created and configured it and what interfaces you gave it. 我不太确定这里的EJB名称,您必须发布一些代码来显示如何创建和配置它以及为它提供什么接口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM