instrucciones cluster jboss

18
Documento de Configuración Jboss Cluster Información del documento Nombre del Proyecto: YZA Gerente de Proyecto: Adriana Rodríguez No. de Versión del documento: 1 Fase : Soporte Fecha de Versión del documento: 29/MRZ/2011 Preparado por: Adriana Abigail Rodríguez Guerrero Tema: Configuración Jboss en Cluster Fecha de revisión: 29/MRZ/2011 OBJETIVO El objetivo del presente documento es documentar los cambios requeridos para configurar jboss en formato Cluster para que se puedan administrar varios VLS’s a través de una sola publicación. CONFIGURACIÓN Para iniciar esta configuración es necesario tener instalado Versata. 1. Realizar deploy al VLS del repositorio. 2. Setting Versata configuration properties for a single cluster on a network C:\Versata\VLS-5.6-JBoss\Client\lib To set up JBoss clustering, you need to set the following properties in the VERSATA_HOME\Client\lib\VFCResource.properties file: providerURL=<comma separated values of hostname>:<HA JNDI port for all the nodes in partition> (for example, host-1:1100,host-2:1100,host-3:1100 The providerURL also could be left empty to use the auto-discovery feature provided by JBoss through multicast. Host=localhost #---- Servlet Session Tracking ----- # Controls how the servlet tracks sessions. One of: # versata.vfc.html.servlet.SessionTrackingHTTP # versata.vfc.html.servlet.SessionTrackingInternal ServletSessionTrackingClassName=versata.vfc.html.servlet.SessionTrackingHTTP # Used to control how often (in seconds) the servlet cleans out timed out sessions # when SessionInternalTracking is used ServletSessionSweepRate=600 1

Upload: adriana-a-rodriguez-g

Post on 15-Oct-2014

168 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

Informacioacuten del documento

Nombre del Proyecto YZA

Gerente de Proyecto Adriana Rodriacuteguez No de Versioacuten del documento

1

Fase Soporte Fecha de Versioacuten del documento

29MRZ2011

Preparado por Adriana Abigail Rodriacuteguez Guerrero

Tema Configuracioacuten Jboss en Cluster Fecha de revisioacuten 29MRZ2011

OBJETIVOEl objetivo del presente documento es documentar los cambios requeridos para configurar jboss en formato Cluster para que se puedan administrar varios VLSrsquos a traveacutes de una sola publicacioacuten

CONFIGURACIOacuteN

Para iniciar esta configuracioacuten es necesario tener instalado Versata

1 Realizar deploy al VLS del repositorio

2 Setting Versata configuration properties for a single cluster on a networkCVersataVLS-56-JBossClientlibTo set up JBoss clustering you need to set the following properties in the VERSATA_HOMEClientlibVFCResourceproperties file1048708 providerURL=ltcomma separated values of hostnamegtltHA JNDI port for all the nodes in partitiongt (for example host-11100host-21100host-31100

The providerURL also could be left empty to use the auto-discovery feature provided by JBoss through multicast

Host=localhost---- Servlet Session Tracking ----- Controls how the servlet tracks sessions One of versatavfchtmlservletSessionTrackingHTTP versatavfchtmlservletSessionTrackingInternalServletSessionTrackingClassName=versatavfchtmlservletSessionTrackingHTTP

Used to control how often (in seconds) the servlet cleans out timed out sessions when SessionInternalTracking is usedServletSessionSweepRate=600

xdaAppServerConnectorClassName=versatavfcXDAEJBConnectorxdaConnectorClassName=versatavfchtmlcommonXDAPLSEJBConnectorSessionHomeName=VLSContextHomeplsContextHomeName=PLSContextHomeAdminHomeName=VLSContextHomeUserTransactionHomeName=jtausertransactionUserTransactionHomeName=javacompUserTransactionPort=1099lookAndFeel=comsunjavaswingplafwindowsWindowsLookAndFeel

1

Documento de ConfiguracioacutenJboss Cluster

nameService=orgjnpinterfacesNamingContextFactory

Clients which use AutoDiscover feature for accessing clustered applications shall keep providerURL=ltblankgtproviderURL=19216812391099 19216812401099

jnpdiscoveryGroup and jnpdiscoveryPort should be be set appropriately for accessing clustered applications using AutoDiscover featurejnpdiscoveryGroup=230004jnpdiscoveryPort=1102

javanamingauthoritative=truecomibmwebspherenamingjndicachecacheobject=none

The default JNDI name of the VLS bean is ltRepository NamegtVLSContextHome If you change the default name then set the JNDI name using below variable to override the default name VLSJNDIName=

3 Realizar la publicacioacuten del repositorio colocar en Server Location 2300041102

al teacutermino bajar los servicios

4 Required container configuration changes for enterprise bean clustering

In order to cluster enterprise beans you need to modify settings in their EJB descriptor (jbossxml) files

2

Documento de ConfiguracioacutenJboss Cluster

CVersataVLS-56-JBossConfigserverdefaultdeployMercaderiaearMercaderiajarMETA-INFjbossxml

Container configuration changes for stateless session beansWhen stateless session beans are clustered no state is involved so calls can be load balanced on any participating node meaning any cluster node that has this specific bean deployed To cluster a stateless session bean you need to modify its jbossxml descriptor to contain a ltclusteredgt tag The file is located in ltejbjargtMETA-INF

Figure 4 Settings for entity bean clustering

ltxml version=10 encoding=UTF-8 gtltDOCTYPE jboss PUBLIC -JBossDTD JBOSS 32EN httpwwwjbossorgj2eedtdjboss_3_2dtdgt ltjbossgt ltsecuregtfalseltsecuregt ltenterprise-beansgt ltsessiongt ltejb-namegtVLSUtilltejb-namegt ltjndi-namegtMercaderiaVLSUtilltjndi-namegt ltclusteredgttrueltclusteredgt

ltcluster-configgtltpartition-namegtDefaultPartitionltpartition-namegtlthome-load-balance-policygtorgjbosshaframeworkinterfacesRoundRobinlthome-load-balance-

policygtltbean-load-balance-policygtorgjbosshaframeworkinterfacesRoundRobinltbean-load-balance-

policygt ltcluster-configgt

ltsessiongt ltentitygt ltejb-namegtmetodos_norandltejb-namegt ltjndi-namegtMercaderiametodos_norandltjndi-namegt ltentitygt ltentitygt ltejb-namegtpv_cajerosltejb-namegt ltjndi-namegtMercaderiapv_cajerosltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_orden_compraltejb-namegt ltjndi-namegtMercaderiaenca_orden_compraltjndi-namegt ltentitygt ltsessiongt ltejb-namegtQ_Gastos_Transf_Internaltejb-namegt ltjndi-namegtMercaderiaQ_Gastos_Transf_Internaltjndi-namegt ltclusteredgttrueltclusteredgt ltsessiongt

3

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCP_CHEQUEltejb-namegt ltjndi-namegtMercaderiaCP_CHEQUEltjndi-namegt ltentitygt ltentitygt ltejb-namegtelasticidadltejb-namegt ltjndi-namegtMercaderiaelasticidadltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticuloltejb-namegt ltjndi-namegtMercaderiaarticuloltjndi-namegt ltentitygt ltentitygt ltejb-namegtmetodos_tempoltejb-namegt ltjndi-namegtMercaderiametodos_tempoltjndi-namegt ltentitygt ltentitygt ltejb-namegtmapa_ubicacionesltejb-namegt ltjndi-namegtMercaderiamapa_ubicacionesltjndi-namegt ltentitygt ltentitygt ltejb-namegtpv_det_prepedidoltejb-namegt ltjndi-namegtMercaderiapv_det_prepedidoltjndi-namegt ltentitygt ltentitygt ltejb-namegtCC_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCC_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprecio_arti_sucltejb-namegt ltjndi-namegtMercaderiaprecio_arti_sucltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_SALDOS_BENEFltejb-namegt ltjndi-namegtMercaderiaCT_SALDOS_BENEFltjndi-namegt ltentitygt ltentitygt ltejb-namegtgp_inv_fisicoltejb-namegt ltjndi-namegtMercaderiagp_inv_fisicoltjndi-namegt ltentitygt ltentitygt ltejb-namegtReportesRemoteltejb-namegt ltjndi-namegtMercaderiaReportesRemoteltjndi-namegt ltentitygt ltentitygt ltejb-namegtcp_nivel_auorizaltejb-namegt ltjndi-namegtMercaderiacp_nivel_auorizaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MAYOR_GENERALltejb-namegt ltjndi-namegtMercaderiaCT_MAYOR_GENERALltjndi-namegt ltentitygt ltentitygt ltejb-namegtcen_x_impltejb-namegt ltjndi-namegtMercaderiacen_x_impltjndi-namegt ltentitygt ltentitygt ltejb-namegtDet_trans_externaltejb-namegt

4

Documento de ConfiguracioacutenJboss Cluster

ltjndi-namegtMercaderiaDet_trans_externaltjndi-namegt ltentitygt ltentitygt ltejb-namegtRRemotoltejb-namegt ltjndi-namegtMercaderiaRRemotoltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_farmacialtejb-namegt ltjndi-namegtMercaderialayout_farmacialtjndi-namegt ltentitygt ltentitygt ltejb-namegtsucursalltejb-namegt ltjndi-namegtMercaderiasucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MOVTO_CONTABLEltejb-namegt ltjndi-namegtMercaderiaCT_MOVTO_CONTABLEltjndi-namegt ltentitygt ltentitygt ltejb-namegtEnc_transfer_extltejb-namegt ltjndi-namegtMercaderiaEnc_transfer_extltjndi-namegt ltentitygt ltentitygt ltejb-namegtdetalle_capturaltejb-namegt ltjndi-namegtMercaderiadetalle_capturaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCP_ORD_PAG_SIN_FACltejb-namegt ltjndi-namegtMercaderiaCP_ORD_PAG_SIN_FACltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_proveedorltejb-namegt ltjndi-namegtMercaderialayout_proveedorltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticulo_sucursalltejb-namegt ltjndi-namegtMercaderiaarticulo_sucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtGtos_trans_internaltejb-namegt ltjndi-namegtMercaderiaGtos_trans_internaltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_cambio_preciltejb-namegt ltjndi-namegtMercaderiaenca_cambio_preciltjndi-namegt ltentitygt ltentitygt ltejb-namegtTE_PROCESOSltejb-namegt ltjndi-namegtMercaderiaTE_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCT_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprocesosltejb-namegt ltjndi-namegtMercaderiaprocesosltjndi-namegt ltentitygt

5

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCT_PERIODO_CONTltejb-namegt ltjndi-namegtMercaderiaCT_PERIODO_CONTltjndi-namegt ltentitygt ltentitygt ltejb-namegtrecep_exceedltejb-namegt ltjndi-namegtMercaderiarecep_exceedltjndi-namegt ltentitygt ltenterprise-beansgt ltjbossgt

In the stateless session bean configuration only the ltclusteredgt tag is mandatory All other elements are the same as in the entity bean configuration

6

Documento de ConfiguracioacutenJboss Cluster

5 Defining JBoss cluster settings for a single cluster on a networkA cluster-servicexml file in the VERSATA_HOMEConfigserveralldeploy folder contains settings for a default JBoss cluster partition By default a JBoss instance started in the all mode becomes a member of this partition The orgjbosshaframeworkserverClusterPartition MBean defines the cluster partition The following figure illustrates the sample configuration

CVersataVLS-56-JBossConfigserveralldeploycluster-servicexml

ltxml version=10 encoding=UTF-8gt

lt-- ===================================================================== --gtlt-- --gtlt-- Sample Clustering Service Configuration --gtlt-- --gtlt-- ===================================================================== --gt

ltservergt

ltclasspath codebase=lib archives=jbosshajargt

lt-- ==================================================================== --gt lt-- Cluster Partition defines cluster --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshaframeworkserverClusterPartition

7

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 2: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

nameService=orgjnpinterfacesNamingContextFactory

Clients which use AutoDiscover feature for accessing clustered applications shall keep providerURL=ltblankgtproviderURL=19216812391099 19216812401099

jnpdiscoveryGroup and jnpdiscoveryPort should be be set appropriately for accessing clustered applications using AutoDiscover featurejnpdiscoveryGroup=230004jnpdiscoveryPort=1102

javanamingauthoritative=truecomibmwebspherenamingjndicachecacheobject=none

The default JNDI name of the VLS bean is ltRepository NamegtVLSContextHome If you change the default name then set the JNDI name using below variable to override the default name VLSJNDIName=

3 Realizar la publicacioacuten del repositorio colocar en Server Location 2300041102

al teacutermino bajar los servicios

4 Required container configuration changes for enterprise bean clustering

In order to cluster enterprise beans you need to modify settings in their EJB descriptor (jbossxml) files

2

Documento de ConfiguracioacutenJboss Cluster

CVersataVLS-56-JBossConfigserverdefaultdeployMercaderiaearMercaderiajarMETA-INFjbossxml

Container configuration changes for stateless session beansWhen stateless session beans are clustered no state is involved so calls can be load balanced on any participating node meaning any cluster node that has this specific bean deployed To cluster a stateless session bean you need to modify its jbossxml descriptor to contain a ltclusteredgt tag The file is located in ltejbjargtMETA-INF

Figure 4 Settings for entity bean clustering

ltxml version=10 encoding=UTF-8 gtltDOCTYPE jboss PUBLIC -JBossDTD JBOSS 32EN httpwwwjbossorgj2eedtdjboss_3_2dtdgt ltjbossgt ltsecuregtfalseltsecuregt ltenterprise-beansgt ltsessiongt ltejb-namegtVLSUtilltejb-namegt ltjndi-namegtMercaderiaVLSUtilltjndi-namegt ltclusteredgttrueltclusteredgt

ltcluster-configgtltpartition-namegtDefaultPartitionltpartition-namegtlthome-load-balance-policygtorgjbosshaframeworkinterfacesRoundRobinlthome-load-balance-

policygtltbean-load-balance-policygtorgjbosshaframeworkinterfacesRoundRobinltbean-load-balance-

policygt ltcluster-configgt

ltsessiongt ltentitygt ltejb-namegtmetodos_norandltejb-namegt ltjndi-namegtMercaderiametodos_norandltjndi-namegt ltentitygt ltentitygt ltejb-namegtpv_cajerosltejb-namegt ltjndi-namegtMercaderiapv_cajerosltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_orden_compraltejb-namegt ltjndi-namegtMercaderiaenca_orden_compraltjndi-namegt ltentitygt ltsessiongt ltejb-namegtQ_Gastos_Transf_Internaltejb-namegt ltjndi-namegtMercaderiaQ_Gastos_Transf_Internaltjndi-namegt ltclusteredgttrueltclusteredgt ltsessiongt

3

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCP_CHEQUEltejb-namegt ltjndi-namegtMercaderiaCP_CHEQUEltjndi-namegt ltentitygt ltentitygt ltejb-namegtelasticidadltejb-namegt ltjndi-namegtMercaderiaelasticidadltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticuloltejb-namegt ltjndi-namegtMercaderiaarticuloltjndi-namegt ltentitygt ltentitygt ltejb-namegtmetodos_tempoltejb-namegt ltjndi-namegtMercaderiametodos_tempoltjndi-namegt ltentitygt ltentitygt ltejb-namegtmapa_ubicacionesltejb-namegt ltjndi-namegtMercaderiamapa_ubicacionesltjndi-namegt ltentitygt ltentitygt ltejb-namegtpv_det_prepedidoltejb-namegt ltjndi-namegtMercaderiapv_det_prepedidoltjndi-namegt ltentitygt ltentitygt ltejb-namegtCC_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCC_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprecio_arti_sucltejb-namegt ltjndi-namegtMercaderiaprecio_arti_sucltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_SALDOS_BENEFltejb-namegt ltjndi-namegtMercaderiaCT_SALDOS_BENEFltjndi-namegt ltentitygt ltentitygt ltejb-namegtgp_inv_fisicoltejb-namegt ltjndi-namegtMercaderiagp_inv_fisicoltjndi-namegt ltentitygt ltentitygt ltejb-namegtReportesRemoteltejb-namegt ltjndi-namegtMercaderiaReportesRemoteltjndi-namegt ltentitygt ltentitygt ltejb-namegtcp_nivel_auorizaltejb-namegt ltjndi-namegtMercaderiacp_nivel_auorizaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MAYOR_GENERALltejb-namegt ltjndi-namegtMercaderiaCT_MAYOR_GENERALltjndi-namegt ltentitygt ltentitygt ltejb-namegtcen_x_impltejb-namegt ltjndi-namegtMercaderiacen_x_impltjndi-namegt ltentitygt ltentitygt ltejb-namegtDet_trans_externaltejb-namegt

4

Documento de ConfiguracioacutenJboss Cluster

ltjndi-namegtMercaderiaDet_trans_externaltjndi-namegt ltentitygt ltentitygt ltejb-namegtRRemotoltejb-namegt ltjndi-namegtMercaderiaRRemotoltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_farmacialtejb-namegt ltjndi-namegtMercaderialayout_farmacialtjndi-namegt ltentitygt ltentitygt ltejb-namegtsucursalltejb-namegt ltjndi-namegtMercaderiasucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MOVTO_CONTABLEltejb-namegt ltjndi-namegtMercaderiaCT_MOVTO_CONTABLEltjndi-namegt ltentitygt ltentitygt ltejb-namegtEnc_transfer_extltejb-namegt ltjndi-namegtMercaderiaEnc_transfer_extltjndi-namegt ltentitygt ltentitygt ltejb-namegtdetalle_capturaltejb-namegt ltjndi-namegtMercaderiadetalle_capturaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCP_ORD_PAG_SIN_FACltejb-namegt ltjndi-namegtMercaderiaCP_ORD_PAG_SIN_FACltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_proveedorltejb-namegt ltjndi-namegtMercaderialayout_proveedorltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticulo_sucursalltejb-namegt ltjndi-namegtMercaderiaarticulo_sucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtGtos_trans_internaltejb-namegt ltjndi-namegtMercaderiaGtos_trans_internaltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_cambio_preciltejb-namegt ltjndi-namegtMercaderiaenca_cambio_preciltjndi-namegt ltentitygt ltentitygt ltejb-namegtTE_PROCESOSltejb-namegt ltjndi-namegtMercaderiaTE_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCT_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprocesosltejb-namegt ltjndi-namegtMercaderiaprocesosltjndi-namegt ltentitygt

5

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCT_PERIODO_CONTltejb-namegt ltjndi-namegtMercaderiaCT_PERIODO_CONTltjndi-namegt ltentitygt ltentitygt ltejb-namegtrecep_exceedltejb-namegt ltjndi-namegtMercaderiarecep_exceedltjndi-namegt ltentitygt ltenterprise-beansgt ltjbossgt

In the stateless session bean configuration only the ltclusteredgt tag is mandatory All other elements are the same as in the entity bean configuration

6

Documento de ConfiguracioacutenJboss Cluster

5 Defining JBoss cluster settings for a single cluster on a networkA cluster-servicexml file in the VERSATA_HOMEConfigserveralldeploy folder contains settings for a default JBoss cluster partition By default a JBoss instance started in the all mode becomes a member of this partition The orgjbosshaframeworkserverClusterPartition MBean defines the cluster partition The following figure illustrates the sample configuration

CVersataVLS-56-JBossConfigserveralldeploycluster-servicexml

ltxml version=10 encoding=UTF-8gt

lt-- ===================================================================== --gtlt-- --gtlt-- Sample Clustering Service Configuration --gtlt-- --gtlt-- ===================================================================== --gt

ltservergt

ltclasspath codebase=lib archives=jbosshajargt

lt-- ==================================================================== --gt lt-- Cluster Partition defines cluster --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshaframeworkserverClusterPartition

7

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 3: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

CVersataVLS-56-JBossConfigserverdefaultdeployMercaderiaearMercaderiajarMETA-INFjbossxml

Container configuration changes for stateless session beansWhen stateless session beans are clustered no state is involved so calls can be load balanced on any participating node meaning any cluster node that has this specific bean deployed To cluster a stateless session bean you need to modify its jbossxml descriptor to contain a ltclusteredgt tag The file is located in ltejbjargtMETA-INF

Figure 4 Settings for entity bean clustering

ltxml version=10 encoding=UTF-8 gtltDOCTYPE jboss PUBLIC -JBossDTD JBOSS 32EN httpwwwjbossorgj2eedtdjboss_3_2dtdgt ltjbossgt ltsecuregtfalseltsecuregt ltenterprise-beansgt ltsessiongt ltejb-namegtVLSUtilltejb-namegt ltjndi-namegtMercaderiaVLSUtilltjndi-namegt ltclusteredgttrueltclusteredgt

ltcluster-configgtltpartition-namegtDefaultPartitionltpartition-namegtlthome-load-balance-policygtorgjbosshaframeworkinterfacesRoundRobinlthome-load-balance-

policygtltbean-load-balance-policygtorgjbosshaframeworkinterfacesRoundRobinltbean-load-balance-

policygt ltcluster-configgt

ltsessiongt ltentitygt ltejb-namegtmetodos_norandltejb-namegt ltjndi-namegtMercaderiametodos_norandltjndi-namegt ltentitygt ltentitygt ltejb-namegtpv_cajerosltejb-namegt ltjndi-namegtMercaderiapv_cajerosltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_orden_compraltejb-namegt ltjndi-namegtMercaderiaenca_orden_compraltjndi-namegt ltentitygt ltsessiongt ltejb-namegtQ_Gastos_Transf_Internaltejb-namegt ltjndi-namegtMercaderiaQ_Gastos_Transf_Internaltjndi-namegt ltclusteredgttrueltclusteredgt ltsessiongt

3

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCP_CHEQUEltejb-namegt ltjndi-namegtMercaderiaCP_CHEQUEltjndi-namegt ltentitygt ltentitygt ltejb-namegtelasticidadltejb-namegt ltjndi-namegtMercaderiaelasticidadltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticuloltejb-namegt ltjndi-namegtMercaderiaarticuloltjndi-namegt ltentitygt ltentitygt ltejb-namegtmetodos_tempoltejb-namegt ltjndi-namegtMercaderiametodos_tempoltjndi-namegt ltentitygt ltentitygt ltejb-namegtmapa_ubicacionesltejb-namegt ltjndi-namegtMercaderiamapa_ubicacionesltjndi-namegt ltentitygt ltentitygt ltejb-namegtpv_det_prepedidoltejb-namegt ltjndi-namegtMercaderiapv_det_prepedidoltjndi-namegt ltentitygt ltentitygt ltejb-namegtCC_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCC_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprecio_arti_sucltejb-namegt ltjndi-namegtMercaderiaprecio_arti_sucltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_SALDOS_BENEFltejb-namegt ltjndi-namegtMercaderiaCT_SALDOS_BENEFltjndi-namegt ltentitygt ltentitygt ltejb-namegtgp_inv_fisicoltejb-namegt ltjndi-namegtMercaderiagp_inv_fisicoltjndi-namegt ltentitygt ltentitygt ltejb-namegtReportesRemoteltejb-namegt ltjndi-namegtMercaderiaReportesRemoteltjndi-namegt ltentitygt ltentitygt ltejb-namegtcp_nivel_auorizaltejb-namegt ltjndi-namegtMercaderiacp_nivel_auorizaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MAYOR_GENERALltejb-namegt ltjndi-namegtMercaderiaCT_MAYOR_GENERALltjndi-namegt ltentitygt ltentitygt ltejb-namegtcen_x_impltejb-namegt ltjndi-namegtMercaderiacen_x_impltjndi-namegt ltentitygt ltentitygt ltejb-namegtDet_trans_externaltejb-namegt

4

Documento de ConfiguracioacutenJboss Cluster

ltjndi-namegtMercaderiaDet_trans_externaltjndi-namegt ltentitygt ltentitygt ltejb-namegtRRemotoltejb-namegt ltjndi-namegtMercaderiaRRemotoltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_farmacialtejb-namegt ltjndi-namegtMercaderialayout_farmacialtjndi-namegt ltentitygt ltentitygt ltejb-namegtsucursalltejb-namegt ltjndi-namegtMercaderiasucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MOVTO_CONTABLEltejb-namegt ltjndi-namegtMercaderiaCT_MOVTO_CONTABLEltjndi-namegt ltentitygt ltentitygt ltejb-namegtEnc_transfer_extltejb-namegt ltjndi-namegtMercaderiaEnc_transfer_extltjndi-namegt ltentitygt ltentitygt ltejb-namegtdetalle_capturaltejb-namegt ltjndi-namegtMercaderiadetalle_capturaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCP_ORD_PAG_SIN_FACltejb-namegt ltjndi-namegtMercaderiaCP_ORD_PAG_SIN_FACltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_proveedorltejb-namegt ltjndi-namegtMercaderialayout_proveedorltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticulo_sucursalltejb-namegt ltjndi-namegtMercaderiaarticulo_sucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtGtos_trans_internaltejb-namegt ltjndi-namegtMercaderiaGtos_trans_internaltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_cambio_preciltejb-namegt ltjndi-namegtMercaderiaenca_cambio_preciltjndi-namegt ltentitygt ltentitygt ltejb-namegtTE_PROCESOSltejb-namegt ltjndi-namegtMercaderiaTE_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCT_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprocesosltejb-namegt ltjndi-namegtMercaderiaprocesosltjndi-namegt ltentitygt

5

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCT_PERIODO_CONTltejb-namegt ltjndi-namegtMercaderiaCT_PERIODO_CONTltjndi-namegt ltentitygt ltentitygt ltejb-namegtrecep_exceedltejb-namegt ltjndi-namegtMercaderiarecep_exceedltjndi-namegt ltentitygt ltenterprise-beansgt ltjbossgt

In the stateless session bean configuration only the ltclusteredgt tag is mandatory All other elements are the same as in the entity bean configuration

6

Documento de ConfiguracioacutenJboss Cluster

5 Defining JBoss cluster settings for a single cluster on a networkA cluster-servicexml file in the VERSATA_HOMEConfigserveralldeploy folder contains settings for a default JBoss cluster partition By default a JBoss instance started in the all mode becomes a member of this partition The orgjbosshaframeworkserverClusterPartition MBean defines the cluster partition The following figure illustrates the sample configuration

CVersataVLS-56-JBossConfigserveralldeploycluster-servicexml

ltxml version=10 encoding=UTF-8gt

lt-- ===================================================================== --gtlt-- --gtlt-- Sample Clustering Service Configuration --gtlt-- --gtlt-- ===================================================================== --gt

ltservergt

ltclasspath codebase=lib archives=jbosshajargt

lt-- ==================================================================== --gt lt-- Cluster Partition defines cluster --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshaframeworkserverClusterPartition

7

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 4: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCP_CHEQUEltejb-namegt ltjndi-namegtMercaderiaCP_CHEQUEltjndi-namegt ltentitygt ltentitygt ltejb-namegtelasticidadltejb-namegt ltjndi-namegtMercaderiaelasticidadltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticuloltejb-namegt ltjndi-namegtMercaderiaarticuloltjndi-namegt ltentitygt ltentitygt ltejb-namegtmetodos_tempoltejb-namegt ltjndi-namegtMercaderiametodos_tempoltjndi-namegt ltentitygt ltentitygt ltejb-namegtmapa_ubicacionesltejb-namegt ltjndi-namegtMercaderiamapa_ubicacionesltjndi-namegt ltentitygt ltentitygt ltejb-namegtpv_det_prepedidoltejb-namegt ltjndi-namegtMercaderiapv_det_prepedidoltjndi-namegt ltentitygt ltentitygt ltejb-namegtCC_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCC_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprecio_arti_sucltejb-namegt ltjndi-namegtMercaderiaprecio_arti_sucltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_SALDOS_BENEFltejb-namegt ltjndi-namegtMercaderiaCT_SALDOS_BENEFltjndi-namegt ltentitygt ltentitygt ltejb-namegtgp_inv_fisicoltejb-namegt ltjndi-namegtMercaderiagp_inv_fisicoltjndi-namegt ltentitygt ltentitygt ltejb-namegtReportesRemoteltejb-namegt ltjndi-namegtMercaderiaReportesRemoteltjndi-namegt ltentitygt ltentitygt ltejb-namegtcp_nivel_auorizaltejb-namegt ltjndi-namegtMercaderiacp_nivel_auorizaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MAYOR_GENERALltejb-namegt ltjndi-namegtMercaderiaCT_MAYOR_GENERALltjndi-namegt ltentitygt ltentitygt ltejb-namegtcen_x_impltejb-namegt ltjndi-namegtMercaderiacen_x_impltjndi-namegt ltentitygt ltentitygt ltejb-namegtDet_trans_externaltejb-namegt

4

Documento de ConfiguracioacutenJboss Cluster

ltjndi-namegtMercaderiaDet_trans_externaltjndi-namegt ltentitygt ltentitygt ltejb-namegtRRemotoltejb-namegt ltjndi-namegtMercaderiaRRemotoltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_farmacialtejb-namegt ltjndi-namegtMercaderialayout_farmacialtjndi-namegt ltentitygt ltentitygt ltejb-namegtsucursalltejb-namegt ltjndi-namegtMercaderiasucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MOVTO_CONTABLEltejb-namegt ltjndi-namegtMercaderiaCT_MOVTO_CONTABLEltjndi-namegt ltentitygt ltentitygt ltejb-namegtEnc_transfer_extltejb-namegt ltjndi-namegtMercaderiaEnc_transfer_extltjndi-namegt ltentitygt ltentitygt ltejb-namegtdetalle_capturaltejb-namegt ltjndi-namegtMercaderiadetalle_capturaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCP_ORD_PAG_SIN_FACltejb-namegt ltjndi-namegtMercaderiaCP_ORD_PAG_SIN_FACltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_proveedorltejb-namegt ltjndi-namegtMercaderialayout_proveedorltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticulo_sucursalltejb-namegt ltjndi-namegtMercaderiaarticulo_sucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtGtos_trans_internaltejb-namegt ltjndi-namegtMercaderiaGtos_trans_internaltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_cambio_preciltejb-namegt ltjndi-namegtMercaderiaenca_cambio_preciltjndi-namegt ltentitygt ltentitygt ltejb-namegtTE_PROCESOSltejb-namegt ltjndi-namegtMercaderiaTE_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCT_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprocesosltejb-namegt ltjndi-namegtMercaderiaprocesosltjndi-namegt ltentitygt

5

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCT_PERIODO_CONTltejb-namegt ltjndi-namegtMercaderiaCT_PERIODO_CONTltjndi-namegt ltentitygt ltentitygt ltejb-namegtrecep_exceedltejb-namegt ltjndi-namegtMercaderiarecep_exceedltjndi-namegt ltentitygt ltenterprise-beansgt ltjbossgt

In the stateless session bean configuration only the ltclusteredgt tag is mandatory All other elements are the same as in the entity bean configuration

6

Documento de ConfiguracioacutenJboss Cluster

5 Defining JBoss cluster settings for a single cluster on a networkA cluster-servicexml file in the VERSATA_HOMEConfigserveralldeploy folder contains settings for a default JBoss cluster partition By default a JBoss instance started in the all mode becomes a member of this partition The orgjbosshaframeworkserverClusterPartition MBean defines the cluster partition The following figure illustrates the sample configuration

CVersataVLS-56-JBossConfigserveralldeploycluster-servicexml

ltxml version=10 encoding=UTF-8gt

lt-- ===================================================================== --gtlt-- --gtlt-- Sample Clustering Service Configuration --gtlt-- --gtlt-- ===================================================================== --gt

ltservergt

ltclasspath codebase=lib archives=jbosshajargt

lt-- ==================================================================== --gt lt-- Cluster Partition defines cluster --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshaframeworkserverClusterPartition

7

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 5: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

ltjndi-namegtMercaderiaDet_trans_externaltjndi-namegt ltentitygt ltentitygt ltejb-namegtRRemotoltejb-namegt ltjndi-namegtMercaderiaRRemotoltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_farmacialtejb-namegt ltjndi-namegtMercaderialayout_farmacialtjndi-namegt ltentitygt ltentitygt ltejb-namegtsucursalltejb-namegt ltjndi-namegtMercaderiasucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_MOVTO_CONTABLEltejb-namegt ltjndi-namegtMercaderiaCT_MOVTO_CONTABLEltjndi-namegt ltentitygt ltentitygt ltejb-namegtEnc_transfer_extltejb-namegt ltjndi-namegtMercaderiaEnc_transfer_extltjndi-namegt ltentitygt ltentitygt ltejb-namegtdetalle_capturaltejb-namegt ltjndi-namegtMercaderiadetalle_capturaltjndi-namegt ltentitygt ltentitygt ltejb-namegtCP_ORD_PAG_SIN_FACltejb-namegt ltjndi-namegtMercaderiaCP_ORD_PAG_SIN_FACltjndi-namegt ltentitygt ltentitygt ltejb-namegtlayout_proveedorltejb-namegt ltjndi-namegtMercaderialayout_proveedorltjndi-namegt ltentitygt ltentitygt ltejb-namegtarticulo_sucursalltejb-namegt ltjndi-namegtMercaderiaarticulo_sucursalltjndi-namegt ltentitygt ltentitygt ltejb-namegtGtos_trans_internaltejb-namegt ltjndi-namegtMercaderiaGtos_trans_internaltjndi-namegt ltentitygt ltentitygt ltejb-namegtenca_cambio_preciltejb-namegt ltjndi-namegtMercaderiaenca_cambio_preciltjndi-namegt ltentitygt ltentitygt ltejb-namegtTE_PROCESOSltejb-namegt ltjndi-namegtMercaderiaTE_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtCT_PROCESOSltejb-namegt ltjndi-namegtMercaderiaCT_PROCESOSltjndi-namegt ltentitygt ltentitygt ltejb-namegtprocesosltejb-namegt ltjndi-namegtMercaderiaprocesosltjndi-namegt ltentitygt

5

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCT_PERIODO_CONTltejb-namegt ltjndi-namegtMercaderiaCT_PERIODO_CONTltjndi-namegt ltentitygt ltentitygt ltejb-namegtrecep_exceedltejb-namegt ltjndi-namegtMercaderiarecep_exceedltjndi-namegt ltentitygt ltenterprise-beansgt ltjbossgt

In the stateless session bean configuration only the ltclusteredgt tag is mandatory All other elements are the same as in the entity bean configuration

6

Documento de ConfiguracioacutenJboss Cluster

5 Defining JBoss cluster settings for a single cluster on a networkA cluster-servicexml file in the VERSATA_HOMEConfigserveralldeploy folder contains settings for a default JBoss cluster partition By default a JBoss instance started in the all mode becomes a member of this partition The orgjbosshaframeworkserverClusterPartition MBean defines the cluster partition The following figure illustrates the sample configuration

CVersataVLS-56-JBossConfigserveralldeploycluster-servicexml

ltxml version=10 encoding=UTF-8gt

lt-- ===================================================================== --gtlt-- --gtlt-- Sample Clustering Service Configuration --gtlt-- --gtlt-- ===================================================================== --gt

ltservergt

ltclasspath codebase=lib archives=jbosshajargt

lt-- ==================================================================== --gt lt-- Cluster Partition defines cluster --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshaframeworkserverClusterPartition

7

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 6: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

ltentitygt ltejb-namegtCT_PERIODO_CONTltejb-namegt ltjndi-namegtMercaderiaCT_PERIODO_CONTltjndi-namegt ltentitygt ltentitygt ltejb-namegtrecep_exceedltejb-namegt ltjndi-namegtMercaderiarecep_exceedltjndi-namegt ltentitygt ltenterprise-beansgt ltjbossgt

In the stateless session bean configuration only the ltclusteredgt tag is mandatory All other elements are the same as in the entity bean configuration

6

Documento de ConfiguracioacutenJboss Cluster

5 Defining JBoss cluster settings for a single cluster on a networkA cluster-servicexml file in the VERSATA_HOMEConfigserveralldeploy folder contains settings for a default JBoss cluster partition By default a JBoss instance started in the all mode becomes a member of this partition The orgjbosshaframeworkserverClusterPartition MBean defines the cluster partition The following figure illustrates the sample configuration

CVersataVLS-56-JBossConfigserveralldeploycluster-servicexml

ltxml version=10 encoding=UTF-8gt

lt-- ===================================================================== --gtlt-- --gtlt-- Sample Clustering Service Configuration --gtlt-- --gtlt-- ===================================================================== --gt

ltservergt

ltclasspath codebase=lib archives=jbosshajargt

lt-- ==================================================================== --gt lt-- Cluster Partition defines cluster --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshaframeworkserverClusterPartition

7

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 7: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

5 Defining JBoss cluster settings for a single cluster on a networkA cluster-servicexml file in the VERSATA_HOMEConfigserveralldeploy folder contains settings for a default JBoss cluster partition By default a JBoss instance started in the all mode becomes a member of this partition The orgjbosshaframeworkserverClusterPartition MBean defines the cluster partition The following figure illustrates the sample configuration

CVersataVLS-56-JBossConfigserveralldeploycluster-servicexml

ltxml version=10 encoding=UTF-8gt

lt-- ===================================================================== --gtlt-- --gtlt-- Sample Clustering Service Configuration --gtlt-- --gtlt-- ===================================================================== --gt

ltservergt

ltclasspath codebase=lib archives=jbosshajargt

lt-- ==================================================================== --gt lt-- Cluster Partition defines cluster --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshaframeworkserverClusterPartition

7

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 8: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

name=jbossservice=DefaultPartitiongt lt-- Name of the partition being built --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- The address used to determine the node name --gt ltattribute name=NodeAddressgt$jbossbindaddressltattributegt lt-- Determine if deadlock detection is enabled --gt ltattribute name=DeadlockDetectiongtFalseltattributegt

lt-- Time in milliseconds to wait for state to be transferred --gt ltattribute name=StateTransferTimeoutgt60000ltattributegt

lt-- The JGroups protocol configuration --gt ltattribute name=PartitionConfiggt ltConfiggt lt-- UDP if you have a multihomed machine set the bind_addr attribute to the appropriate NIC IP address --gt lt-- UDP On Windows machines because of the media sense feature being broken with multicast (even after disabling media sense) set the loopback attribute to true --gt ltUDP mcast_addr=228123 mcast_port=45571 ip_ttl=32 ip_mcast=true mcast_send_buf_size=800000 mcast_recv_buf_size=150000 ucast_send_buf_size=800000 ucast_recv_buf_size=150000 loopback=false gt ltPING timeout=2000 num_initial_members=3 up_thread=true down_thread=true gt ltMERGE2 min_interval=10000 max_interval=20000 gt ltFD shun=true up_thread=true down_thread=true timeout=2500 max_tries=5 gt ltVERIFY_SUSPECT timeout=3000 num_msgs=3 up_thread=true down_thread=true gt ltpbcastNAKACK gc_lag=50 retransmit_timeout=300600120024004800 max_xmit_size=8192 up_thread=true down_thread=true gt ltUNICAST timeout=300600120024004800 window_size=100 min_threshold=10 down_thread=true gt ltpbcastSTABLE desired_avg_gossip=20000 up_thread=true down_thread=true gt ltFRAG frag_size=8192 down_thread=true up_thread=true gt ltpbcastGMS join_timeout=5000 join_retry_timeout=2000 shun=true print_local_addr=true gt ltpbcastSTATE_TRANSFER up_thread=true down_thread=true gt ltConfiggt ltattributegt

ltmbeangt

lt-- ==================================================================== --gt lt-- HA Session State Service for SFSB --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshahasessionstateserverHASessionStateService name=jbossservice=HASessionStategt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt

8

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 9: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

lt-- JNDI name under which the service is bound --gt ltattribute name=JndiNamegtHASessionStateDefaultltattributegt lt-- Max delay before cleaning unreclaimed state Defaults to 30601000 =gt 30 minutes --gt ltattribute name=BeanCleaningDelaygt0ltattributegt ltmbeangt

lt-- ==================================================================== --gt lt-- HA JNDI --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosshajndiHANamingService name=jbossservice=HAJNDIgt ltdependsgtjbossservice=DefaultPartitionltdependsgt lt-- Name of the partition to which the service is linked --gt ltattribute name=PartitionNamegtDefaultPartitionltattributegt lt-- bind address of HA JNDI RMI endpoint --gt ltattribute name=BindAddressgt$jbossbindaddressltattributegt lt-- RmiPort to be used by the HA-JNDI service once bound 0 =gt auto --gt ltattribute name=RmiPortgt0ltattributegt lt-- Port on which the HA-JNDI stub is made available --gt ltattribute name=Portgt1100ltattributegt lt-- Backlog to be used for client-server RMI invocations during JNDI queries --gt ltattribute name=Backloggt50ltattributegt lt-- Multicast Address and Group used for auto-discovery --gt ltattribute name=AutoDiscoveryAddressgt230004ltattributegt ltattribute name=AutoDiscoveryGroupgt1102ltattributegt

lt-- IP Address to which should be bound the Port the RmiPort and the AutoDiscovery multicast socket --gt lt-- Client socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ClientSocketFactorygtcustomltattribute--gt lt-- Server socket factory to be used for client-server RMI invocations during JNDI queries --gt lt--attribute name=ServerSocketFactorygtcustomltattribute--gt ltmbeangt

ltmbean code=orgjbossinvocationjrmpserverJRMPInvokerHA name=jbossservice=invokertype=jrmphagt ltattribute name=ServerAddressgt$jbossbindaddressltattributegt lt-- ltattribute name=RMIObjectPortgt0ltattributegt ltattribute name=RMIClientSocketFactorygtcustomltattributegt ltattribute name=RMIServerSocketFactorygtcustomltattributegt --gt ltmbeangt

lt-- ==================================================================== --gt lt-- Distributed cache invalidation --gt lt-- ==================================================================== --gt

ltmbean code=orgjbosscacheinvalidationbridgesJGCacheInvalidationBridge name=jbosscacheservice=InvalidationBridgetype=JavaGroupsgt ltdependsgtjbossservice=DefaultPartitionltdependsgt

9

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 10: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

ltdependsgtjbosscacheservice=InvalidationManagerltdependsgt ltattribute name=InvalidationManagergtjbosscacheservice=InvalidationManagerltattributegt ltattribute name=PartitionNamegtDefaultPartitionltattributegt ltattribute name=BridgeNamegtDefaultJGBridgeltattributegt ltmbeangt

ltservergt

The default configuration can be used as is unless it is required to set up multiple clusters on the same network For information about this case see ldquoDefining JBoss settings for multiple clusters on a networkrdquo on page 80

Note JBoss clustering relies on the use of IP multicast You need to ensure that multicast traffic is allowed on the network on which the cluster node is being configured and also do the following1048708 Ensure that the multicast functionality is enabled on each of the cluster nodes1048708 On a Windows machine set the loopback attribute to false1048708 In case of a multi-homed machine set the bind_addr attribute to the appropriate NIC IP address

6 Running JBoss in all modeThe Versata Logic Suite JBoss edition includes two different ready-to-use server configurations or modes default and all Clustering is enabled only in the all mode When the JBoss application server is started from within the Versata Logic Studio it is invoked to start in the default mode Thus the Versata Logic Server used by the Versata Logic Studio is essentially a standalone instance of JBoss application server However if desired you can make this instance execute in the all mode so that it can be a part of a JBoss cluster To do so

Note In case the Versata Logic Server is currently running ensure that you stop it from the Versata Logic Studio toolbar button before following these steps

On Windows1 At the command prompt enter VERSATA_HOMESetVersataEnvbat2 Next enter VERSATA_HOMEConfigbingt run ndashc all --host ltip address of the nodegt

Nota Se pueden copiar los archivos runbat startbat run1bat setPathsbat runBCKbat

De 1921681239c$VersataVLS-56-JBossConfigbin

A CVersataVLS-56-JBossConfigbin

Cambios realizados Respaldar los archivos

CVersataVLS-56-JBossConfigbinRunbatStartbatStartserverbat

10

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 11: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

Agregar el archivosetPathsbat

Renombrar el archive runbat por run1bat y realizar los siguientes cambiosecho Parameters run1 PARAM

echo offrem -------------------------------------------------------------------------rem JBoss Bootstrap Script for Win32rem -------------------------------------------------------------------------

call setPathsbat

rem $Id runbatv 1444 20031112 031635 juhalindfors Exp $

if not ECHO == echo ECHOif OS == Windows_NT setlocal

set DIRNAME=if OS == Windows_NT set DIRNAME=~dp0set PROGNAME=run1batif OS == Windows_NT set PROGNAME=~nx0

rem Read all command line arguments

REMREM The ARGS env variable commented out in favor of using to includeREM all args in java command line See bug 840239 [jpl]REMREM set ARGS=REM loopREM if [1] == [] goto endloopREM set ARGS=ARGS 1REM shiftREM goto loopREM endloop

rem Find runjar or we cant continue

set RUNJAR=DIRNAMErunjarif exist RUNJAR goto FOUND_RUN_JARecho Could not locate RUNJAR Please check that you are in theecho bin directory when running this scriptgoto END

FOUND_RUN_JAR

if not JAVA_HOME == goto ADD_TOOLS

set JAVA=java

echo JAVA_HOME is not set Unexpected results may occurecho Set JAVA_HOME to the directory of your local JDK to avoid this messagegoto SKIP_TOOLS

ADD_TOOLS

11

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 12: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

set JAVA=JAVA_HOMEbinjava

if exist JAVA_HOMElibtoolsjar goto SKIP_TOOLSecho Could not locate JAVA_HOMElibtoolsjar Unexpected results may occurecho Make sure that JAVA_HOME points to a JDK and not a JRE

SKIP_TOOLS

rem Include the JDK javac compiler for JSP pages The default is for a Sun JDKrem compatible distribution to which JAVA_HOME points

set JAVAC_JAR=JAVA_HOMElibtoolsjar

rem If JBOSS_CLASSPATH is empty dont include it as this will rem result in including the local directory which makes error trackingrem harderif JBOSS_CLASSPATH == (

set JBOSS_CLASSPATH=JAVAC_JARRUNJAR) ELSE (

set JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJAR)

if exist VERSATA_HOMEVlslibVLSResourceproperties goto SKIP_VERSATAecho ===============================================================================echo Could not locate VERSATA_HOME Unexpected results may occur PLEASE SET IT BEFORE STARTING JBOSSecho ===============================================================================

SKIP_VERSATAecho ===============================================================================echo VERSATA_HOME is setecho ===============================================================================set VERSATA_CLASSPATH=VERSATA_HOMEVlslibVERSATA_HOMEClientlibVERSATA_HOMEVlslibVLSSharejarVERSATA_HOMEVLSlibcommons-cli-10jarVERSATA_HOMEVLSlibcommons-codec-12jarset JAVAC_JAR=JAVA_HOMElibtoolsjarset JBOSS_CLASSPATH=JBOSS_CLASSPATHJAVAC_JARRUNJARVERSATA_CLASSPATHVERSATA_JAXB_CLASSPATH

rem Setup JBoss specific propertiesset JAVA_OPTS=JAVA_OPTS -Dprogramname=PROGNAME -Dlog4jdefaultInitOverride=false -Dusertimezone=AmericaMexico_Cityset JBOSS_HOME=DIRNAME

rem Sun JVM memory allocation pool parameters Uncomment and modify as appropriateset JAVA_OPTS=JAVA_OPTS -Xms256m -Xmx1024m -XXMaxPermSize=256m

rem JPDA options Uncomment and modify as appropriate to enable remote debuggingrem set JAVA_OPTS=-classic -Xdebug -Xnoagent -Djavacompiler=NONE -Xrunjdwptransport=dt_socketaddress=8787server=ysuspend=y JAVA_OPTS

echo ===============================================================================echo echo JBoss Bootstrap Environmentecho echo JBOSS_HOME JBOSS_HOME

12

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 13: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

echo echo JAVA JAVAecho echo JAVA_OPTS JAVA_OPTSecho VERSATA_JAXB_CLASSPATH = VERSATA_JAXB_CLASSPATHecho CLASSPATH JBOSS_CLASSPATHecho echo echo VERSATA_HOME VERSATA_HOMEecho echo echo ===============================================================================echo

RESTARTJAVA JAVA_OPTS -classpath JBOSS_CLASSPATH orgjbossMain IF ERRORLEVEL 10 GOTO RESTART

ENDif NOPAUSE == pause

END_NO_PAUSE

Crear el archivo runbat con el siguiente coacutedigoecho Parameters run PARAM

setlocalecho offpushd ~dp0call run1bat -c all popdendlocal

Modificar el archivo startbatecho Parameters start PARAM

setlocalecho offpushd ~dp0call run1bat -c allpopdendlocal

On Unix or Linux1 At the command prompt enter VERSATA_HOMESetVersataEnvsh2 Next enter VERSATA_HOMEConfigbinrunsh ndashc all --host ltip address of the nodegt

13

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 14: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

7 Deploying Versata enterprise applications in a clustered environmentA Versata enterprise application can be deployed by copying the EAR to the VERSATA_HOMEConfigserveralldeploy directory In a clustered environment the EAR needs to be deployed on each of the JBoss instances in the cluster For instructions for deploying SampDB1ear in this manner see ldquoDeploying SampDB1ear in a clustered environmentrdquo on page 83

Alternately the application can be deployed in the farm directory of one of the JBoss instances and it gets deployed on all the nodes in the cluster Hot deploying on one machine will cause that component to be hot deployed on all instances within the cluster Farming is enabled by default in the all mode so you do not have to set it up yourself Note that the application cannot be deployed in a exploded form in this case and needs to archived in a valid ear format and deployed into the farm folder VERSATA_HOMEConfigserverallfarm

Before you deploy an EAR you need to ensure settings are correct in the JBoss clusterservicexml file and the Versata VFCResourceproperties file These settings vary according to whether the network includes a single cluster or multiple clusters For instructions see the following1048708 ldquoDefining file settings for a single cluster on a networkrdquo on page 78

Copiar la carpeta MercaderiaearDe CVersataVLS-56-JBossConfigserverdefaultdeployA CVersataVLS-56-JBossConfigserveralldeploy

8 Subir servicios Notar que ahora las carpetas sobre donde trabaja el servicio es CVersataVLS-56-JBossConfigserverall

Por lo que el log libreriacuteas y los temporales se manejan en las subcarpetas de eacutesta ruta

ACTUALIZACIONES

Cuando se requiera actualizar reglas de negocio o publicacioacuten (esto solo en APPVLS02 ndash 1921681240) seraacute necesario

a Bajar serviciosb Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runCLUSTERbatc Renombrar el archivo CVersataVLS-56-JBossConfigbinrunBCKbat a runbatd Subir serviciose Abrir repositorio y hacer deploy al VLS yo publicacioacutenf Cerrar repositoriog Bajar serviciosh Renombrar el archivo CVersataVLS-56-JBossConfigbinrunbat a runBCKbati Renombrar el archivo CVersataVLS-56-JBossConfigbinrunCLUSTERbat a runbatj Copiar la carpeta Mercaderiaear

De CVersataVLS-56-JBossConfigserverdefaultdeploy

14

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15

Page 15: Instrucciones cluster Jboss

Documento de ConfiguracioacutenJboss Cluster

A CVersataVLS-56-JBossConfigserveralldeployk Borrar temporales

CVersataVLS-56-JBossConfigserveralltmpCVersataVLS-56-JBossConfigserverallworkCVersataVLS-56-JBossConfigserverdefaulttmpCVersataVLS-56-JBossConfigserverdefaultwork

l Subir servicios

15