Venkat Viswa

Subscribe to Venkat Viswa feed
I am a Software Developer. I work for Thomson Reuters in Bangalore.venkat viswanathanhttp://www.blogger.com/profile/03996925876937680465noreply@blogger.comBlogger49125
Updated: 3 hours 33 min ago

EclipseLink : High Performance Persistence

Thu, 2009-07-16 23:48
I have used eclipselink on one of the key projects lastyear. It was donated by Oracle to Eclipse foundation. Toplink became eclipselink. I was really impressed by its implementation of JPA and customizations such as Criteria Queries. Hoping to learn more from this session.

EclipseLink Architecture

Supports JavaSE,EE,OSGi and Spring

Eclipselink solution comprises JPA implentation,Moxy,EIS,SDO(service data objects),DBWS (database webservice --> want xml from relational data ).

JPA
--> supports JPA 1.0 with many advanced features
--> simplified configuration of using annotations and/or xml.
--> Best ORM for Oracle database

Tool Support
-->EclipseLink is a runtime project supported by IDEs.
-->Eclipselink supported by Dali
-->MyEclipse
-->Oracle Jdeveloper 11g,Enterprise Pack for eclipse
--> Netbeans
--> Standalone workbench(Swing project)

Eclipselink distributions
--> Eclipse,Oracle toplink,weblogic,glassfish,spring framework,JOnAS

JPA persistence Provider(eclipselink) sits between Java SE/EE and rdbms


Core JPA Mappings

ID (primary key)
Basic (field mappings)
Relationships
OneToOne,ManytoOne,OneToMany,ManyToMany

Configurations
Persistence.xml
Mapping Annotations
Query hints
Advanced Mappings
Eclipselink orm.xml

Examples of Advanced Mappings
class level --> @Converter(name="",converterClass="")
field level --> @Convert(name="")

@PrivateOwned (coming in JPA 2.0) : doesnt exist without parent

Caching :
@Cache(type=SOFT_WEAK,coordinationType=SEND_OBJECT_CHANGES)

Optimistic locking :
@OptimisticLocking(type=CHANGED_COLUMNS)

Custom Data type conversions:
@Converter,@TypeConverter,@ObjectTypeConverter
@StructConverter

Query Framework

5 different ways

Entity Model : JPQL
Expressions
QBE
Native : SQL
Stored Procedures

Customizations in queries
--> Locking,Cache usage
--> Optimizations (batching,joining)
--> Result shaping/conversions
--> Stored Proc support

SQL and Stored Procedure directly hit db.

For other 3 query framework is used. Checks for Cache hit,Cache result is used using Object builder)

Annotations for stored procedures
@NamedStoredProcedureQuery and @NamedStoredProcedureQueries

e.g. @NamedStoredProcedureQuery(name="",procedureName="",parameters={})

Hints
eclipselink.read-only : useful in read only screens

Lazy loading & Fetch Groups
Two fetch groups defined automatically --> eagerly loaded fields and lazily loaded fields.Enabled by byte code weaving

Create your own fetch groups and added to query as hint. Overrides default fetch groups.

Caching Advantage :

Shared L2 and persistence context caching
--> Entity cache and not data cache like ehacache that comes with hibernate

Cache Invalidation --> time to live,fixed times, programmable

Cache Coordination --> Messaging,Type specific configuration (invalidate,sync,sync + new,none)

Invalidate is the most used and cheapest one

Annotations for caching : @Cache,@TimeofDay,@ExistenceChecking

Concurrency Protection :
@OptimisticLocking : Numeric,Timestamp,All Fields,Selected fields,Changed field

Pessimistic locking : using hit eclipselink.pessimistic-lock


Dealing with DB Triggers

@ReturnInsert and @ReturnUpdate : efficiently reread modified data in Oracle db.

Change Tracking
@ChangeTracking annotation to configure the way changes to Entities are computed
Attribute level ,object level, deferred ,auto

Performance Options summary
--> ChangeTracking
--> Read only queries
--> parameter binding
--> joining
--> inheritance
--> concurrency
--> dynamic expressions

Moxy : Object XML Binding

JavaApp --> Objects --> EclipselinkOXM --> xml

Rich set of mappings provides complete control to map objects to any XSD.

Eclipselink JAXB2 Annotations , Moxy XML

twice as fast as sun ri and xml beans.

API steps
1) Create factory,context
2) Marshal and UnMarshal

SDO : Xml Centric

Wow.. too fast session .. but left me lots to explore in JPA.

Eclipselink 1.1.2 released as part of Galileo

Eclipselink 2.0 --> Fall 2009 ; implements JPA 2.0

DBWS : Generated JAX-WS from DB

Keynote address - Day 1

Thu, 2009-07-16 23:06
First PR on Saltmarch going on :).

Sponsors : Platinum --> Oracle,IBM and Microsoft
Gold : Actuate,Adobe etc

Key note speaker will be Ramkumar Kothandaram from Microsoft

What is microsoft doing in an eclipse conference !!!

Topic will be interoperability.

Agenda

--> Microsoft's approach to interoperability
--> Open source & Microsoft platform

Need for interoperability


We have diversified client applications (firefox,ms office,Open office , IE8) and server applications (Jboss,.NEt etc..) , storage(EMC2,netapp) , multiple databases, processors(intel,ibm,sun).

Customers buy heterogeneous hardware/sofware. Painful EAI projects used to take a long time. This resulted in interoperability evolution.

Microsofts approach to Interoperatbility

--> Products : All products natively interoperability
--> Colloboration : with Partners,competitors and open source community
--> Standards : Promote interoperability through new and existing standards
--> Developer resources : msdn,codeplex etc

Products

All products like Windows Vista,.net ,Win server 2008,office 2007 support interoperability.

Can consume and expose webservice endpoints.

Colloboration

Apache stonehenge : Project to test for interoperability between various vendors.

MS part of interoperability alliance. Took leadership in webservices interop.

Standards

Participates in over 150 standards bodies

Developer Perspective

PHP on Windows --> PHP FastCGI on IIS

Seems that PHP on windows scales as fast as Apache ..

Then there was introduction to Microsoft Azure which is microsofts cloud computing platform.

Eclipse tools for sliverlight (eclipse4SL) : eclipse plugin for silverlight from soyatech. Looks good to me :). Can build RIA and embed in Html.

Java API for open XML : standard for storing documents. Create a document for server side. http://poi.apache.org

Links to remember

http://www.microsoft.com/web

Codeplex : 80000 open source apps on MIcrosoft application.

On the whole it was a good eye opener on microsoft and its contribution to interoperability.

Live Blogging from Eclipse summit - Bangalore

Thu, 2009-07-16 22:57
Here I am back again with live blogging from Eclipse summit Bangalore.

We are minutes away from launch and there seems to be a lot of Java/Eclipse lovers. The ballroom is really full.

The keynote address is set to begin

proto.in product vs service startups

Fri, 2009-01-23 06:20
Should a startup focus on product or services

By suresh, orangescape

Product

Sell ip
Entry barrier high
Team


Service
Total soln providers - tcs wipro
Game changers - provide answers to customers directly
Vendors
Specialists

Buying strategy

Vendors shop
Specialists investigate
Total solutions negotiate
Game changers partner

proto.in to brand or not to brand

Fri, 2009-01-23 05:36
Start internally
Stationery
Visiting cards
Brand language
Passive branding
Email footers
Have attractive footer msg
Attractive title
Employee tshirts

Active branding
Newsletters
Use online templates
Youtube
HUmor with cartoons
Sites like glasbergern
Calendar with half a dosen chicks ;)

Setup billboard in ur office premises
Online ads

Active branding

Pages