Friday, June 7, 2013

How do I lookup a JNDI Datasource from outside a web container

   Another interesting request from different project.
Problem : While doing the UnitTesting, team was not able to execute their unit tests outside Web/App container[IBM Websphere]. Couple of issues, and out of which the main issues were -
# The classpath problem as most of the libraries and other projects were not visible with JUnit Cases / Projects.
# JNDI lookup failed especially for Datasource connection.
Solution -
Classpath issues can be solved without much effort and its more or less depends on specific project configuration. One way is to add something below to the ".classpath" file of the JUnit project.
<classpathentry kind="lib" path="C:/WSAD/MyJUnitProject/lib"/>
Am more curious to discuss the solution for JNDI lookup. There are multiple solutions I feel, let me explain one by one, and finally my favorite.
 
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
prop.put(Context.PROVIDER_URL,"iiop://localhost:2811"); <Or 2809, the standard port>
InitialContext init = new InitialContext(prop);
DataSource ds = (DataSource) init.lookup("jdbc/testDS");
 
Solution 0:  JNDI Lookup issue
Step 0 : Added the code mentioned in the following link. This has been updated in BaseTest.setUp() method.
Hashtable<Object, Object> env = new Hashtable<Object, Object>();
env.put(Context.INITIAL_CONTEXT_FACTORY,  "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:8998"); // corbaloc:iiop:localhost:8998
Context initialContext = new InitialContext(env);        
// InitialContext ic = BeanHelper.getInitialContext();
System.out.println("******** setting InitialContext");
initialContext.createSubcontext("java:");
initialContext.createSubcontext("java:/comp");
initialContext.createSubcontext("java:/comp/env");
initialContext.createSubcontext("java:/comp/env/jdbc");
initialContext.createSubcontext("java:/comp/env/jdbc/MyDataSource");
Step 1 : Added the following Jars in the classpath -> naming.jar, namingclient.jar
Step 2 : Added the DB2 DataSource classes/JARs -> db2jcc.jar, db2jcc_license_cu.jar, db2policy.jar
Step 3 : Make sure the JRE is from IBM Websphere.
Step 4 : Bind the ConnectionPoolDataSource with the JNDI context.
DB2ConnectionPoolDataSource ds = new com.ibm.db2.jcc.DB2ConnectionPoolDataSource();
ds.setServerName("SERVERNAME");
ds.setDataSourceName("DATASOURCE");
ds.setDatabaseName("DBNAME");
 ds.setPortNumber(40408);
 ds.setUser("USERID");
 ds.setPassword("PASSWORD");
 initialContext.bind("java:/comp/env/jdbc/IOIDataSource", ds);
Step 5 : Adding thin clients :
Include the thinclient-jars to your buildpath. You will need them to do a jndi lookup from a standalone client.
%WAS_HOME%/runtimes is where they can be found.
Step 6 : Add com.ibm.ws.admin.client_7.0.0.jar from runtime

Solution 1 : With apache libraries
Step 0 : Change the Context.INITIAL_CONTEXT_FACTORY to "org.apache.naming.java.javaURLContextFactory"
Step 1 :  properties.put("java.naming.corba.orb",org.omg.CORBA.ORB.init(new String[] {}, null));
Step 2 :  Add two apache libraries, available in Tomcat.
Step 3 : Update JNDI lookup to J2EE standard -> java:comp/env/jdbc/MyDataSource
Step 4 : Add the dependency libraries - juli-6.0.18.jar and catalina.jar
 
