views:

333

answers:

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.

+1  A: 

All I need is for the cluster to answer to a single URL. Is there any other solution than virutal hosts ? Is it simpler ?

Yes, simply declare a "cluster URL" in your JNDI environment settings:

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

The Apache plugin, virtual hosts, etc are HTTP things and have nothing to do with EJB or JMS clients.

Pascal Thivent
Ah! what do you know, it works !! Merci beaucoup !
Leonel
@Leonel De nada! :)
Pascal Thivent
A: 

Hellos,

You have asked 3 questions. Answers to them are .

  1. Yes you can set up a virtual host in ur weblogic server.

  2. The first file we'll need to edit is the Apache httpd.conf file. For example, mine is here: C:\Program Files\Apache Group\Apache\conf\httpd.conf o to the very bottom of your httpd.conf file in your text editor. It means that Apache is required.

  3. Yes Setting up a virtual host with apache will solve ur problem.

Regards Kapil Khanna Sr Weblogic Admin.

Kapil KHanna