Showing posts from 2014

JBoss AS 7.1.1 and HornetQ Clustering in two nodes

Fist follow

Check the  domain.xml configuration in the Master node  ( for profile - full-ha part) for the things marked yellow

Code as well as the domain.xml configuration  and the ports to be open is in GitHub

(Tested with AS 7.1.1)



Will create a message/messages and send to MROQueue ; The MROExecutorMDB will receive it and post a message to MROTopic which will be received by MROControllerMDB in both the master and slave nodes

(Deploy MROController.ear and MROExecuotor.ear to only other-server-group ( , connect to master and deploy)

Exposing REST interface from a Session Bean

Here is a working example  at Tested with JBOSS AS 7.1.1. Note that a war file is needed in the ear, with a web.xml . This is using JBOSS inbuilt RESTEasy.

Idea from Adam Bein's  blog -

Apache CXF and Spring
And finally à -->
Follwing maven settings injroller
Reading a little from Spring I understood that this is actually the applicationcontext.xml and cxf is somehow cooking its beans with Spring

< bean id="cxf" class="org.apache.cxf.bus.spring.SpringBus" destroy-method="shutdown" / >     < bean id="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor"                 class="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor" / >     < bean id="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor"                 class="org.apach…

JavaScript (Prototypal) Inheritance with new and Object.create

//--------------------------- //Inheritance in JavaScript //--------------------------- var Person = function (string){ string; //if ( !(this instanceof Person) ) //part soln to danger 1 // return new Person(name); }; Person.prototype.get_name = function(){ return; }; //Danger 1 : No compile errors here if new is skipped //Also inside the function would now be the global this object, //not the new instance! The constructor would be overriding all sorts //of global variables inadvertently var manu = Person("Manu"); name; manu.get_name(); //Danger 1 :only run time error here;Crackford's reason var adi = new Person("Adi"); adi.get_name(); //Okay let us try Iheritance with new var Employee = function (name,company){ = name;;,name); }; Employee.prototype.get_company = function(){ return this.comany; }; //How to inherit from Person ? //Step 1 - Link the prototypes …