Solution 2 :
# Create the JUnitLocalDataSource, we can extend any Datasource implementation
public class JUnitLocalDataSource extends DB2DataSource{
private String serverName = "SERVERNAME";
private String dataSourceName = "DS_SOURCE";
private String databaseName = "DBNAME";
private int portNumber = 40408;
private String user = "USER";
private String password = "PASSWORD";
public JUnitLocalDataSource(){
    System.out.println("******** configuring DB2ConnectionPoolDataSource");
    setServerName(serverName);
    setDataSourceName(dataSourceName);
    setDatabaseName(databaseName);
    setPortNumber(portNumber);
    setUser(user);
    setPassword(password);
}
public JUnitLocalDataSource(String serverName, String dataSourceName, String databaseName, int portNumber, String user, String password ){
    setServerName(serverName);
    setDataSourceName(dataSourceName);
    setDatabaseName(databaseName);
    setPortNumber(portNumber);
    setUser(user);
    setPassword(password);
}
# Create JUnitContextFactory class.
public class JUnitContextFactory implements  InitialContextFactory, InitialContextFactoryBuilder {
private static JUnitContextFactory jUnitContextFactory = null;
public JUnitContextFactory() throws NamingException{
super();
}
public JUnitContextFactory(Hashtable<?, ?> envmt) throws NamingException{
super();
}
public InitialContext getInitialContext(Hashtable<?, ?> environment) throws NamingException {
LocalContext localContext = null;
        try{
                localContext = new LocalContext(environment);
                NamingManager.setInitialContextFactoryBuilder(this);
        }catch(Exception exception){
                exception.printStackTrace();
        }
            return pliContext;
    }
 
@Override
public InitialContextFactory createInitialContextFactory(
Hashtable<?, ?> envmt) throws NamingException {
if(jUnitContextFactory == null){
jUnitContextFactory = new JUnitContextFactory();
}
return jUnitContextFactory;
    }
}
 
# Create LocalContext class
public class UserContext extends InitialContext {
private static DataSource localDataSource;
private static Properties prop = new Properties();
private LocalContext(Properties properties) throws NamingException {
super(properties);
loadLocalDataSource();
}
public PLIContext(Hashtable<?, ?> properties) throws NamingException {
super();
loadLocalDataSource();
}
public void loadLocalDataSource(){
try {
if(localDataSource == null || localDataSource.getConnection() == null){
localDataSource = new JUnitLocalDataSource();
            prop.put("jdbc/IOIDataSource", localDataSource);
            prop.put("java:comp/env/jdbc/MyDataSource", localDataSource);
}
} catch (SQLException e) {
e.printStackTrace();
}
}
 
