EclipseLink: Multitenancy with Oracle VPD

As of EclipseLink Indigo (2.3.0) you have been able to use the @Multitenant feature to share a database schema between multiple tenants. Did you know that you can also use this feature together with the Oracle Virtual Private Database (VPD) support that has been available in EclipseLink since version 1.0?

This powerful combination of features allows for the shared tables to be managed directly on the database, and for inserts to be automatically associated with the proper client. Any SQL executed by EclipseLink (even if EclipseLink did not generate it - ie native queries) will go through (more...)

Oracle enhanced adapter 1.4.0 and Readme Driven Development

I just released Oracle enhanced adapter version 1.4.0 and here is the summary of main changes.

Rails 3.1 support

Oracle enhanced adapter GitHub version was working with Rails 3.1 betas and release candidate versions already but it was not explicitly stated anywhere that you should use git version with Rails 3.1. Therefore I am releasing new version 1.4.0 which is passing all tests with latest Rails 3.1 release candidate. As I wrote before main changes in ActiveRecord 3.1 are that it using prepared statement cache and using bind variables in many (more...)

GlassFish 3.1.1 Ships with EclipseLink 2.3!

GlassFish 3.1.1 shipped today which makes it the first application server with the new multi-tenancy and extensible persistence unit support as well as all the other new features included in EclipseLink 2.3. If you're a GlassFish developer and you're upgrading to 3.1.1 you can find out all about the new features available in EclipseLink 2.3 on the EclipseLink Wiki.

To wet your appetite, Alexis Moussine-Pouchkine posted a screencast of building a multi-tenant enabled application on a pre-release build of GlassFish 3.1.1 on his blog and now would be a great time to check it out!

Shaun Smith, EclipseLink Team
@shaunmsmith

EclipseLink 2.3.0 (Indigo) Released

Since joining the family here at Eclipse a few years ago, one thing I can always count on is a hectic and exciting start to summer. This summer is no exception, and is kicked off with the release of EclipseLink 2.3.0 (Indigo).

Before I continue with brief descriptions of some of the new features of EclipseLink 2.3.0, I would like to thank everyone who was involved with this release. Whether your (more...)

EclipseLink Indigo Preview: Shared Databases for Multiple Tenants

Challenged to take an existing application and re-use it for a new customer or group of users (tenant)? Instead of customizing the application, adding new hardware or re-configuring the database for each new tenant, you can now build EclipseLink JPA enabled applications hosting requests from multiple tenants with all their data co-located.

Starting with EclipseLink 2.3, part of the annual Eclipse Indigo release, you can now have multiple application tenants sharing a database schema. EclipseLink enables you to configure your database tables for shared storage by simply providing tenant discriminator column(s) and providing values for these discriminators within your (more...)

Extend your Persistence Unit on the fly

Imagine a system that keeps track of player statistics in a sports league. Personal information such as name, height, weight and basic statistics such as the number of games played is stored for all players.

A persistence unit is deployed with all the mappings described above.

The system admin of a basketball league wants to use the system and add mappings for points scored and fouls. As the system is running they tell EcliseLink about mappings for those fields and the next EntityManager they get uses them.

Starting with EclipseLink 2.3, you can do just that. To do that, (more...)

EclipseLink RefCardz Available

A new RefCardz is available from DZone on JPA development with EclipseLink:

http://refcardz.dzone.com/refcardz/eclipselink-jpa

Thanks to Gordon Yorke for his hard work putting this together during the busy months leading up to the EclipseLink 2.3 (Indigo) release.

Recent conference presentations

Recently I has not posted any new posts as I was busy with some new projects as well as during May attended several conferences and in some I also did presentations. Here I will post slides from these conferences. If you are interested in some of these topics then ask me to come to you as well and talk about these topics :)

Agile Riga Day

In March I spoke at Agile Riga Day (organized by Agile Latvia) about my experience and recommendations how to adopt Agile practices in iterative style.

RailsConf

(more...)

Oracle enhanced adapter 1.3.2 is released

I just released Oracle enhanced adapter version 1.3.2 with latest bug fixes and enhancements.

Bug fixes and improvements

Main fixes and improvements are the following:

  • Previous version 1.3.1 was checking if environment variable TNS_NAME is set and only then used provided database connection parameter (in database.yml) as TNS connection alias and otherwise defaulted to connection to localhost with provided database name. This was causing issues in many setups.
    Therefore now it is simplified that if you provide only database parameter in database.yml then it by default will be used as TNS connection alias (more...)

ruby-plsql-spec upgraded to use RSpec 2.0

Initial version of ruby-plsql-spec gem was using RSpec version 1.3. But recently RSpec 2.0 was released which API is not compatible with previous RSpec 1.x API and as a result plsql-spec utility was failing if just RSpec was upgraded to version 2.0.

Therefore I updated also ruby-plsql-spec to use latest RSpec 2.0 gem and released ruby-plsql-spec gem version 0.2.1. You can install the latest version with

gem install ruby-plsql-spec

Upgrade from previous version

If you previously already installed initial ruby-plsql-spec version 0.1.0 then you need to update your spec/spec_helper.rb file (more...)

ruby-plsql-spec gem and code coverage reporting

During recent Oracle OpenWorld conference I presented session PL/SQL unit testing can be fun! where I demonstrated how to do PL/SQL unit testing with Ruby:

Audience was quite interested and had a lot of questions and therefore it motivated me to do some more improvements to ruby-plsql-spec to make it easier for newcomers.

