Posts

Showing posts from February, 2014

Apache CXF and Spring

http://cxf.apache.org/docs/writing-a-service-with-spring.html http://cxf.apache.org/docs/jax-ws-configuration.html http://cxf.apache.org/docs/configuration.html And finally à http://stackoverflow.com/questions/689902/cxf-without-spring --> http://cxf.apache.org/docs/servlet-transport.html#ServletTransport-UsingtheservlettransportwithoutSpring   Follwing maven settings in   jroller http://www.jroller.com/gmazza/entry/web_service_tutorial 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.Jsr25

JavaScript (Prototypal) Inheritance with new and Object.create

//--------------------------- //Inheritance in JavaScript //--------------------------- var Person = function (string){ this.name= string; //if ( !(this instanceof Person) ) //part soln to danger 1 // return new Person(name); }; Person.prototype.get_name = function(){ return this.name; }; //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){ this.name = name; this.company=company; Person.call(this,name); }; Employee.prototype.get_company = function(){ return this.comany; }; //How to inherit from Person ? //Step 1 - Link the prototypes /