    @Override
    public Object lookup(String name) throws NamingException  {
        try {
            Object value = prop.get(name);
            return (value != null) ? value : super.lookup(name);
        }
         catch(Exception e) {
             e.printStackTrace();
         } 
         return name;           
    }
}
# Add the following code to the "setUp()" method of the BaseUnitTest class or wherever required.
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.pru.JUnitContextFactory");
properties.put(Context.PROVIDER_URL, "iiop://localhost:2809");
properties.put("java.naming.corba.orb",org.omg.CORBA.ORB.init(new String[] {}, null));
JUnitContextFactory contextFactory = new JUnitContextFactory();
InitialContext iniCtx = contextFactory.getInitialContext(properties);
 
We can optimise these classes, or combine all these into single class, which am leaving to you to explore. Enjoy coding.

Migrating IBM WAS 6.x enterprise applications to WAS 7.x / WAS 8.x

Please find my quick note on migrating IBM WAS 6.x applications to WAS 7.x/WAS 8.x. This is specific to some project, but could be customized for general needs.

Question 0 : Why do we need to migrate WAS 6.x to WAS 7.x ?

ANS : Please refer IBM WAS End of Support chart ->
http://www-01.ibm.com/software/support/lifecycleapp/PLCSearch.wss?q=WAS&scope=S962652E67398D77-X007925I73652A47&ibm-search.x=12&ibm-search.y=11&ibm-search=Search&sort=E


 
Question 1 : If we have decided to migrate, then why are we going for WAS 7.x instead of WAS 8.x, could save another near future migration project.

ANS : We can, but we need to see whether the libraries supported by WAS 6.x are supported by WAS 8.x as well. The RED marked ones are of little bit concern.
 

So we need to identify the libraries used in current application, and see their compatibility with the new IBM WAS 7.x or IBM WAS 8.x

Apart from these, there is a performance bonus as well.

 
Please refer this guide for finding the advantages of WAS 8.x migration.
http://www.ibm.com/developerworks/websphere/techjournal/1206_alcott/1206_alcott.html
 

Question 2 : Do we have any step by step procedure for the same

ANS : IBM has published standard guideline for migration, please find the same here -
http://publib.boulder.ibm.com/infocenter/prodconn/v1r0m0/topic/com.ibm.scenarios.wmqwasmig2v7.doc/wmq_was_mig2v7.pdf

For migrating Messaging part, please refer the following guide
http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fah14130_.htm
 

Question 3 : Any migration tools available with IBM or with any third party ?

Yes, but not sure how far it can work on specific applications/environments, but nothing wrong in having a try.

http://www.ibm.com/developerworks/websphere/library/techarticles/0812_luchini/0812_luchini.html
 

Question 4 :  What are the risks involved and their mitigations ? Any historical information ?

Some issues and mitigations from historical information.
http://bairdblog.wordpress.com/2009/11/20/migrating-from-websphere-6-0-to-websphere-7-0/
 

Question 5 : Any other references ?


This shares some of the interesting migration issues with "Weblogic" server migration, which I feel stands valid for IBM WAS as well.
http://docs.oracle.com/cd/E19747-01/819-0083/mgmistr.html

SQL Injection, Java perspective

Here are my two cents from Java Perspective.
 
The principal behind SQL injection is pretty simple. When an application takes user data as an input, there is an opportunity for a malicious user to enter carefully crafted data that causes the input to be interpreted as part of a SQL query instead of data.
 
For example, imagine this line of code:
 
SELECT * FROM Users WHERE Username='$username' AND Password='$password'
 
which is designed to show all records from the table "Users" for a username and password supplied by a user. Using a Web interface, when prompted for his username and password, a malicious user might enter:
 
1' or '1' = '1
 
1' or '1' = '1
 
resulting in the query:
 
SELECT * FROM Users WHERE Username='1' OR '1' = '1' AND Password='1' OR '1' = '1'
 
The hacker has effectively injected a whole OR condition into the authentication process. Worse, the condition '1' = '1' is always true, so this SQL query will always result in the authentication process being bypassed.
 
PreCautions :
# Always use java.sql.preparedStatement instead of Statement

 
# If you project is using EQL instead of SQL, then more safe.
as this has to be translated yet again from EQL to SQL, which gives more opportunity for the intervening software (JPA and the JDBC driver) opportunity to prevent a SQL injection from happening.

 
This explained in detail @ http://www.cisco.com/web/about/security/intelligence/sql_injection.html
 
https://www.owasp.org/index.php/Preventing_SQL_Injection_in_Java
 
Cheat SHEET -> https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet
 
Read more on SQL Injection @ https://www.owasp.org/index.php/SQL_Injection                        

cloud

That’s interesting,

I've seen Android ONLY in tablets and mobile devices, never on any laptops / desktops. But thats going to change. Couple of ways to have the Android OS running on my laptop/desktop, and it saved myself from purchasing Android Tablet for my kid, and his eyes from gaming on small 7inch tablet.

Three ways we can do, as far as I know.
0. Installing Android OS as separate OS on my Windows Laptop/desktop with dual boot.
Pros : Its very small OS and runs pretty fast with the power of desktop/laptop resources. COOL.

Cons : Changing my laptop to dual boot, I dont like it.
Installation procedure -
http://www.android-x86.org/documents/installhowto

1. Installing Android OS on my USB memory stick, and switching the boot to USB first, then HDD.
Pros : Thats interesting, no impact on my HDD and its running COOOOL. It runs as a BIG ANDROID Tablet and its pretty fast.

Cons : Download space is limited and for me the downloaded apps are not retaining in the sessions. We cant access the laptop files. Since it is acting as a layer between Android OS and Native OS, this needs to be matured enough to run all types of Android Applications. Hope BlueStack will make a better release soon.
Other details

You can install new Android applications with the included AndAppStore, though these will only be installed while this Android session is running.  If you reboot your computer, you’ll only see the default applications and settings again, cant help.
http://www.howtogeek.com/howto/22665/run-android-on-your-netbook-or-desktop/

2. Anybody heard of BLUE STACK - http://en.wikipedia.org/wiki/Bluestack_Way
But I actually mean - http://bluestacks.com/

This is Android App player application running on Windows / Mac, which acts as a layer between Android Applications and the underlined native OS.

Pros : No USB, No memory storage limitations, can be executed as antoher Windows Application, retains the installed Android Applications. IT SUPPORTS MAC  as well, so good for those who develop apps for iPhone as well as Android.

Cons : It doesnt give the exact feel of Android Tablet. It tries to mimic, but still far away from the real feel. But we can access AppStore/GooglePlay and do what ever we would like to do with Android device. I havent tested the camera / voice feature, so no comments on that.

The Bluestacks app player can actually play the Android apps faster than on an Android powered smartphone. I can connect my Android Phone to my BlueStack @ laptop via Cloud Connect App.

FUTURE Developments :
Making Android port natively on to x86 Windows.


http://thenextweb.com/apps/2013/01/25/windowsandroid-goes-above-and-beyond-bluestacks-lets-you-run-android-4-0-natively-on-your-pc/

Can we develop iOS applications on a NON APPLE HARDWARE ?

Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows?

For developing iOS applications as NATIVE, we need XCODE development platform which is provided by MAC OS ONLY. So if we would like to develop any native iOS application we MUST have MAC OS running on some hardware, else we need to find other alternative options.

Am not sure whether Apple has any plans to sell MAC OS as Windows OS which can be installed on any Intel/AMD hardware platform, and I believe it make take little more time.

Lets explore the alternative options, and my favorite.

0. Install MAC OS on Intel Machine purchased by you.

Legally, when we purchase Mac OS its ours to use, but when we install the OS we agree to RUN IT ON A MAC MACHINE.

It violates the legal Terms of Use that you agree to when you purchase any version of OSX. Please refer the link for more details.

http://images.apple.com/legal/sla/docs/OSX1082.pdf


1. Virtual Machine

This requires modifying (or using a pre-modified) image of Leopard that can be installed on a regular PC.

If you purchase (or already own) a version of Leopard then this is a gray area since the Leopard EULA states you may only run it on an "Apple Labeled" machine. As some of the guys pointed out that if you stick an Apple sticker on your PC you're probably covered, but am not sure.

The EULA[End-User License Agreement] for the workstation version of Leopard prevents it from being run under emulation and as a result there's no support in VMWare for this. Leopard server however CAN be run under emulation and can be used for desktop purposes. Leopard server and VMWare are expensive however, so not an intelligent than buying a MAC System itself.

Please refer the following links for more details for making  MAC OS running on VMs.

http://geeknizer.com/how-to-install-snow-leopard-vmware-workstation-windows/

http://geeknizer.com/install-snow-leopard-virtualbox/

The experienced says, the virtual machine solution is unusably slow to use.

2. Dual Boot

Another option for installing MAC OS on Intel platform as dual boot, still am not sure about the EULA whether it permits to do so. Since it is not legal, I would like to support Apple's interest and not making you to violate any Legal terms.

3. Cross platform development / Third party iPhone development.

There are several cross platform development frameworks/ platform available, in different flavors, and I will share the most important ones.

DragonFireSDK : http://www.dragonfiresdk.com/

PhoneGap : http://phonegap.com/

Titanium SDK : http://www.appcelerator.com/platform/titanium-sdk/

Airplay SDK : http://www.madewithmarmalade.com/

There are other Jquery based Cross platform SDKs for iOS development.

After building iOS application using these applications, we need a Mac to sign and test your application and be in compliance with Apples terms of use.

4. and my favorite - Mac OS on cloud

There are different service providers who provide different versions of MAC Machines with Xcode for iOS development.

http://www.macminicloud.net/ : Provides MAC MINI Computers, 100% dedicated OS X Mountain Lion.

They have some offers to explore newbies, and the base version is absolutely free by just paying for Bandwidth only.

http://www.macincloud.com/ : Another service provider who provides Mac system for rental, we can virtually own a MAC in the cloud.

EMERGING TECHNOLOGY DISCUSSION - Season 2013

Welcome to next season of EMERGING TECHNOLOGY DISCUSSION

Here are my picks -

# According to World Economic Forum and Global Agenda Council, the top emerging technologies are -
http://forumblog.org/2013/02/top-10-emerging-technologies-for-2013/

But most of the thoughts are outside the IT, still good to know, out of which my favorite 3 are -
- CO2 conversion and use, to reduce pollution.
- Organic electronics and Photovoltaics
- Fourth generation reactors and nuclear waste recycling

Washington Post and Nasdaq also agrees with them and published the same.
http://www.washingtonpost.com/national/on-innovations/top-10-emerging-technologies-for-2013/2013/02/13/23ff415c-753b-11e2-aa12-e6cf1d31106b_gallery.html#photo=1

http://www.nasdaq.com/article/these-are-the-10-most-important-emerging-technologies-in-2013-cm218594#

# Computer world, has dynamic list, ever changing -
http://www.computerworld.com/s/topic/128/Emerging+Technologies

Most of them are related to astronomics and nano science.

# MIT has different feeling and they published their research here -
http://www2.technologyreview.com/featured-story/402435/10-emerging-technologies-that-will-change-your/



Coming to IT Sector,
Top consulting firm, Gartner has published Top Strategic Technology trends based on their research, and I would like to agree with most of them.
http://www.gartner.com/technology/research/top-10-technology-trends/

# Forrestor has published another top 15 emerging technologies, -
http://www.zdnet.com/forresters-top-15-emerging-technologies-to-watch-7000011065/

# If you are there at US, there is a good chance to hear and discuss top emerging technologies. McGladrey is conducting few seminars on the same, and please find the details here -
https://mcgladrey.com/Events/2013-Emerging-Technology-Conference

Interesting to know that IBM, Oracle, SAP, Google and other major software organisations have published their TOP 10 based on their products/business and marketing themselves as the ONLY Solution provider, not my pick anyway.


and finally MY TOP PICKS

0. Cross Mobile Platforms - 
As the healhty competition between Mobile OS gaints on Windows, iOS, Android, Maemo platforms; it is bit cumbersome to spend effort and money to develop applications for each platforms. Watch Crossplatform Mobile Development platform - Titanium, PhoneGap, Rhomobile, AppMobi, Sencha.

1. Infrastructure as Service, including public, private and hybrid -
As most of the money spent on Hardware than developing software and maintaining, organisations has started moving to cloud to save huge intial expense and maintenance hassles.

2. Collaboration and Social platforms
Do you remember Zawinski's law of software envelopment - which states
"Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can"

http://en.wikipedia.org/wiki/Jamie_Zawinski#Zawinski.27s_law_of_software_envelopment

I think its time to rephrase as
"Every program attempts to expand until it can collaborate with social network. Those programs which cannot so expand are replaced by ones which can"

3. Sensor Systems connected with Smart Cloud computing
Already started the initiation of two way smart energy meters, RFID, Digitization of transportation/tracking systems, in-location positioning devices, machine to machine networks; all integrated with cloud systems.

4. Enterprise Search and semantic platform for Business Intelligence

The world has more data in last two years, than what we had in last 98 years. We need to improvice our search capabilities that brings data which is relevant and specific to what user is looking for.

More innovations are required in the field of Advanced analytics, pervasive BI, Actionable Analytics including data in various devices, parsing for generating statistical data for future business.

5. Web based cross platform apps - HTML5 / CSS3 / JQuery / Ajax etc compatible across devices
Those times are gone where we develop applications for specific desktop / browsers, as more and more mobile / smart devices are taking over the market, its time to think of software development technology which is light weight and run on all devices without any compromises.

TOP 5 books on various subjects - Java / Design / Enterprise Java / Open Source / Mobile / Cloud

Top 5 books on the following subjects.

JAVA :

The Java Tutorial: A Short Course on the Basics (5th Edition) - Sharon Biocca Zakhour, Sowmya Kannan, Raymond Gallardo
http://www.amazon.com/dp/0132761696

Sun Certified Programmer & Developer for Java 2 Study Guide (Exam 310-035 & 310-027) - Kathy Sierra, Bert Bates
http://www.amazon.com/exec/obidos/ASIN/0072226846

Effective Java (2nd Edition) - Joshua Bloch
http://www.amazon.com/dp/0321356683

The Java Programming Language (4th Edition)- Ken Arnold , James Gosling , David Holmes
http://www.amazon.com/dp/0321349806

Bitter Java- Bruce Tate
http://www.amazon.com/exec/obidos/ASIN/193011043X


Java Design / Design Patterns : 

Head First Design Patterns- Elisabeth Freeman, Bert Bates,  Kathy Sierra, Elisabeth Robson 
http://www.amazon.com/exec/obidos/ASIN/0596007124

Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development (3rd Edition) - Craig Larman
http://www.amazon.com/exec/obidos/ASIN/0131489062

Applied Java Patterns- Stephen Stelting, Olav Maassen
http://www.amazon.com/exec/obidos/ASIN/0130935387

Refactoring to Patterns  - Joshua Kerievsky
http://www.amazon.com/exec/obidos/ASIN/0321213351

AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis - William J. Brown, Raphael C. Malveau, Hays W. McCormick, Thomas J. Mowbray
http://www.amazon.com/exec/obidos/ASIN/0471197130


Enterprise Java

Expert One-on-One J2EE Design and Development  - Rod Johnson
http://www.amazon.com/exec/obidos/ASIN/0764543857

EJB Design Patterns: Advanced Patterns, Processes, and Idioms - Floyd Marinescu
http://www.amazon.com/exec/obidos/ASIN/0471208310

J2EE Best Practices: Java Design Patterns, Automation, and Performance (Wiley Application Development Series)  -Darren Broemmer
http://www.amazon.com/exec/obidos/ASIN/0471228850

Enterprise Java Security: Building Secure J2EE¿ Applications - Marco Pistoia, Nataraj Nagaratnam, Larry Koved, Anthony Nadalin
http://www.amazon.com/exec/obidos/ASIN/0321118898

Effective Enterprise Java - Ted Neward
http://www.amazon.com/exec/obidos/ASIN/0321130006

J2EE 1.4: The Big Picture - Solveig Haugland, Mark Cade, Anthony Orapallo
http://www.amazon.com/dp/0131480103

Java Enterprise Best Practices - Robert Eckstein, J. Steven Perry, O'Reilly Authors (Editor)
http://www.amazon.com/dp/0596003846


Advanced / Integration Patterns

Patterns of Enterprise Application Architecture - Martin Fowler
http://www.amazon.com/exec/obidos/ASIN/0321127420

Core J2EE Patterns: Best Practices and Design Strategies - Dan Malks, Deepak Alur, John Crupi
http://www.amazon.com/exec/obidos/ASIN/0130648841

Service Design Patterns: Fundamental Design Solutions for SOAP/WSDL and RESTful Web Services - Robert Daigneau
http://www.amazon.com/exec/obidos/ASIN/032154420X

J2EE AntiPatterns - Bill Dudney, Stephen Asbury, Joseph Krozak, Kevin Wittkopf
http://www.amazon.com/exec/obidos/ASIN/0471146153

SOA Design Patterns (The Prentice Hall Service-Oriented Computing Series from Thomas Erl) - Thomas Erl
http://www.amazon.com/exec/obidos/ASIN/0136135161


Open Source :

Hibernate in Action (In Action series) - Christian Bauer, Gavin King
http://www.amazon.com/exec/obidos/ASIN/193239415X

Better, Faster, Lighter Java - Bruce A. Tate, Justin Gehtland
http://www.amazon.com/exec/obidos/ASIN/0596006764

Struts Recipes - George Franciscus, Danilo Gurovich
http://www.amazon.com/exec/obidos/ASIN/1932394249

Spring in Action - Craig Walls
http://www.amazon.com/exec/obidos/ASIN/1935182358

The Definitive Guide to Apache MyFaces and Facelets (Expert's Voice in Open Source) - Zubin Wadia, Martin Marinschek, Hazem Saleh, Dennis Byrne
http://www.amazon.com/exec/obidos/ASIN/1590597370


Service Oriented Architecture

Service-Oriented Architecture: A Field Guide to Integrating XML and Web Services (The Prentice Hall Service-Oriented Computing Series from Thomas Erl) - Thomas Erl
http://www.amazon.com/exec/obidos/ASIN/0131428985/

Service-Oriented Architecture (SOA): Concepts, Technology, and Design - Thomas Erl
http://www.amazon.com/exec/obidos/ASIN/0131858580/

SOA Principles of Service Design - Thomas Erl
http://www.amazon.com/exec/obidos/ASIN/0132344823/

SOA with REST: Principles, Patterns & Constraints for Building Enterprise Solutions with REST (The Prentice Hall Service Technology Series from Thomas Erl) - Thomas Erl, Benjamin Carlyle, Cesare Pautasso, Raj Balasubramanian
http://www.amazon.com/exec/obidos/ASIN/0137012519/


Mobile Development -

Hello, Android: Introducing Google's Mobile Development Platform (Pragmatic Programmers) - Ed Burnette
http://www.amazon.com/exec/obidos/ASIN/1934356565

Professional Android 4 Application Development - Reto Meier
http://www.amazon.com/exec/obidos/ASIN/1118102274

Programming in Objective-C (5th Edition) (Developer's Library) - Stephen G. Kochan
http://www.amazon.com/exec/obidos/ASIN/032188728X

iOS Programming: The Big Nerd Ranch Guide (3rd Edition) (Big Nerd Ranch Guides) - Joe Conway, Aaron Hillegass
http://www.amazon.com/exec/obidos/ASIN/0321821521

Unlocking Android: A Developer's Guide - Frank Ableson, Charlie Collins, Robi Sen
http://www.amazon.com/exec/obidos/ASIN/1933988673


Cloud Computing :

Cloud Computing: Concepts, Technology & Architecture (The Prentice Hall Service Technology Series from Thomas Erl) - Thomas Erl, Ricardo Puttini, Zaigham Mahmood
http://www.amazon.com/exec/obidos/ASIN/0133387526

Cloud Application Architectures: Building Applications and Infrastructure in the Cloud (Theory in Practice (O'Reilly))  -George Reese
http://www.amazon.com/exec/obidos/ASIN/0596156367

Cloud Security and Privacy: An Enterprise Perspective on Risks and Compliance (Theory in Practice) - Tim Mather, Subra Kumaraswamy, Shahed Latif
http://www.amazon.com/exec/obidos/ASIN/0596802765

OpenStack Cloud Computing Cookbook - Kevin Jackson
http://www.amazon.com/exec/obidos/ASIN/1849517320

Cloud Computing: Web-Based Applications That Change the Way You Work and Collaborate Online - Michael Miller
http://www.amazon.com/exec/obidos/ASIN/0789738031


Other Software Development Books.
The Web Application Hacker's Handbook: Finding and Exploiting Security Flaws - Dafydd Stuttard, Marcus Pinto
http://www.amazon.com/dp/1118026470

Agile Software Development, Principles, Patterns, and Practices - Robert C. Martin
http://www.amazon.com/exec/obidos/ASIN/0135974445

Java Transaction Processing: Design and Implementation - Mark Little, Jon Maron, Greg Pavlik
http://www.amazon.com/exec/obidos/ASIN/013035290X

Java Transaction Design Strategies - Mark Richards
http://www.amazon.com/exec/obidos/ASIN/1411695917

Real World Java EE Patterns-Rethinking Best Practices - Adam Bien
http://www.amazon.com/exec/obidos/ASIN/1300149310

Want to learn new programming language ?

7 Easy Ways to Learn Coding and Computer Science for Free
http://dailytekk.com/2012/01/29/6-easy-ways-to-learn-coding-and-computer-science-for-free/

Code Academy -> PHP, JQuery, Javascript, Python, PHP and many more.
http://www.codecademy.com/

UDACITY -> Interactive classes for  HTML5 development, Cryptography etc.
https://www.udacity.com/

KHAN Academy -> For programming basics.
https://www.khanacademy.org/

CodeYear
http://www.codeyear.com/

CourseHero -> Good for iOS[iPhone mobile development], Android, Linux, JQuery, PhP, HTML5, CSS3, Javascript and many more.
http://www.coursehero.com/