concept instance in category jboss

This is an excerpt from Manning's book JBoss in Action: Configuring the JBoss Application Server.
An instance of JBoss AS can host multiple web applications. What if you have an application configuration that you want to apply to all the web applications running in your server? You could duplicate the configuration in each application’s configuration files, but JBoss Web Server provides global configuration files that allow you to avoid this duplication. A global configuration file is one whose contents apply to all the applications in the server. For example, having a global web.xml file is the same as repeating the configuration in that file in each individual web application’s web.xml file. We put a particular configuration element in a global configuration file when we know that the element applies to all the web applications.
The portlet-instances.xml file, shown in listing 10.12, describes instances of the port-let. In this case, no instances are declared. You can omit this file and the portlet still deploys.
Listing 10.14. Declaring an instance in portlet-instances.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <deployments> <deployment> <instance> <instance-id>ImagePortletInstance</instance-id> <portlet-ref>ImagePortlet</portlet-ref> </instance> </deployment> </deployments>The name of the instance created is ImagePortletInstance, which is an instance of the portlet named ImagePortlet. The <portlet-ref> node must match the <portlet-name> node in the portlet.xml file. The instance name must be unique among all portlet instances. The name can contain any characters including special characters and spaces.