ruby-plsql-spec gem and plsql-spec command line utility

Initially ruby-plsql-spec was just repository of sample tests and if you wanted to start to use it in your project you had to manually pick necessary files and copy them to your project directory.

Now ruby-plsql-spec is (more...)

EclipseLink at Open World/Java One/Oracle Develop 2010

The EclipseLink project will be well represented this year at Java One and Open World. If you are here attending the shows then I recommend you attend some of our sessions or drop by and visit us at the exhibition booths.

ID#: S314492
Title: Java Persistence API (JPA) 2.0 with EclipseLink
Date: 20-SEP-10
Time: 16:00-17:00
Hilton San Francisco, Golden Gate 4/5

ID#: S317452
Title: Advanced Enterprise Persistence
Date: 22-SEP-10
Time: 10:00-11:00
Hotel Nikko, Nikko Ballroom II

S314491: Effective XML: Leveraging JAXB and SDO
Date: 22-SEP-10
Time: 13:00-14:00
Hilton San Francisco, Yosemite A

S313434: Java Persistence API Futures BOF
Date: (more...)

Oracle enhanced adapter 1.3.1 and how to use it with Rails 3

Rails 3.0 was released recently and therefore I am releasing new Oracle enhanced adapter version 1.3.1 which is tested and updated against latest Rails 3.0.0 version. You can read about main changes in oracle_enhanced adapter for Rails 3 support in my previous blog post. Latest version 1.3.1 mainly contains several bug fixes (which you can find in change log as well as in detailed commit list) as well as several new features that I will describe here.

Usage with Rails 3

I have improved a little bit configuration and loading of oracle_enhanced adapter (more...)

Moving blog from wordpress.com to Jekyll

Jekyll

Why to move?

This blog was hosted for several years on wordpress.com as it was the easiest way to host a blog when I started. But recently I was not very satisfied with it because of the following reasons:

  • I include code snippets in my blog posts quite often and several times I had issues with code formatting on wordpress.com. I used MarsEdit to upload blog posts but when I read previous posts back then quite often my < and > symbols were replaced with &lt; and &gt;.
  • I would prefer to write my posts in Textile and (more...)

Using partial EclipseLink JPA entities with JAXB

I spent much of the final months of the EclipseLink 2.1 (Helios) development championing the enhancements of our existing FetchGroup support to address additional uses cases around working with partial entities. The new functionality is referred to as AttributeGroup with support for FETCH (what columns get retrieved from the database), LOAD (what relationships are populated), COPY (what attributes and relationships and populated in detached copy), and MERGE (what attributes are merged from a detached partial entity). This additional support greatly simplifies application development where detached entities are used as well as providing additional performance tuning options and flexibility for (more...)

EclipseLink 2.1.0 Helios Release Now Available

Hi all,

It is with great pleasure that I would like to announce the release of EclipseLink 2.1.0 (Helios). This release of brings a number of exciting features many of which were voted on, and chosen by the community.

Some of the JPA features included in this release are
- improved JPQL enhancements, and extensions including 'TREAT...AS' and 'FUNC'.
- Fetch, Load, Copy & Merge of partial entities using 'AttributeGroup'
- extentions to 'eclipselink-orm.xml'
- Dynamic Persistence: JPA without requiring Java classes.
- New Platforms: SAPNetWeaver Server Platform and Symfoware Database Platform
...and more...

Some of (more...)

Oracle enhanced adapter 1.3.0 is Rails 3 compatible

Rails 3 is in final finishing stage (currently in beta4) and therefore I released new Oracle enhanced adapter version 1.3.0 which I was working on during last months.

Rails 3 compatibility
rails3.gif

The major enhancement is that Oracle enhanced adapter is now compatible with Rails 3. To achieve that I also developed Oracle SQL compiler for Arel gem which is used now by ActiveRecord to generate SQL statements. When using Oracle enhanced adapter with Rails 3 you will notice several major changes:

  • Table and column names are always quoted and in uppercase to avoid the need for checking Oracle (more...)

Please vote for my Ruby session proposals at Oracle OpenWorld

oow2010.pngI am trying to tell more people at Oracle OpenWorld about Ruby and Rails and how it can be used with Oracle database. Unfortunately my session proposals were rejected by organizers but now there is a second chance to propose sessions at mix.oracle.com and top voted sessions will be accepted for conference. But currently my proposed sessions do not have enough votes :(

I would be grateful if my blog readers and Ruby on Oracle supporters would vote for my sessions Fast Web Applications Development with Ruby on Rails on Oracle and PL/SQL Unit Testing Can Be (more...)

EclipseLink Summit 2010 Wrap Up


Last week we held our first EclipseLink Summit here in Ottawa with attendees from Canada, Germany, India, and the US. The principal goal of the summit was the exchange of technical information and ideas. We believe the event was a tremendous success!

We spent 2 days with committers leading technical sessions discussing areas from high level components and architecture to the detailed workings of EclipseLink's querying, caching, transactions, management, diagnostics, metadata processing, JPA 2.0 metamodel, and several other subsystems.

We would like to extend a big thank you to all of the committers who lead those sessions. The preparation (more...)

EclipseLink Summit 2010

In an effort to increase the community of committers and contributors with in-depth knowledge of EclipseLink we have decided to host a 3-day Summit. The goal of this Summit will be to exchange detailed technical information and discuss future direction for the project and its persistence services.

All interested parties are welcome to participate.

More info on Summit is available here.

Doug