2

Is it possible to set a virtual host in WebLogic only ?

In my development machine, I have a WebLogic instance with two servers, listening to ports 7002 and 7003; the deployed application contains EJBs and MDBs.

I want to point a Java client outside of the container to a single url, which I know will be served by the cluster, instead of pointing the class to a direct server. This java client will talk to EJBs and JMS queues in the cluster.

Most of the Google searches with the terms weblogic and "virtual host" give me answers involving Apache. Now, correct me if I'm wrong but I understand that the apache server works with HTTP. The cluster being weblogic, the protocol for the ejb will be T3; if it were JBoss, the protocol would be jnp.

So here are the questions:

  • Is it possible to set a virtual host with WebLogic ?
  • If so, do I need Apache server to do the virtual host ?
  • Is this the solution to the wrong problem ? All I need is for the cluster to answer to a single URL. Is there any other solution than virutal hosts ? Is it simpler ?

Also, this is on a Windows machine.

4

2 回答 2

2

我所需要的只是让集群回答单个 URL。除了虚拟主机还有其他解决方案吗?是不是更简单?

是的,只需在您的 JNDI 环境设置中声明一个“集群 URL”:

java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://host1:7002,host2:7003
java.naming.security.principal=
java.naming.security.credentials=

Apache 插件、虚拟主机等是 HTTP 的东西,与 EJB 或 JMS 客户端无关。

于 2010-03-07T20:40:17.840 回答
1
  1. 是的,您可以在您的 weblogic 服务器中设置虚拟主机。

  2. 我们需要编辑的第一个文件是 Apache httpd.conf 文件。例如,我的在此处:C:\Program Files\Apache Group\Apache\conf\httpd.conf o 在文本编辑器中 httpd.conf 文件的最底部。这意味着需要 Apache。

  3. 是的,使用 apache 设置虚拟主机将解决您的问题。

于 2010-09-17T11:25:59.997 回答