This content has been marked as final. Show 5 replies
1. Incase if you have not seen this link already, heres the link that has all the details for Apache PlugIn Configuration. In nut shell here are the details.
2. Download the latest version of Apache which is 2.2 as of now.
3. Get the latest Apache Plugins for Weblogic Server from Oracle Site. NO, you cannot use the one shipped with wls installation in the folder you mentioned above. WLS/Oracle now has a link to download the modules. Do NOT worry about the patch. The latest plugins has that patch if I am not wrong.
4. The direct link to get the apache plugin modules zip file:
NOTE: Actually you had to go to this link:
Scroll down to Oracle WebLogic Server 10.3 row and click on (+) next to "See all file". The link will appear in the last column under red header. I did view page source and copied the above link for you. Many times we get lost here as this is tricky.
5. Once you have the zip file and apache installed, follow the above first link for detailed instructions.
6. Based on Apache version (2.0 or 2.2 preferably 2.2) you use the appropriate mod_xxx_20.so or mod_xx_22.so file for your OS. Copy those files under modules folder of apache.
7. Add the template provided in the link in httpd.conf file or preferably create weblogic.conf file with your entries. Then refer the weblogic.conf file in httpd.conf file. All the details are in the above link.
8. Refer the docs for additional parameters you can use in general like for Log Files, MatchPattern, prepend etc.
Coming to your Architecture, I see you have 2 Domains:
1. First you have one Domain with Single WL Server. So there is no need for any Apache Web Server Interface or Front end for this. Unless, you want to have WLS inside firewall and Apache outside Firewall. Expose only Apache host:port for outside world. And Apache redirects to internal WLS Server.
2. Other Domain seems to have 2 Managed Servers. You can configure this very easily in httpd or weblogic.conf file using host and port address of each managed server with comma separated. Usually we do not give Admin Server in Apache and also Admin Server is not expected to take any traffic. Most of times in Cluster in Production, Apps are deployed only in Cluster (only managed servers) and not to Admin Server).
IF you mean like you have one Clustered Domain with 1 Admin Server and 2 Managed Servers (managed servers on different or same box do not matter), then simply give the host and port of each MS with comma separated in your .conf file.
Hope this helps
I will get back to you soon after performing the actions that u suggested. Many thanks to you.
About the architecture ...
We log on to the web-application like: http://singleserver_domain1:7001/MoreWeb
And this when hit inturn calls the EJB which is deployed to a Cluster of two managed servers in a different domain D2.
Single server has only web -application that helps us to access the EJB deployed in the cluster with help of the jndi.properties. So, it looks like this single WL server itself acts like a proxy server.
Now, the requirement is, CAN we have an apache server that will proxy the req to that single server which will in turn hit the clusterd EJB servers (M1 and M2)?
Or, in the current architecture, there is actually no need to use an apache as the single server acts like a proxy server?
1. So, All the outside requests are going to the Single Server Domain having MoreWeb app. In tihs scenario, you do NOT need any additional Apache Proxy server. Because the very core concept of Apache Web Server is to route multiple requests across a cluster of managed servers. In your case it is a single server, so you do not need any additional Web Server in the front. Now, you have these EJBs on a different domain which is clustered. I guess you are using standard JNDI Lookup to access these EJBs. So how do you make sure that the requests from MoreWeb app are load balanced for these EJBs. Like every alternative request for the EJBs should go to MS1 and MS2 like in default round robin mode. First request to MoreWeb should access EJB from MS1. Second request to MoreWeb should access EJB from MS2 etc. This means in theory you should have a Apache Web Server in front of the second Domain something like that. Do you have any default weblogic cluster servlet already deployed on second domain. If not either use that or use apache plug in etc. Then in MoreWeb App when you look for the EJBs, make sure that you give the Cluster Address and port instead of direct MS1 or MS2 port/host. This webserver in turn should do the round robin for EJBs on second clustered domain. When you get the InitialContext object instead of using default empty constructor like new InitalContext(), you may need to use some thing like new InitalContext(aMap) where aMap is a HashMap that has properties for provider url, etc etc. You can refer docs for more details. Heres the link for the Clustering EJBs. See the section on EJBs
Hope this helps
Thank you so much.. but I am very little known of this and so many things went above my head.. Please bear with me a little more:
RAVI: I guess you are using standard JNDI Lookup to access these EJBs
ME: Yes .. we connect to the standalone server where MoreWeb is deployed through http.
This uses stanndard jndi to access the EJBs deployed in the cluster in a separate domain.
Here you recommend to give cluster address instead of individual MS1,MS2, right?
RAVI: So how do you make sure that the requests from MoreWeb app are load balanced for these EJBs
ME: Even I dont know.. But tested the cluster, we have seen that failover happens and not sure about load-balancing? Is it happening that the single server of moreweb is acting as the load balancer as well?
3. This means in theory you should have a Apache Web Server in front of the second Domain something like that
ME: okay.. then me being a client should hit the apachehost:port/ or the morewebhost:port/moreweb?
Do you mean that client will hit the MoreWeb single server and this would request that apache server and apache will again forward the request to the EJB clustered servers? I am very confused here.
If so, then the jndi of moreweb would point to the apache server and the http.conf of the apache server will actually point to the cluster adress? Please clear my doubts here regarding the whole flow.
4.Do you have any default weblogic cluster servlet already deployed on second domain. If not either use that or use apache plug in etc?
Did you mean HTTP servlet cluster, I mean to use a weblogic server as a proxy? No, we dont have. In that case we should have an apache before the second domain?
We hit moreweb ---> moreweb connects to apache server through jndi --> apache does failover/loadbalancing and connects to cluster adress to access EJB
Also, we dont need any apache before the single server.
Please please please suggest and be kind as i am really not an expert in this, so may be easier things for you may sound complex for me. please bear
1. YES. Give the Cluster Address when you get InitialContext object for the EJBs using JNDI Lookup.
2. By default your front end single server domain cannot access as a load balancer. Can you paste the EJB JNDI Lookup code snippet that has lines of code to get InitialContext object etc. You mentioned failover happens. Means you stop one managed server with EJBs and still the request from MoreWeb goes to other managed server?. If this is so, there is definetly some sort of load balancer or proxy in front of second domain. Or proxy servlet deployed on second domain.
3. YES. Client will hit the MoreWeb single server and this would request that apache server and apache will again forward the request to the EJB clustered servers. In above second point 2, if the second domain is already having the load balancer then you DO NOT need any apachhe proxy server etc.
Yes, the JNDI lookup will use the Cluster Address for the second domain.
4.YES, I meant the default HttpServlet Cluster where one of the weblogic servers will act as a proxy with this servlet deployed. Just check your second domain to see how many managed servers it is having. As per your original description, it should have one Admin Server , 2 Managed Servers. If you see one extra managed server with one HttpServlet deployed, then that will act as the proxy.
5. YES, the bottom flow is correct incase if you do not have any Cluster as of now in front of the second domain and if there is NO load balancing or failover. If second domain has infact failover and load balancing, then you do not need this bottom picture. If you want to plan Apache for second domain, then the bottom understanding is correct.
We hit moreweb ---> moreweb connects to apache server through jndi for EJB lookups --> apache does failover/loadbalancing and connects to cluster address to access EJBs.