Thought inc.

The Dynamic O/R Mapping Company
     

CocoBase Technical Support Forums
For access to developer site with software download and doc's, please request CocoBase download and password
will be emailed to you. Response to posts will appear when answered by THOUGHT Support team.
NOTE:You must register separately with forum in order to post your questions, please click on register icon below.
Home   Frequently Asked Questions   Search   Edit your profile   Registration is free!  
Email This Page to Someone!
Show a Printable Version
CocoBase Enterprise O/R Forums > CocoBase Questions
Queries against an in-memory database?
< Previous Thread     Next Thread >
Author
Thread    Post New Thread     Post A Reply
fwong
Member

Registered: Nov 2004
Posts: 1

The system I'm working on uses CMP entity beans on a WebLogic platform. Most access is controlled through the use of EJB Select/Finder methods.

Technically, this architecture performs correctly.

However, to increase performance, I'm looking for more control over how often Weblogic flushes data to the database.

During a managed transaction, various inserts and updates will be performed. In order for EJB-QL statements to run correctly against any uncommited data, the changes must be flushed to the database prior to running the EJB-QL statement.

Is it possible for CocoBase to query against an in-memory database (that contains un-committed data)? Ideally I'd like to pre-query the data that may be affected, perform all changes in memory, and then flush the data at the end of the transaction one time.

11-22-2004 09:54 AM
Click Here to See the Profile for fwong    Find more posts by fwong        Edit/Delete Message    Reply w/Quote    IP: Logged
admin
Administrator

Registered: Apr 2001
Posts: 19

The issue you have is that Entity Beans don't give the developer access to lifecycle management. For instance, if you issue a query within a current transaction, the entity beans you have changed may or may not yet be saved.

This sort of black box approach is one of the many problems with Entity Beans, and also one of the many reasons Entity Beans are being end of lifed by sun.

Have you considered using POJO persistence instead? The CocoBase EJBQL implementation will run inside the EJB container, but doesn't require CMP or Entity Beans. It also gives you EXPLICIT controls over saves such as:

cbfacade.save(customer); // CAN WRITE TO DB WITHOUT DELAY
cbfacade.executeQLQuery("select..."); // QUERY DB STATE

This seems more like what you WANT to accomplish - and by using POJO persistence you can readily implement it...

THOUGHT Support

11-22-2004 02:09 PM
Click Here to See the Profile for admin    Find more posts by admin        Edit/Delete Message    Reply w/Quote    IP: Logged
All times are PST (US)    Post New Thread     Post A Reply
Forum Jump:
< Previous Thread     Next Thread >

Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author. Messages can be deleted by their author.
Posts: HTML code is OFF. Smilies are OFF. vB code is OFF. [IMG] code is OFF.

Admin Options:
Open / Close Thread
Move Thread
Delete Thread
Edit Thread

< Contact Us - THOUGHT Inc. >

Copyright © Jelsoft Enterprises Limited 2000.
Copyright 2001 All Rights Reserved, THOUGHT Inc.