First off it is need some libraries in pom.xml
After jars import we require to create the service to pool datasource:
Best regards,
Monday, June 6, 2016
How to solve '"NoSuchBeanDefinitionException: No bean named' ... 'importRegistry'" is defined' exception?
Testing some Spring Framework I have to run some code that returns with the following exception on a combination of camel, spring jms, jax-ws and spring boot:
The solution after some some review of logs and forums I discovered that class of JAX-WS was not properly named by stub source, the class was named as OperationRuleServiceService this class have @WebServiceClient, I discovered spring have some problem with that name, so I decided to rename the class with OperationRuleClient and afterwards I have a good compilation.
Best regards,
The solution after some some review of logs and forums I discovered that class of JAX-WS was not properly named by stub source, the class was named as OperationRuleServiceService this class have @WebServiceClient, I discovered spring have some problem with that name, so I decided to rename the class with OperationRuleClient and afterwards I have a good compilation.
Best regards,
Sunday, June 5, 2016
How to create a IBM MQ Client Library using SSL for transmision? (PART II-II)
1. Emitir un
certificado para una aplicación cliente en C
Cada aplicación debe
tener su propio certificado con un nombre distinguido. Cada nombre distinguido
debe ser único en la red del Websphere MQ.
Cambiar el directorio
donde se encuentra localizado la llave del repositorio donde será creado
/application:
user@user-vbox:~/code/ssl$
mkdir applicationuser@user-vbox:~/code/ssl$ cd application/user@user-vbox:~/code/ssl/application$
Y emitir el siguiente
comando para crear la llave de la base de datos de la aplicación:
user@user-vbox:~/code/ssl/application$ /opt/mqm/bin/runmqckm -keydb
-create -db myapp.kdb -type cms -stash
A password is required to access the source key database.
Please enter a password:
A password is required to access the source key database.
Please enter a password:
1.2. Crear el
certificado de solicitud
Introduce el
siguiente comando:
user@user-vbox:~/code/ssl/application$
/opt/mqm/bin/runmqckm -certreq -create -db myapp.kdb -type cms -dn
"CN=myAppName,O=sysEnterprise,OU=sysDeparment,L=Mexico,C=MX" -label
"ibmwebspheremquser" -file myapp.req
A password is required to access the source key database.
Please enter a
password:
1.3. Transferir la
solicitud
Transferir el archivo
de solicitud del certificado myapp.req para el directorio dodne se encuentra
localizado los archivos CA.
user@user-vbox:~/code/ssl/application$ cp myapp.req /home/user/code/ssl/appCAdir/
1.4. Firmar la
aplicación con el certificado
Ejecutar siguiente comando:
user@user-vbox:~/code/ssl/appCAdir$ /opt/mqm/bin/runmqckm -cert -sign
-db appCA.kdb -label "appCAcertificate" -expire 365 -format ascii
-file myapp.req -target myapp.cer
1.5 Transferir el
certificado firmado
Transferir el
certificado firmado, myapp.cer y el certificado publico de CA de regreso
/application
user@user-vbox:~/code/ssl/appCAdir$ cp myapp.cer /home/user/code/ssl/application/user@user-vbox:~/code/ssl/appCAdir$
cp appCAcertfile.cer /home/user/code/ssl/application/
1.6. Agregar el
certificado CA
Agregar el
certificado a un repositorio llave de la aplicación:
user@user-vbox:~/code/ssl/application$ /opt/mqm/bin/runmqckm -cert -add
-db myapp.kdb -type cms -file appCAcertfile.cer -label "theCAcert"
A password is required to access the source key database.
Please enter a password:
A password is required to access the source key database.
Please enter a password:
1.7. Recibir el certificado firmado
user@user-vbox:~/code/ssl/application$ /opt/mqm/bin/runmqckm -cert
-receive -db myapp.kdb -type cms -file myapp.cer
A password is required to access the source key database.
Please enter a
password:
Iniciar el gestor de
colas si no esta ya ejecutándose:
user@user-vbox:~/code/ssl/application$ strmqm appqmgr01
Una definición
apropiada del canal SVRCONN debe de crearse. Esto se puede lograr en cualquier
directorio:
user@user-vbox:~/code/ssl/application$ /opt/mqm/bin/runmqsc appqmgr01
DEFINE CHANNEL(MY.SEC.SVRCONN.CHL) CHLTYPE(SVRCONN) TRPTYPE(TCP)
SSLCAUTH(REQUIRED) SSLCIPH(RC4_MD5_US)
END
1.8.2. Iniciar el
listener
Si el listener no
esta activo en el gestor de colas:
user@user-vbox:~/code/ssl/application$ /opt/mqm/bin/runmqsc appqmgr01
DEFINE CHANNEL(MY.SEC.SVRCONN.CHL) CHLTYPE(SVRCONN) TRPTYPE(TCP)
SSLCAUTH(REQUIRED) SSLCIPH(RC4_MD5_US)
END
1.8.2. Agregar variable de entorno
user@user-vbox:~/code/ssl/application$ MQSSLKEYR=/home/user/code/ssl/applicationuser@user-vbox:~/code/ssl/application$
export MQSSLKEYRuser@user-vbox:~/code/ssl/application$ echo $MQSSLKEYR
/home/user/code/ssl/application
user@user-vbox:~/code/ssl/application$
1.8.3. Codigo de programa en C para enviar un mensaje
1.8.3. Compilación
del programa en GCC
gcc -m64 -o PutSample
PutSample.c -I/opt/mqm/inc -L/opt/mqm/lib64 -Wl,-rpath=/opt/mqm/lib64
-Wl,-rpath=/usr/lib64 -lmqic
(EN REVISION)
Otros enlaces:
- https://github.com/osanchezh/mqclientssl-app
- https://docs.oracle.com/cd/E19909-01/817-3729/examples.html
- https://docs.oracle.com/cd/E19509-01/820-3503/ggfai/index.html
Best regards,
Subscribe to:
Posts (Atom)