Posts

Showing posts with the label oracle

Getting started with Java 7

Recently out product has adapted JDK 7 for development as well as run-time. So get familiar everybody in the team with the new features of JDK , so i prepared a presentation "Getting started with Java 7". Sharing same presentation to refer you haven't still adapted JDK7.  Presentation:

Deploying Services to OC4J with RESTful support

Image
       OC4J container provide support for RESTful services. OC4J installation comes with web service assembling tool (wsa) which take an extra optional parameter to give REST support. This post explains step by step approach to implement and deply RESTful services to OC4J. 1. Interface Code package demo.service; import java.rmi.Remote; import java.rmi.RemoteException; public interface StringService extends Remote{     public String toUppercase(String str) throws RemoteException;     public String toLowerCase(String str)throws RemoteException; } 2. Implementation for Interface package demo.service; import java.rmi.Remote; import java.rmi.RemoteException; public class StringServiceImpl {     public StringServiceImpl() {     }     public String toUppercase(String str){   ...

Building WebService with Custom Serializer using JDeveloper

Image
      JDeveloper 10g comes with UI based web service assembler. It converts simple java class to web service. You can customize web service assembling using Custom Serializer in case Service class accepts pojo class as parameters or return it. This post explains creating web service from simple java class. It is considered that you have gone through previous posts – JAXB by Jdeveloper and XML Document by Jdeveloper . So you have xml schema , xml document and set of java classes generated by JAXB compilation Here is step by step approach 1.    Code a CustomSerializer , it has to implement SOAPElementSerializer and override deserialize and serialize methods. Sample code is as below package jaxb.serializer; import javax.xml.bind.JAXBException; import oracle.webservices.databinding.SOAPElementSerializer; import javax.xml.soap.SOAPFactory; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPElement; import ja...

JAXB with JDeveloper

Image
      Jdeveloper 10g comes with JAXB1.0 tool .  This tool makes XML programming just one click away.This tutorial explains using JABX compilation tool of JDeveloper. In previous post we have seen handling of XML schema and XML document . You can refer the same as prerequisite for this post . Here is the step by step approach 1. Compile xml schema 2. Mention package and Test class 3. This will generate set of java classes under mentioned java package.You will notice one interface and implementation for each complex type or node. ItemType.java and ItemTypeIMpl.java get generated for  complex types ItemType. As we had selected Main class for generation, it creates Main class for testing JAXB compilation.           4. Here is the marshalling and un-marshalling code . [ refer this post for JAXB Coding ] package jaxb.test; import java.io.File; import javax.xml.bind.JAXBContext; import javax....

Oracle Coherence Cache Mangement

Oracle has got Coherence Cache management product by acquiring Tangasole. Coherence provides data management and cacheing service. It is not just simple caching service. It provides much more than it, such as  Distributed replicated  reliable scalable  clustered  automatic load balanced  consistent  indexed  in-memory  data management.   Using Coherence, you can have distributed cache management over clustered network. IT provides several implementations , such as  Local Cache  Replicated Cache Partitioned Near Cache  The most interesting feature is ease of installation and implementation. Installation of coherence is only one step process, just include jars in path.   Following are few step to install, implement and test it [ Only basic implementation ] 1. Installation Download and unzip step up  archive from Oracle Coherence home page 2.  Update Classpath Include coherence.jar in  your CLASS_PATH, you will find this jar at  coherence_home/lib/ 3. Implement...