Translate

martes, 27 de diciembre de 2016

Weblogic 10.3.6: local queue creation

Weblogic 10.3.6: Creación de colas locales


Sometimes in weblogic server is needed to create some local queues in order to process different types of messages.

This is the steps needed to create a very basic queue in weblogic.

The main objetive is to create one queue in weblogic.

1 - JMS Server creation: 

This is a basic container for de the queues.

  • Go to services -_> Messaging-->Jms Servers
  • Press New and create a new JMS Server: It is the container for queues.
  • Name the new JMS, por example: MyJmsServer and press next.

  • Finally select the server where you want to deploy your Jms Server



  • The final result is that you have created a new JmsServer associated to your Server.




2 - JMS Module creation: 

This step is to create a JMS module where you can assign resources and configure your queues. This module is similar to a J2EE module where configure your jndi resources.


  • Go to JMS Modules and create a new module, for example CSBModule, this is a module related to my CSMB project.

  • Name the module.

  • Asign to a server.
  • The final result is a JMS module asociated to the Server.



3 - Subdeployment creation: 

A subdeployment is a mechanism by which JMS module resources (such as queues, topics, and connection factories) are grouped and targeted to a server resource (such as JMS servers, server instances, or cluster).

Is a place where all the queues and resources which we are going to create will be placed, we are going to asociate to the JMS Server created in step 1.


  • Go to the new JmsModule creante and go to subdeployments tab and create new one


  • Name the subdeployment, for example AdminServerJMS


  • Associate it to the JMS Server create in step 1.

  • The result is a subdeployment associated to the JMS Server and through this server to the admin server.




4 - Conection Factory creation: 

In order to create a queue, the first step is to create a connection factory and after that the queue and asociate it to this factory.

A connection factory is a resource that enables JMS clients to create connections to JMS destinations.

  • Go to JMSModules --> CSMBModule and press new 

  • Create the connection factory 

  • Name it  (CFCSMB) and give a jndi name (jms/CFCSMB)

  • Asociate to the server.

  • The final result is a connection factory like that:


5 - Queue creation: 

Now we are ready to create the queue

  • Go to JMSModules --> CSMBModule and press new 
  • Create the new queue

  • Name it (CSMB_BT_IN) and give a jndi name (jms/CSMB_BT_IN)

  • Associate it to the sub-deployment and target to the JMS Server.

  • The final result is like that


This are all the steps needed to create a Queue in weblogic 10.3.6 associated to a JNDI-NAME.




jueves, 15 de diciembre de 2016

Weblogic Jboss Migration issue 1: javax.naming.NameNotFoundException: env/jmx/runtime



Migración Weblogic - Jboss problema 1: obtener el Servidor MBeans


I my new job, we have to migrate original web applications deployed in a Weblogic 10.6.3 Application Server to Jboss EAP6 (Jboss AS7).

This post is about the first problem that i have found. The problem is how to instantate the MBeanServer object that containts all my beans.


The slice of code that instantate a the MBeanServer in weblogic is like that:

//Weblogic way
InitialContext ctx = new InitialContext();
this.mbs = ((MBeanServer)ctx.lookup("java:comp/env/jmx/runtime"));

If you deploy this code in a JBoss, the common error that appears in log is the next one:
javax.naming.NameNotFoundException: env/jmx/runtime

The way to solve this issue is change the context lookup for a FactoryManager 
to get the right MBeanServer.

//JBoss way
import java.lang.management.ManagementFactory;
//another code
//another code
//.....
this.mbs=ManagementFactory.getPlatformMBeanServer();

The good news is that this way works both in Jboss and Weblogic.


viernes, 4 de noviembre de 2016

VirtualBox Centos 6 problems installing VboxGuetsAditions

Today I have installed a Centos 6 in my VirtualBox machine and i tried to create a shared folder to interchange file between de host and guest machine.







I have tried to add the GuetsAditions "inserting" the CD and installing



When i tried to install the software executing the autorun.sh




I recived in the same window the next error:

Look at /var/log/vboxadd-install.log to find out what went wrong

When I opened the file the error is the next one:

Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop


The problem is that you not have installed all the linux headers properly in your machine.

I recommend two steps:

1 - yum update 

In order to update all your virual machine specially if have been recently installed.

2 - yum install kernel-devel 

This package provides kernel headers and makefiles sufficient to build modules against the kernel package.

Restart your Centos virtual machine and try to execute again the autorun.sh

Evething works!!!