I am a Java developer and I am pretty new in web application development using Java and I have the following doubts.
We are developing web app deployed on Oracle WebLogic Server.
What exactly is the weblogic domains? From what I understand each application use a definied domain. But what it exactly does?
From Oracle documentation:
A domain is the basic administrative unit of WebLogic Server. It
consists of one or more WebLogic Server instances, and logically
related resources and services that are managed, collectively, as one
unit.
So it's an administrative container, you should think of the following: 1 domain equals 1 Administration Server.
The Administration Server:
A domain includes one WebLogic Server instance that is configured as
an administration server. All changes to configuration and deployment
of applications are done through the administration server.
The administration server provides a central point for managing the
domain and providing access to the WebLogic Server administration
tools. These tools include the following:
WebLogic Server Administration Console: Graphical user interface to the administration server.
WebLogic Server Node Manager: A Java program that enables you to start and stop server instances—both administration servers and
managed servers—remotely, and to monitor and automatically restart
them after an unexpected failure.
Note that the node manager is installed on all the machines that host any server instance – both administration server and managed
servers.
A WebLogic Domain is a concept that represents an environment.
A Domain includes an Administration Server, and 1 or more Managed Servers
Managed Servers are basically Java servers running on the physical machine or VM, which can each contain 1 or more Managed Servers.
Managed Servers can be organized into Clusters
A Domain also contains Resources, such as database connections pools, which can be used by Applications.
Applications and Resources are deployed on to specific Managed Servers or Cluster(s) (a Resource should be deployed on the same Managed Server or Cluster as the Application that needs it)
A Domain usually contains multiple applications.
Clusters abstract the Managed Servers as a group, so it's easy to scale an Application deployment by adding Managed Servers to a Cluster.
Multiple Clusters in the same Domain can help segregate Applications and Resources according to their usage requirements.
Dynamic Clusters include rules for scaling the number of Managed Servers in and out according to specific metrics.
Furthermore:
There is 1 Admin Server per Domain. Usually there is 1 Domain per group of machines running Managed Servers in the Domain.
While the Admin Server manages what is deployed where, another service, the Node Manager, runs on each physical machine or VM to manage the life-cycle of the Managed Server (start, stop, health check) and reports to the Admin Server.
This link from oracle docs has precisely defined weblogic domain.It has detailed the various ways of dividing your application may be logically,physically or based on size.Specifically below sections from the link might answer your question
What Is a Domain?
Organizing Domains
https://docs.oracle.com/cd/E13222_01/wls/docs103/domain_config/understand_domains.html
I found the below link useful as well:
http://middlewaremagic.com/weblogic/?p=1914
Related
I have coded a Spring MVC Hibernate application with RabbitMQ as a messaging server & a MySQL DB. I have also used Hazelcast an in-memory distributed cache to centralize the state of the application, moving the local tomcat session to a centralized session & implementing distributed locks.
The app right now is hosted on a single tomcat server in my local system.
I want to test my application on a multiple JVM node environment i'e app running on multiple tomcat servers.
What would be the best approach to test the app.
Few things that come to my mind
A. Install & configure a load balancer & set up a tomcat cluster in my local system. This I believe is a tedious task & requires much effort.
B. Host the application on a PAAS like OpenShift, cloudfoundry but I am not sure if I will be able to test my application on several nodes.
C. Any other way to simulate a clustered environment on my local windows system?
I would suggest first you should understand your application requirement. For the real production/live environment, are you going to use Infrastructure as a service or PAAS.
If Infrastructure as a service then
I would suggest create local cluster environment and use the tomcat and spring application sticky session concept. Persist the session in Hazelcast or redis server installed on different node. Configure load balancer for multiple nodes having tomcat server. 2-3 VMs for testing purpose would be suitable.
If requirement is PAAS then
Don't think about local environment. Test directly on OpenShift or AWS free account and trust me you would be able to test on PAAS if all setup is fine.
I'm currently having 2 Weblogic admin servers in 2 different domains created on the same machine.
I want to convert one of the admin server to a managed server and then use them together to deploy a Java application. Is this feasible? If yes, how?
I'm currently using Weblogic Server 10.3.
PS: I'm quite new to Weblogic domain creation and administration. Please revert for any more details needed.
The simple answer is no, however, adding a managed server to a domain is extremely simple. See the documentation here. When deploying your application you'll need to target both servers or create a cluster (also very easy), add both machines to it and give the cluster name as the target.
Note, it is generally not concidered best practice to target applications to the Admin server (although it's fine when you're developing on your local machine). If you have the resources available on your environment, you could create two managed servers and put them in a cluster. Depending on the configuration of your Admin server, you may be able to reduce it's size if memory is tight.
After fighting passwords on Glassfish 4.x remotely on Ubuntu 14.04 Tahr, I'm ready to proceed to installing my first remote EJB module -- just want make sure I'm on the right path. Going from the Netbeans example Creating and Running an Application Client on the GlassFish Server, How would I make a client for the EJB module which is deployed remotely?
The Netbeans example assumes that Glassfish is running on the localhost. The exact mechanics are unclear to me, as it's not explicitly configured for localhost. Presumably it's implicitly configured for localhost...
I would like to use the ACC to connect to, not a local, but rather a remote Glassfish server. For context, the ACC is:
Introducing the Application Client Container
The Application Client Container (ACC) includes a set of Java classes,
libraries, and other files that are required for and distributed with
Java client programs that execute in their own Java Virtual Machine
(JVM). The ACC manages the execution of Java EE application client
components (application clients), which are used to access a variety
of Java EE services (such as JMS resources, EJB components, web
services, security, and so on.) from a JVM outside the Oracle
GlassFish Server. The ACC communicates with the GlassFish Server using
RMI-IIOP protocol and manages the details of RMI-IIOP communication
using the client ORB that is bundled with it. Compared to other Java
EE containers, the ACC is lightweight. For information about debugging
application clients, see Application Client Debugging.
GlassFish Server Open Source Edition Application Development Guide Release 4.0
see also:
https://stackoverflow.com/questions/25830149/how-to-package-a-stand-alone-remote-ejb-application-client
From a client application, how does the ACC remotely invoke the EJB module?
There must be a configuration. Does the ACC pick this up from jndi.properties? I can't find much documentation or examples on ACC usage. If the ACC is unsuitable, then, of course, I'll use a different approach. Presumably there's a way to specify a remote Glassfish server for the ACC.
How do you intend to deploy your application?
In my days when i use to develop application clients for the ACC, i used to bundle everything in an EAR (I will still do that, cause it is easier).
Glassfish deploys the artifacts, generates required configurations (You can override configurations in application.xml anyway).
One thing that the ACC takes care is the CORBA properties needed for remote connection.
When you download the client jar from the glassfish admin, you download a java webstart application, that downloads all required libraries as appropriate and a configuration is automatically set from which host (paramount that you set glassfish domain host properly, or this will be an internal IP or localhost) it was downloaded from.
I have several applications running under Tomcat and some applications running on WebLogic. I need to bring them all together under a single domain and also share the static resources among all applications.
I am thinking of using the Apache web server as a front controller and use the WebLogic proxy plugin to route requests to applications running on WebLogic and Tomcat plugin to route requests to applications running on Tomcat.
Is there any disadvantage to this approach? Or is there any other better solution?
I'd :
put shared resources to a predefined NFS, defined in & accessed from both app servers
set caching on and serve static content from apache
distribute applications among physical servers based on their memory and cpu requirements
I have been reading countless oracle documents, blogs, etc. but I cannot wrap my mind around this concept.
I have successfully deployed an application to a GlassFish server cluster. See screenshot:
I would like to have load balancing and fail over by using a single url address to access my application.
For example currently to get to my application I must use http://<server-name>:28080/AppName but I would like to use http://cluster:28080/AppName and have an available load balancing service automatically select it.
Currently I have 3 GlassFish 3.1 servers with a basic default setup and GMS. Is GlassFish capable of doing the automatic load balancing and fail over or do I need a web server (like Apache or Oracle IPlanet) in front of my GlassFish cluster to distribute connections?
As Olivier states you need to put a load balancer in front of your cluster. You can use a hardware device or you can use software.
I've used both and each works great. You should read Configuring Web Servers for HTTP Load Balancing for a better understanding.
You need a front-end load balancer (software or hardware).