miércoles, 11 de septiembre de 2019
Instalar SVN en windows
Slik Subversion
C:\WINDOWS\system32>sc create SVNRepository binPath="C:\Program Files\SlikSvn\bin\svnserve.exe --service -r C:\svnroot" displayname="SVN Repository" depend=Tcpip
Arrancar el servicio
C:\WINDOWS\system32>net start SVNRepository
El servicio de SVN Repository está iniciándose.
El servicio de SVN Repository se ha iniciado correctamente.
Detener el Servicio
C:\WINDOWS\system32>net stop SVNRepository
El servicio de SVN Repository se detuvo correctamente.
SVN Alterno, este contiene los modulos .so que se le agregaran a apache/modules
sc create SVNRepository binPath="C:\Users\bext\Downloads\svn-win32-1.4.0\bin.exe --service -r C:\svnroot" displayname="SVN Repository" depend=Tcpip
Preparamos el repositorio
C:\Users\bext>svnadmin create c:\svnroot\test
eot
martes, 10 de septiembre de 2019
Install Cloud Foundry y cflocal
Install Cloud Foundry y cflocal
https://docs.cloudfoundry.org/cf-cli/install-go-cli.html
bext@bext-G3-3779:~$ wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - [sudo] password for bext: OK bext@bext-G3-3779:~$ echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list deb https://packages.cloudfoundry.org/debian stable main bext@bext-G3-3779:~$ sudo apt-get update Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease Hit:2 http://mx.archive.ubuntu.com/ubuntu bionic InRelease Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Ign:4 https://apt.datadoghq.com stable InRelease Get:6 http://mx.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Hit:7 https://apt.datadoghq.com stable Release Get:9 http://mx.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:5 https://cf-cli-debian-repo.s3.amazonaws.com stable InRelease [2 665 B] Get:10 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [581 kB] Get:11 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [368 kB] Get:12 https://cf-cli-debian-repo.s3.amazonaws.com stable/main amd64 Packages [9 165 B] Get:13 https://cf-cli-debian-repo.s3.amazonaws.com stable/main i386 Packages [9 161 B] Get:14 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [729 kB] Get:15 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [503 kB] Get:16 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [263 kB] Get:17 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [285 kB] Get:18 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [170 kB] Get:19 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [70.9 kB] Get:20 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB] Get:21 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [22.6 kB] Get:22 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [979 kB] Get:23 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [10.4 kB] Get:24 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [31.7 kB] Get:25 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1 003 kB] Get:26 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [6 712 B] Get:27 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [2 872 B] Get:28 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [253 kB] Get:29 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB] Get:30 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16.4 kB] Get:31 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [200 kB] Get:32 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB] Get:33 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [443 kB] Get:34 http://mx.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7 312 B] Get:35 http://security.ubuntu.com/ubuntu bionic-security/multiverse i386 Packages [4 152 B] Get:36 http://mx.archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [6 788 B] Get:37 http://mx.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2 464 B] Get:38 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4 688 B] Get:39 http://mx.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7 916 B] Get:40 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2 464 B] Fetched 6 540 kB in 10s (680 kB/s) Reading package lists... Done bext@bext-G3-3779:~$ sudo apt-get install cf-cli Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libllvm7 Use 'sudo apt autoremove' to remove it. The following NEW packages will be installed: cf-cli 0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded. Need to get 6 012 kB of archives. After this operation, 22.4 MB of additional disk space will be used. Get:1 https://packages.cloudfoundry.org/debian stable/main amd64 cf-cli amd64 6.46.1 [6 012 kB] Fetched 6 012 kB in 7s (851 kB/s) Selecting previously unselected package cf-cli. (Reading database ... 185693 files and directories currently installed.) Preparing to unpack .../cf-cli_6.46.1_amd64.deb ... Unpacking cf-cli (6.46.1) ... Setting up cf-cli (6.46.1) ... bext@bext-G3-3779:~$ cf --help bash: /snap/bin/cf: No such file or directory
Se cierra la terminal y se abre otra para limpiar
bext@bext-G3-3779:~$ cf cf version 6.46.1+4934877ec.2019-08-23, Cloud Foundry command line tool Usage: cf [global options] command [arguments...] [command options] Before getting started: config login,l target,t help,h logout,lo Application lifecycle: apps,a run-task,rt events push,p logs set-env,se start,st ssh create-app-manifest stop,sp app delete,d restart,rs env,e restage,rg scale Services integration: marketplace,m create-user-provided-service,cups services,s update-user-provided-service,uups create-service,cs create-service-key,csk update-service delete-service-key,dsk delete-service,ds service-keys,sk service service-key bind-service,bs bind-route-service,brs unbind-service,us unbind-route-service,urs Route and domain management: routes,r delete-route create-domain domains map-route create-route unmap-route Space management: spaces create-space set-space-role space-users delete-space unset-space-role Org management: orgs,o set-org-role org-users unset-org-role CLI plugin management: plugins add-plugin-repo repo-plugins install-plugin list-plugin-repos Commands offered by installed plugins: Global options: --help, -h Show help -v Print API request diagnostics to stdout TIP: Use 'cf help -a' to see all commands. bext@bext-G3-3779:~$
Ahora instalamos la version local
bext@bext-G3-3779:~$ cf install-plugin cflocal Searching CF-Community for plugin cflocal... Plugin cflocal 0.19.0 found in: CF-Community Attention: Plugins are binaries written by potentially untrusted authors. Install and use plugins at your own risk. Do you want to install the plugin cflocal? [yN]: y Starting download of plugin binary from repository CF-Community... 14.36 MiB / 14.36 MiB [===========================================] 100.00% 15s Installing plugin cflocal... OK Plugin cflocal 0.19.0 successfully installed. bext@bext-G3-3779:~$
Probamos cflocal
https://github.com/cloudfoundry-incubator/cflocal
eot
DataDog install agent linux Ubuntu
DataDog install agent linux Ubuntu
caso 1
DD_API_KEY=b36c0ed623627b9947488e9e6528a4b9 bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
caso 2
DD_UPGRADE=true bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)"
En terminalbext@bext-G3-3779:~$ DD_API_KEY=b36c0ed623627b9947488e9e6528a4b9 bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11615 100 11615 0 0 29782 0 --:--:-- --:--:-- --:--:-- 29782 * Installing apt-transport-https [sudo] password for bext: Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Hit:2 http://mx.archive.ubuntu.com/ubuntu bionic InRelease Hit:3 https://download.docker.com/linux/ubuntu bionic InRelease Get:4 http://mx.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Get:5 http://mx.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [502 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [368 kB] Get:8 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [580 kB] Get:9 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [170 kB] Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [22.7 kB] Get:11 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [10.4 kB] Get:12 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [31.7 kB] Get:13 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [6 600 B] Get:14 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [2 840 B] Get:15 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [604 kB] Get:16 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [590 kB] Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [201 kB] Get:18 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB] Get:19 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16.4 kB] Get:20 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [116 kB] Get:21 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2 464 B] Get:22 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [728 kB] Get:23 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [263 kB] Get:24 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [285 kB] Get:25 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [70.9 kB] Get:26 http://mx.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB] Get:27 http://mx.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [13.6 kB] Get:28 http://mx.archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [4 540 B] Get:29 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1 003 kB] Get:30 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [979 kB] Get:31 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [308 kB] Get:32 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [253 kB] Get:33 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [209 kB] Get:34 http://mx.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [452 kB] Get:35 http://mx.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2 468 B] Get:36 http://mx.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7 920 B] Fetched 8 239 kB in 38s (215 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... apt-transport-https is already the newest version (1.6.11). The following package was automatically installed and is no longer required: libllvm7 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded. Reading package lists... Building dependency tree... Reading state information... dirmngr is already the newest version (2.2.4-1ubuntu1.2). The following package was automatically installed and is no longer required: libllvm7 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded. * Installing APT package sources for Datadog Warning: apt-key output should not be parsed (stdout is not a terminal) Executing: /tmp/apt-key-gpghome.9aPb0KAYaK/gpg.1.sh --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 A2923DFF56EDA6E76E55E492D3A80E30382E94DE gpg: key D3A80E30382E94DE: public key "Datadog, Inc <package@datadoghq.com>" imported gpg: Total number processed: 1 gpg: imported: 1 * Installing the Datadog Agent package Ign:1 https://apt.datadoghq.com stable InRelease Get:2 https://apt.datadoghq.com stable Release [4 525 B] Get:3 https://apt.datadoghq.com stable Release.gpg [819 B] Get:4 https://apt.datadoghq.com stable/6 amd64 Packages [8 089 B] Fetched 13.4 kB in 1s (13.1 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... The following package was automatically installed and is no longer required: libllvm7 Use 'sudo apt autoremove' to remove it. The following NEW packages will be installed: datadog-agent 0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded. Need to get 141 MB of archives. After this operation, 472 MB of additional disk space will be used. Get:1 https://apt.datadoghq.com stable/6 amd64 datadog-agent amd64 1:6.13.0-1 [141 MB] Fetched 141 MB in 2min 29s (947 kB/s) Selecting previously unselected package datadog-agent. (Reading database ... 162478 files and directories currently installed.) Preparing to unpack .../datadog-agent_1%3a6.13.0-1_amd64.deb ... Unpacking datadog-agent (1:6.13.0-1) ... Setting up datadog-agent (1:6.13.0-1) ... Creating dd-agent group Creating dd-agent user Enabling service datadog-agent Created symlink /etc/systemd/system/multi-user.target.wants/datadog-agent.service → /lib/systemd/system/datadog-agent.service. Created symlink /etc/systemd/system/multi-user.target.wants/datadog-agent-process.service → /lib/systemd/system/datadog-agent-process.service. Created symlink /etc/systemd/system/multi-user.target.wants/datadog-agent-trace.service → /lib/systemd/system/datadog-agent-trace.service. No datadog.yaml file detected, not starting the agent Processing triggers for systemd (237-3ubuntu10.28) ... Processing triggers for ureadahead (0.100.0-21) ... ureadahead will be reprofiled on next reboot W: --force-yes is deprecated, use one of the options starting with --allow instead. * Adding your API key to the Agent configuration: /etc/datadog-agent/datadog.yaml /bin/systemctl * Starting the Agent... Your Agent is running and functioning properly. It will continue to run in the background and submit metrics to Datadog. If you ever want to stop the Agent, run: sudo systemctl stop datadog-agent And to run it again run: sudo systemctl start datadog-agent bext@bext-G3-3779:~$
eot
viernes, 6 de septiembre de 2019
TIBCO BW RESTsimple
TIBCO BW RESTsimple
Crearemos con Tibco BW 6 de la forma más simple una aplicación REST.
Creamos un proyecto businessWork Application
eot
Crearemos con Tibco BW 6 de la forma más simple una aplicación REST.
Creamos un proyecto businessWork Application
eot
TIBCO BW tipos de procesos
TIBCO BW tipos de procesos
File -> New -> Project
Generamos un Application Module sin Java
Generamos un Applicatoin Module con Java Configuration
Generamos un Shared Module con Java Configuration
eot
File -> New -> Project
Generamos un Application Module sin Java
Generamos un Applicatoin Module con Java Configuration
Generamos un Shared Module con Java Configuration
eot
miércoles, 4 de septiembre de 2019
TIBCO EMS arrancar en Windows
TIBCO EMS arrancar en Windows
Para trabajar con el manejador estandar de mensajes de Tibco, debemos arrancarlo.
Verificamos inicialmente el funcionamiento con tibamsadmin, nos conectamos y mostarmos los queues.
Por default el EMS corre en el puerto 7222, para cambiarlo. ubicamos el lugar donde esta instalado EMS de Tibco, en este caso en C:\Program Files\tibco\bw6\ems\8.4\bin y tenemos un archivo bat
tibemsd.bat el cual contiene
echo off
rem
rem Copyright (c) 2001-2013 by TIBCO Software Inc.
rem ALL RIGHTS RESERVED
rem
rem $Id: tibemsd.bat_template 68846 2013-08-21 20:28:23Z $
rem
rem Start the EMS server with the installed default configuration
rem
tibemsd -config "C:/ProgramData/bw6/tibco/cfgmgmt/ems/data/tibemsd.conf"
En el archivo tibemsd.conf estan definidas las configuraciones de ems.
########################################################################
# Listen ports. May be tcp or ssl, can specify any number.
# Form is tcp://hostname:port. If the hostname is not present then
# the default host and interface will be used.
########################################################################
listen = tcp://7222
########################################################################
Como ejemplo lo cambiaremos a 9797, sustituyendo tcp://7222 a tcp://9797
Para que tome el cambio debemos reiniciar el EMS, en este caso desde el administrador de programas matamos el proceso TIBCO Enterprise Message Service - Start EMS Server.
Al reiniciar el proceso nos reporta que esta corriendo el EMS en el puerto 9797
TIBCO Enterprise Message Service.
Copyright 2003-2017 by TIBCO Software Inc.
All rights reserved.
Version 8.4.0 V14 7/20/2017
2019-09-04 13:39:04.823 Process started from 'C:\Program Files\tibco\bw6\ems\8.4\bin\tibemsd.exe'.
2019-09-04 13:39:04.824 Process Id: 9128
2019-09-04 13:39:04.824 Hostname: android-ae23f0022eea
2019-09-04 13:39:04.825 Hostname IP address: [fe80::41c1:eea3:89b2:dc24%12]
2019-09-04 13:39:04.829 Hostname IP address: 192.168.99.1
2019-09-04 13:39:04.829 Reading configuration from 'C:\ProgramData\bw6\tibco\cfgmgmt/ems/data/tibemsd.conf'.
2019-09-04 13:39:05.180 Logging into file 'C:/ProgramData/bw6/tibco/cfgmgmt/ems/data/datastore/logfile'
2019-09-04 13:39:05.184 Server name: 'EMS-SERVER'.
2019-09-04 13:39:05.185 Storage Location: 'C:/ProgramData/bw6/tibco/cfgmgmt/ems/data/datastore'.
2019-09-04 13:39:05.185 Routing is disabled.
2019-09-04 13:39:05.186 Authorization is disabled.
2019-09-04 13:39:05.186 The server will attempt to trace warnings about destinations that are growing unbounded above 26843545 bytes or 50000 messages.
2019-09-04 13:39:05.187 Set server properties 'large_destination_memory' and 'large_destination_count' respectively to alter these thresholds.
2019-09-04 13:39:05.201 Accepting connections on tcp://android-ae23f0022eea/[::]:9797.
2019-09-04 13:39:05.202 Accepting connections on tcp://android-ae23f0022eea/0.0.0.0:9797.
2019-09-04 13:39:05.203 Recovering state, please wait.
2019-09-04 13:39:05.274 Server is active.
Ahora conectaremos el administration tool desde Windows - Start - Tibco Start Administartion Tool
debemos indicarle el puerto al momento de connect.
TIBCO Enterprise Message Service Administration Tool.
Copyright 2003-2017 by TIBCO Software Inc.
All rights reserved.
Version 8.4.0 V14 7/20/2017
Type 'help' for commands help, 'exit' to exit:
> connect
Login name (admin): admin
Password:
Failed connect to 'tcp://localhost:7222': error=11, message=Server not connected
> connect 9797
Login name (admin): admin
Password:
Connected to: tcp://localhost:9797
tcp://localhost:9797> show queues
All Msgs Persistent Msgs
Queue Name SNFGXIBCT Pre Rcvrs Msgs Size Msgs Size
> --------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.admin +-------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.lookup --------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.redelivery.delay +-------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.undelivered +-------- 5* 0 0 0.0 Kb 0 0.0 Kb
* $TMP$.EMS-SERVER.23A85D7004C83.1 --------- 5 1 0 0.0 Kb 0 0.0 Kb
queue.sample --------- 5* 0 0 0.0 Kb 0 0.0 Kb
sample --------- 5* 0 0 0.0 Kb 0 0.0 Kb
tcp://localhost:9797>
eot
Para trabajar con el manejador estandar de mensajes de Tibco, debemos arrancarlo.
Verificamos inicialmente el funcionamiento con tibamsadmin, nos conectamos y mostarmos los queues.
Por default el EMS corre en el puerto 7222, para cambiarlo. ubicamos el lugar donde esta instalado EMS de Tibco, en este caso en C:\Program Files\tibco\bw6\ems\8.4\bin y tenemos un archivo bat
tibemsd.bat el cual contiene
echo off
rem
rem Copyright (c) 2001-2013 by TIBCO Software Inc.
rem ALL RIGHTS RESERVED
rem
rem $Id: tibemsd.bat_template 68846 2013-08-21 20:28:23Z $
rem
rem Start the EMS server with the installed default configuration
rem
tibemsd -config "C:/ProgramData/bw6/tibco/cfgmgmt/ems/data/tibemsd.conf"
En el archivo tibemsd.conf estan definidas las configuraciones de ems.
########################################################################
# Listen ports. May be tcp or ssl, can specify any number.
# Form is tcp://hostname:port. If the hostname is not present then
# the default host and interface will be used.
########################################################################
listen = tcp://7222
########################################################################
Como ejemplo lo cambiaremos a 9797, sustituyendo tcp://7222 a tcp://9797
Para que tome el cambio debemos reiniciar el EMS, en este caso desde el administrador de programas matamos el proceso TIBCO Enterprise Message Service - Start EMS Server.
Al reiniciar el proceso nos reporta que esta corriendo el EMS en el puerto 9797
TIBCO Enterprise Message Service.
Copyright 2003-2017 by TIBCO Software Inc.
All rights reserved.
Version 8.4.0 V14 7/20/2017
2019-09-04 13:39:04.823 Process started from 'C:\Program Files\tibco\bw6\ems\8.4\bin\tibemsd.exe'.
2019-09-04 13:39:04.824 Process Id: 9128
2019-09-04 13:39:04.824 Hostname: android-ae23f0022eea
2019-09-04 13:39:04.825 Hostname IP address: [fe80::41c1:eea3:89b2:dc24%12]
2019-09-04 13:39:04.829 Hostname IP address: 192.168.99.1
2019-09-04 13:39:04.829 Reading configuration from 'C:\ProgramData\bw6\tibco\cfgmgmt/ems/data/tibemsd.conf'.
2019-09-04 13:39:05.180 Logging into file 'C:/ProgramData/bw6/tibco/cfgmgmt/ems/data/datastore/logfile'
2019-09-04 13:39:05.184 Server name: 'EMS-SERVER'.
2019-09-04 13:39:05.185 Storage Location: 'C:/ProgramData/bw6/tibco/cfgmgmt/ems/data/datastore'.
2019-09-04 13:39:05.185 Routing is disabled.
2019-09-04 13:39:05.186 Authorization is disabled.
2019-09-04 13:39:05.186 The server will attempt to trace warnings about destinations that are growing unbounded above 26843545 bytes or 50000 messages.
2019-09-04 13:39:05.187 Set server properties 'large_destination_memory' and 'large_destination_count' respectively to alter these thresholds.
2019-09-04 13:39:05.201 Accepting connections on tcp://android-ae23f0022eea/[::]:9797.
2019-09-04 13:39:05.202 Accepting connections on tcp://android-ae23f0022eea/0.0.0.0:9797.
2019-09-04 13:39:05.203 Recovering state, please wait.
2019-09-04 13:39:05.274 Server is active.
Ahora conectaremos el administration tool desde Windows - Start - Tibco Start Administartion Tool
debemos indicarle el puerto al momento de connect.
TIBCO Enterprise Message Service Administration Tool.
Copyright 2003-2017 by TIBCO Software Inc.
All rights reserved.
Version 8.4.0 V14 7/20/2017
Type 'help' for commands help, 'exit' to exit:
> connect
Login name (admin): admin
Password:
Failed connect to 'tcp://localhost:7222': error=11, message=Server not connected
> connect 9797
Login name (admin): admin
Password:
Connected to: tcp://localhost:9797
tcp://localhost:9797> show queues
All Msgs Persistent Msgs
Queue Name SNFGXIBCT Pre Rcvrs Msgs Size Msgs Size
> --------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.admin +-------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.lookup --------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.redelivery.delay +-------- 5* 0 0 0.0 Kb 0 0.0 Kb
$sys.undelivered +-------- 5* 0 0 0.0 Kb 0 0.0 Kb
* $TMP$.EMS-SERVER.23A85D7004C83.1 --------- 5 1 0 0.0 Kb 0 0.0 Kb
queue.sample --------- 5* 0 0 0.0 Kb 0 0.0 Kb
sample --------- 5* 0 0 0.0 Kb 0 0.0 Kb
tcp://localhost:9797>
eot
lunes, 2 de septiembre de 2019
Spring Boot mensajeria con JMS (Apache ActiveMQ)
Spring Boot mensajeria con JMS
https://github.com/jalbertomr/springBootJMS/commit/c8774b9eb67e179c4fbd6424a1628d5a089ab667
Estructura del proyecto
Spring proveé los medios para enviar mensajes por medio de cualquier POJO
en este caso se define un simple POJO con dos atributos, (to y body).
email.java
public class Email {
private String to;
private String body;
public Email() {super();}
public Email(String to, String body) {
this.to = to;
this.body = body;
}
public String getTo() { return to;}
public void setTo(String to) { this.to = to; }
public String getBody() {return body;}
public void setBody(String body) { this.body = body; }
@Override
public String toString() {
return "Email [to=" + to + ", body=" + body + "]";
}
}
Este POJO (email.java) lo recibe una clase Receiver.java.
Receiver.java
@Component
public class Receiver { //message driven POJO
@JmsListener(destination="mailbox", containerFactory="miFactory")
public void receiveMessage(Email email) {
System.out.println("Recivido <" + email +">");
}
}
Application.java
@SpringBootApplication
@EnableJms
public class Application {
@Bean
public JmsListenerContainerFactory<?> miFactory(ConnectionFactory connectionFactory,
DefaultJmsListenerContainerFactoryConfigurer configurer) {
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
// esto provee todos los default a factory, incluyendo el convertidor de mensajes
configurer.configure(factory, connectionFactory);
// se pueden sobreescribir los default de ser necesario.
return factory;
}
@Bean //Serializa el contenido del mensaje a json usando TextMessage
public MessageConverter jacksonJmsMessageConverter() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
return converter;
}
public static void main(String[] args) {
// corre la app
ConfigurableApplicationContext context = SpringApplication.run(Application.class, args);
JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class);
//Envia un mensaje con un POJO
System.out.println("Enviando un mensaje email");
jmsTemplate.convertAndSend("mailbox", new Email("correo@servidor.com","Contenido del Mensaje"));
}
}
la ejecucción nos da.
2019-09-02 10:31:26.973 INFO 18340 --- [ main] o.apache.activemq.broker.BrokerService : Using Persistence Adapter: MemoryPersistenceAdapter
2019-09-02 10:31:26.993 INFO 18340 --- [ JMX connector] o.a.a.broker.jmx.ManagementContext : JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
2019-09-02 10:31:27.107 INFO 18340 --- [ main] o.apache.activemq.broker.BrokerService : Apache ActiveMQ 5.15.9 (localhost, ID:bext-VPCF13WFX-32979-1567438286980-0:1) is starting
2019-09-02 10:31:27.111 INFO 18340 --- [ main] o.apache.activemq.broker.BrokerService : Apache ActiveMQ 5.15.9 (localhost, ID:bext-VPCF13WFX-32979-1567438286980-0:1) started
2019-09-02 10:31:27.111 INFO 18340 --- [ main] o.apache.activemq.broker.BrokerService : For help or more information please see: http://activemq.apache.org
2019-09-02 10:31:27.140 INFO 18340 --- [ main] o.a.activemq.broker.TransportConnector : Connector vm://localhost started
2019-09-02 10:31:27.204 INFO 18340 --- [ main] com.bext.Application : Started Application in 1.655 seconds (JVM running for 2.445)
Enviando un mensaje email
Recivido <Email [to=correo@servidor.com, body=Contenido del Mensaje]>2019-09-02 10:31:35.206 INFO 18340 --- [on(4)-127.0.0.1] inMXBeanRegistrar$SpringApplicationAdmin : Application shutdown requested.
2019-09-02 10:31:35.370 INFO 18340 --- [on(4)-127.0.0.1] o.a.activemq.broker.TransportConnector : Connector vm://localhost stopped
2019-09-02 10:31:35.371 INFO 18340 --- [on(4)-127.0.0.1] o.apache.activemq.broker.BrokerService : Apache ActiveMQ 5.15.9 (localhost, ID:bext-VPCF13WFX-32979-1567438286980-0:1) is shutting down
2019-09-02 10:31:35.380 INFO 18340 --- [on(4)-127.0.0.1] o.apache.activemq.broker.BrokerService : Apache ActiveMQ 5.15.9 (localhost, ID:bext-VPCF13WFX-32979-1567438286980-0:1) uptime 8.512 seconds
2019-09-02 10:31:35.380 INFO 18340 --- [on(4)-127.0.0.1] o.apache.activemq.broker.BrokerService : Apache ActiveMQ 5.15.9 (localhost, ID:bext-VPCF13WFX-32979-1567438286980-0:1) is shutdown
eot
Suscribirse a:
Comentarios (Atom)





































