Tuesday, November 27, 2012

RESTful web service


REST - Representational State Transfer

In the REST architectural style, data and functionality are considered resources and are accessed using Uniform resource Identifiers.
In the REST architectural style, clients and servers exchange representations of resource by using standardized interface and protocol.

The pricnciples supports the RESTful webservices to be simple, leightweight and fast.

1. Resource identification through URI :
- exposes a set of resources that identify the target of the interaction with its clients.
- resources are identified by URIs
2. Uniform Interface
- resources are manipulated using CRU operations : PUT, GET, POST and DELETE
PUT - creates a new resource
GET - retrieves the current state of a resource in some representation.
DELETE - deletes the resource.
POST - transferes a new state on to a resource.
3. Self Descriptive Messages
- resources are decoupled from their representation so that their content can be accessed in a variety of formats.
- Metadata about the resources are available.
4. Stateful interactions through hyperlink.
- every interaction with a resource is staeless.
- request messages are self contained.

Root resource classes
- POJOs
- annotated with @Path
or atleast one method annotated with @Path
or request method designator - @GET/ @PUT/ @POST/ @DELETE

- Resource methods - methods of a resource class annotated with a request method designator.

Sunday, November 18, 2012

Online Study : A Knowledge Sharing System - Online Project

Change the oracle database user password



How to change a oracle database user password in console?

Connect to the database using sysdba user by below command,

sqlplus "/as sysdba"

Then chnage the user password using the below command,

alter user <user> identified by <password>;

The account is locked : Oracle Database


While creating the jdeveloper database connection, I got this error. I have to unlock the <user>. For that I have connected to the sysdba user by below command,

sqlplus "/as sysdba"

then I have pasted the below commants.

alter user <user> account unlock;

grant connect, resource to <user>;

Monday, November 5, 2012

Failed to Load VirtualBox image - VT-x features locked or unavailable in MSR


Failed to Load VirtualBox image.

While loading the virtual box existing image after the importing, I got the following error.

Failed to open a session for the virtual machine XP.

VT-x features locked or unavailable in MSR. (VERR_VMX_MSR_LOCKED_OR_DISABLED).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}

To solve the issues, I opened the image settings and did the following changes.

This changing your bios settings of your virtual machine for the first load.