Wednesday, September 18

Top Java News- September 18 ,2013








Java Developer Here Is The City
Java Developer required at a leading investment bank in the city offering fantastic ... My client are looking for a Java Developer from a Computer Science (or ...
See all stories on this topic »
As many as 80% of the world's PCs may be running exploitable Java ... GMA News
As many as four out of five PCs running Microsoft's Windows are running outdated versions of Java and may be vulnerable to attack, a security vendor warned.
See all stories on this topic »





Darkleech campaign targets Java to spread Reveton ransomware V3.co.uk
The Darkleech campaign responsible for compromising thousands of websites has resurfaced, targeting Java and Adobe vulnerabilities to spread the Reveton ...
See all stories on this topic » 
 
Automation Tester | C# or Java | Test Automation Frameworks Here Is The City
My client is a top financial services vendor in London and are urgently in the market for several skilled Automation Testers to join their team. My client builds ...
See all stories on this topic »
Tech Lead (JAVA) Emirates 24/7
Tech Lead (JAVA) PRONTO SOFTWARE. Candidate Requirements • Degree in information Technology; • At least 4 years of experience in software ...
See all stories on this topic »
JAVA Developer Bizcommunity.com
We will only be getting back to applicants that meet all of the above requirements. Should you not receive a response from us within 2 weeks you can deem your ...




See all stories on this topic »
Making Java Groovy: JavaRanch this week | Stuff I've learned ... Ken Kousen
This week Making Java Groovy is the featured book at JavaRanch, where I've been a member for many years. JavaRanch is yet another of Kathy Sierra's (and ...
Stuff I've learned recently...
 

Tuesday, September 17

CQ5 Author or Publisher instance is down due to OutOfMemoryError.








Overview
OutOfMemoryError can occur any time in heap due to insufficient heap memory being available for new Java objects creation. CQ Author/Publisher will eventually crash due to OutOfMemoryError and would need to be restarted.
  
Issue
CQ5 Author or Publisher instance is down due to OutOfMemoryError.







Resolution

1.     
2.    Access all publisher and author instances and note which all instances are not responding. 
 
3.      For all instances not responding Access CRX error logs Note down which all instances are throwing OutOfMemoryError. In error log OutOfMemoryError can be searched by searching file content for string ”OutOfMemoryError






4.    For every publisher instance throwing OutOfMemoryError follow the below steps: 
5.      Execute Datastore Garbage Collection operation in configuration repository.  To execute this operation visit http://:/system/console/memoryusage for the publisher instance and click on runDataStoeGarbageCollection operation as shown below.




6.    This should free up some memory.
7.    Stop the server by executing
8.    Start the server by executing
9.    Access the publisher instances and note which all publishers are not responding.
10. If all publishers instances are responding well issue is resolved.

Interface Segregation Principle(ISP) - Java design principals , OOPS design principals ,Object oriented design principals , How to design interface in java







Interface Segregation Principle stats that, a client should not implement an interface, if it doesn't use that.

What exaclt does that mean ?

Let's understand this

Consider there is one interface Travel

Travel has two methods

travelbyBus()

travelByTrain()


Now there is one class Passenger . Passenger will always travel by bus .
 

if Passenger class implements Travel interface

Passenger implements Passenger {

travelbyBus(){
}

travelByTrain(){
}

}


It is forced to implement both the methods travelByBus() and travelByTrain() , thought Passenger has nothing to do with travelByTrain().


Now lets read the principal again

Interface Segregation Principle stats that, a client should not implement an interface, if it doesn't use that.

Client Passenger should not be forced to implement travelByTrain() method as it never needs it.








Here comes the Interface designing best practice .

An interface design should be very thoughtful. It should always take in consideration all its possible clients and should always make interface design client friendly.


So could that be achieved?

 Instead of creating one interface for both methods , two separate interfaces could be designed

like :

BusTravel{

travelByBus();
}


TrainTravel{

travelByTrain();
}



Passenger class can implement BusTravel interface and will not be forced to implement anymore method.




Thus Interface Segregation Principle(ISP) basically recommend to design the interfaces taking in consideration holistic ststem and all poosible clients.

Monday, September 16

Liskov Substitution Principle (LSP) : Design Principal , Java Design Principal






Liskov Substitution Principle (LSP)

According to Liskov Substitution Principle, methods or functions which uses super class type must be able to work with object of sub class without any issue".


Let us understand this with an example 


 

Public class Cat extends Animal {
}



public class Animal{
}


Public class TestLSP{


public void execute(Animal animal){

}
public void executor(){

Animal animal =new Animal();

execute(animal);
 

Cat cat = new  Cat();
execute(cat);
}






So we are able to call execute method from executor method by passing Animal class instance as well as Cat class instance .

 Cat class extends Animal So is subclass to Animal class

Thus Animal class parameter expected in executor method works well with Animal as well as subtype Cat type of instance . that's what LSP says. 






Java J2ee Oracle JDK Hibernate latest newsa







Google Web Designer tool to make HTML5 on mobile a reality? TechTarget
Not sure if you've heard the news, but Google is about to release a new HTML5/CSS3 web development tool. That's apparently the inside scoop, revealed with ...
See all stories on this topic »
Learning Java, 4th Ed iProgrammer
This is a big book on Java, which isn't unreasonable given the age and maturity of the language and its environment. Its title, "Learning Java", seems to suggest ...
See all stories on this topic »
Windward to Unleash "Java Reporting Software for Cheaters" at ... DigitalJournal.com
Thousands of Java programmers from around the globe will soon experience in person Windward's unorthodox take on Java reporting software. Windward will ...
See all stories on this topic »
My Favorite Online Resources for Advanced Java Developers Java World
The ProgramCreek.com blog has recently featured two interesting posts targeted at "advanced" Java developers: Top 10 Books For Advanced Level Java ...
See all stories on this topic »






IBM Patches Multiple Java Security Vulnerabilities in IBM i IT Jungle
IBM last week acknowledged that it quietly patched a number of potentially critical security vulnerabilities in IBM i that could enable hackers to compromise, ...
See all stories on this topic »
Java Developer - Permanent - Angel TechWeekEurope UK
At Sage Pay, we recognise that every successful business needs a healthy flow of customers and money - which is why we deliver secure and efficient payment ...
See all stories on this topic » 
 
Now Hiring in Bedford: Java Web Developer, Warehouse Position ... Patch.com
Looking for a new job? Your first job? Bedford Patch is here to help with a roundup of what's available in and around town. Know of an opening that isn't listed ...
See all stories on this topic »  
 




UPDATE: Siteworx, LLC Implements Adobe Experience Manager ... DigitalJournal.com
"Siteworx' experience with Adobe CQ (now Adobe Experience Manager web content management capability) and deep understanding of Citrix's CQ platform ...
See all stories on this topic »