Eager fetching in multiple mode
Hi,
I have the following questions about eager fetching in multiple mode :
- for a to-many relation or collection field, what kind of join is used
for the separate select statement ?
- in my understanding, the gain in performance is due to the use of
batched select statements : is it correct or did I miss something here ?
Thanks in advance.
Regards.
- for a to-many relation or collection field, what kind of join is used
for the separate select statement ?Inner. For a 2-many, there is no need for an outer join.
- in my understanding, the gain in performance is due to the use of
batched select statements : is it correct or did I miss something here ?The performance gain results from using a single SELECT per to-many
relation, rather than a SELECT per to-many relation, per object. For
example, let's say my Query matches 10 Project objects, and each Project
has 10 SubProjects, and each SubProject has some Workers. If I wanted
to retrieve all that data lazily, I would end up with 111 SELECTs:
1 SELECT for Projects matching the query
+ 10 SELECTs as I retrieve the SubProject relation from each of the 10
Project
+ 100 SELECTs as I retrieve the Workers relation from each of the 100
SubProjects (10 Projects with 10 SubProjects each).
With eager fetching, all the data is retrieved in 3 SELECTs instead:
1 SELECT for Projects matching the query
1 SELECT for SubProjects of the Projects matching the query
1 SELECT for Workers of the SubProjects of the Projects matching the query
Similar Messages
-
Fetching of multiple files from Application Server into SAP Program
Hi All,
I have a issue related <b>Fetching of multiple files from Application Server into SAP Program</b>.
Actual issue is as below.
In the <b>selection screen</b> of <b>my program</b> i will give <b>Application Server Path</b> as :
<b>/PW/DATA/SAP/D1S/PP/DOWN/eppi0720*</b>
Then the based on above input it should pick up all the files that are matching <b>eppi0720*</b> criteria.
Suppose if i am having <b>5</b> files with above scenario, i have to fetch all those <b>5</b> files at a time and place in my SAP Program.
All those 5 file's data should come into SAP at a time.
Can anybody tell me how can we solve above issue.
If any body has come across same issue please provide me with solution.
Thanks in advance.
Thanks & Regards,
Rayeez.If you want to get around the authorization check, you can do something like this.
report zrich_0001 .
parameters: p_path type epsf-epsdirnam
default '/usr/sap/TST/SYS/global'.
parameters: p_file type epsf-epsfilnam default 'CO*'.
start-of-selection.
perform get_file_list.
* FORM get_file_list *
form get_file_list.
types: name_of_dir(1024) type c,
name_of_file(260) type c,
name_of_path(1285) type c.
data: begin of file_list occurs 100,
dirname type name_of_dir, " name of directory. (possibly
" truncated.)
name type name_of_file, " name of entry. (possibly
" truncated.)
type(10) type c, " type of entry.
len(8) type p, " length in bytes.
owner(8) type c, " owner of the entry.
mtime(6) type p, " last modification date, seconds since 1970
mode(9) type c, " like "rwx-r-x--x": protection mode.
useable(1) type c,
subrc(4) type c,
errno(3) type c,
errmsg(40) type c,
mod_date type d,
mod_time(8) type c, " hh:mm:ss
seen(1) type c,
changed(1) type c,
end of file_list.
data: begin of file,
dirname type name_of_dir, " name of directory. (possibly
" truncated.)
name type name_of_file, " name of entry. (possibly
" truncated.)
type(10) type c, " type of entry.
len(8) type p, " length in bytes.
owner(8) type c, " owner of the entry.
mtime(6) type p, " last modification date, seconds since 1970
mode(9) type c, " like "rwx-r-x--x": protection mode.
useable(1) type c,
subrc(4) type c,
errno(3) type c,
errmsg(40) type c,
mod_date type d,
mod_time(8) type c, " hh:mm:ss
seen(1) type c,
changed(1) type c,
end of file.
call 'C_DIR_READ_FINISH' " just to be sure
id 'ERRNO' field file_list-errno
id 'ERRMSG' field file_list-errmsg.
call 'C_DIR_READ_START' id 'DIR' field p_path
id 'FILE' field p_file
id 'ERRNO' field file-errno
id 'ERRMSG' field file-errmsg.
if sy-subrc <> 0.
sy-subrc = 4.
exit.
endif.
* Read the file list and add to internal table.
do.
clear file.
call 'C_DIR_READ_NEXT'
id 'TYPE' field file-type
id 'NAME' field file-name
id 'LEN' field file-len
id 'OWNER' field file-owner
id 'MTIME' field file-mtime
id 'MODE' field file-mode
id 'ERRNO' field file-errno
id 'ERRMSG' field file-errmsg.
if sy-subrc = 1.
exit.
endif.
append file to file_list.
enddo.
* Write out the file list
loop at file_list.
write:/ file_list-name.
endloop.
endform.
Regards,
Rich Heilman -
SQL Batch doesn't seem to work; How to eager-fetch related objects?
Hi,
I have two technical questions with Kodo.
1. SQL Batch doesn't seem to work. I have tried batch size of -1, 0, 1, 25.
But the performance from batch creating objects is not affected by batch
size.
kodo.jdbc.DBDictionary: BatchLimit=25
2. How to use custom fetch groups to eagerly fetch related persistable
objects? Example only showed attributes, not relationships.
Enviroment:
* Kodo 3.1.0 RC1
* Oracle 9i release 1.
Qingshan Luo
Senior Software Engineer
Open Harbor
1123 Industrial Road
San Carlos, CA 94070
Phone: 650-413-4251
Fax: 650-413-4298try poracle 10g driver. At least they fixed terrible CLOB bug may be batch
to. BTW 9.2.x has problem with batching with deferred constraints so be
careful
"Greg Campbell" <[email protected]> wrote in message
news:c3dmnu$rmj$[email protected]..
>
"Qingshan Luo" <[email protected]> wrote in message
news:c3dg7q$mdl$[email protected]..
Hi,
I have two technical questions with Kodo.
1. SQL Batch doesn't seem to work. I have tried batch size of -1, 0, 1,25.
But the performance from batch creating objects is not affected by batch
size.
kodo.jdbc.DBDictionary: BatchLimit=25You may be running into a bug in the Oracle 9.2 driver. That driverdoesn't
reliably give update counts when using batching and prepared statement
caching. By default, Kodo will turn off batching. You can manuallyenable
batching by setting the BatchLimit on your DBDictionary, as you've done.If
you do this, though, you may want to turn off prepared statement cachingby
setting MaxCachedStatements to 0 (see
http://www.solarmetric.com/Software/Documentation/3.1.0RC1/docs/ref_guide_dbsetup.html#ref_guide_dbsetup_builtin).
>
2. How to use custom fetch groups to eagerly fetch related persistable
objects? Example only showed attributes, not relationships.You can find information on setting up eager fetching of relations at
http://www.solarmetric.com/Software/Documentation/3.0.3/docs/ref_guide_
perfpack_eager.html
Basically, you'll need to add the relations to your fetch group, and
set the eager fetching mode.
Enviroment:
* Kodo 3.1.0 RC1
* Oracle 9i release 1.
Qingshan Luo
Senior Software Engineer
Open Harbor
1123 Industrial Road
San Carlos, CA 94070
Phone: 650-413-4251
Fax: 650-413-4298 -
I believe eager fetching can greatly benefit from more dynamic method then
predefined fetch groups.
Different queries pull different parts of object graph and only client using
object model knows what's needed for a particular query. Trying to fit
conflicting data needs into one set of fetch group is a challenge. While I
would retain this feature I would like to propose field based eager fetching
control. Which can also be used for Detached objects
Lets say we have PO with POLine collection and each POLine references
Product. If we want to eager fetch POs along with their lines and products
we could say something like
pm.getFetchConfiguration().addPath(com.peacetech.sales.PO.class, "lines");
pm.getFetchConfiguration().addPath(com.peacetech.sales.PO.class,
"lines/product");
or
pm.getFetchConfiguration().addPath(com.peacetech.sales.PO.class, pathList);
of course we would need
pm.getFetchConfiguration().removePath(com.peacetech.sales.PO.class,
"lines/product");
pm.getFetchConfiguration().addPath(com.peacetech.sales.PO.class); //remove
all for given class
This is just a crude example. In real life we should have few classes to
support the idea and main class GraphConfig or something so users can
configure, build and reuse those GraphConfig instances and use them for
various purposes like eager fetching and detaching without conflicts
I think it would be enormous help to uncouple so many conflicting issues
(fetch optimizations, optimistic locking field groups, detached graphs etc)
from one very limited concept of predefined fetch groupsMark,
I mentioned this possibility in on of my prior posts. It is not exactly what
I want (since it lack interclass relations which let you express hints for
deep graph rather than for a class and its fields) but close.
If you maintain your metadata files by hand it is too much effort but since
almost all my models and metadata are generated I can easily do (and undo)
it for each and every class/field and I will give it a try :-)
Alex
"Marc Prud'hommeaux" <[email protected]> wrote in message
news:[email protected]...
Alex-
Well, you could always simulate dynamic fetch groups by defining a
different custom fetch group for each field (provided your license has
the capability to use custom fetch groups). For simplicity, you could
name each fetch group to be "ClassName.fieldName".
That way, you could do something like this:
KodoQuery kq = (KodoQuery) pm.newQuery (MyClass.class, "someQuery");
kq.getFetchConfiguration ().addFetchGroup ("MyClass.fieldA");
kq.getFetchConfiguration ().addFetchGroup ("MyClass.fieldB");
kq.getFetchConfiguration ().addFetchGroup ("MyClass.fieldC");
kq.getFetchConfiguration ().addFetchGroup ("MyClass.fieldD");
Collection results = (Collection) kq.execute ();
It would them be pretty simple to make a static helper method that will
do thing like includeAllFieldsInFatchGroup() or
includeNoFieldsInFetchGroup().
In article <[email protected]>, Alex Roytman wrote:
David Tinker says multiple fetch group is the solution:
Hi Alex
You can create as many fetch groups as you like in the meta data (with
JDO
Genie anyway). I think it is much better to get tuning information likethis
out of the code. It should be added externally much like you add indexesto
database tables in response to query search requirements. I understandthat
sometimes you will need programatic control but mostly it is better notto
pollute the code.
JDO 2.0 is going to standardize the concept of a use-case. This willdelimit
business operations to the JDO implementation so it can applyappropriate
meta-data defined fetch groups or locking strategies. You will be ableto
use a vendor supplied tool to analyze the performance of yourapplication
and construct fetch groups for different use-cases (businessoperations). No
change to the code is necessary.
Here is an example:
CODE
pm.beginUseCase("com.peacetech.sales.displayOrder");
POClass o = (POClass)pm.getObjectById(oid, true);
.... other JDO code ....
pm.endUseCase();
The meta data for the use-case will specify the fetch group to use when
looking up the instance (and locking behaviour etc.). Other use-casescan
have different settings. Only the being/end calls are needed in the codeto
make this happen.
Note that this is a very long way from being finalized. I have just madeup
this example and how it works in JDO 2.0 is likely to be different.
Use-case support will show up in JDO Genie beta releases soon. Wealready
have powerful performance monitoring and analysis support in our GUI
Workbench and very flexible fetch groups.
Cheers
David
Here's my opinion
David,
Thank you for your response. Multiple fetch groups do give moreflexibility
(I do not believe Kodo supports it though) but does not alter myposition
>>
I do not want to pollute my metadata with tons of fetch groups creating
dependencies between my code and those fetch groups. JDOQL languagebeing
what it is already creates unavoidable dependency between field namesfilter
strings so I want to keep it the same way with other things which are
essentially references to persistent fields (Disconnected instancesdepth
control, Eagar fetching ....)
As for polluting my code. I want to assure you everything configurablewill
not be in my code but in JNDI or config files. As long as JDO givesclear
API for expressing graph path selection
Use case concept ties nicely with Graph Path selection concept. In factthis
GraphPaths class along with some additional options is your use case.
It is much easer for me to refactor and keep in sync field names and my
GraphPath than fetch groups.
Alex
"Abe White" <[email protected]> wrote in message
news:[email protected]...
I think the basic idea you've suggested is a good one. We'll certainly
consider it for a future release. The JDO 2 spec team is also
pondering
these problems...
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Eager Fetching recursivity bug
I have two classes A and B.
A has two relations to B.
A.theB1 (A 1-1 to B)
A.theB2 (A 1-n to B)
B has two relation to A.
B.theA1 (B 1-n to A)
B.theA2 (B 1-n to A)
If I configure A.theB1 and A.theB2 with default-fetch-group="true".
And then I Use Eager Fetching multiple:everything works fine.
But if I also configure B.theA1 and B.theA2 with
default-fetch-group="true".
And then I Use Eager Fetching multiple
I get this Exception:
java.lang.StackOverflowError
at java.util.TreeMap.access$400(TreeMap.java:77)
at java.util.TreeMap$EntryIterator.nextEntry(TreeMap.java:1024)
at java.util.TreeMap$KeyIterator.next(TreeMap.java:1047)
at java.util.TreeMap.buildFromSorted(TreeMap.java:1588)
at java.util.TreeMap.buildFromSorted(TreeMap.java:1576)
at java.util.TreeMap.buildFromSorted(TreeMap.java:1534)
at java.util.TreeMap.addAllForTreeSet(TreeMap.java:1492)
at java.util.TreeSet.addAll(TreeSet.java:247)
at kodo.jdbc.sql.AbstractSelect$JoinSet.<init>(AbstractSelect.java:1021)
at kodo.jdbc.sql.AbstractSelect.and(AbstractSelect.java:719)
at kodo.jdbc.sql.AbstractSelect.getJoins(AbstractSelect.java:541)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:229)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:221)
at
kodo.jdbc.runtime.JDBCStoreManager.selectBaseMappings(JDBCStoreManager.java:874)
at
kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:835)
at kodo.jdbc.runtime.JDBCStoreManager.access$000(JDBCStoreManager.java:30)
at
kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManager.java:1071)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:259)
at
kodo.jdbc.meta.OneToOneFieldMapping.select(OneToOneFieldMapping.java:452)
at
kodo.jdbc.runtime.JDBCStoreManager.selectBaseMappings(JDBCStoreManager.java:909)
at
kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:835)
at kodo.jdbc.runtime.JDBCStoreManager.access$000(JDBCStoreManager.java:30)
at
kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManager.java:1071)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:259)
at
kodo.jdbc.meta.OneToOneFieldMapping.select(OneToOneFieldMapping.java:452)
at
kodo.jdbc.runtime.JDBCStoreManager.selectBaseMappings(JDBCStoreManager.java:909)
at
kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:835)
at kodo.jdbc.runtime.JDBCStoreManager.access$000(JDBCStoreManager.java:30)
at
kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManager.java:1071)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:259)
at
kodo.jdbc.meta.ManyToManyFieldMapping.load(ManyToManyFieldMapping.java:350)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:427)
at
kodo.runtime.DelegatingStoreManager.load(DelegatingStoreManager.java:141)
at
kodo.datacache.DataCacheStoreManager.load(DataCacheStoreManager.java:386)
at
kodo.runtime.DelegatingStoreManager.load(DelegatingStoreManager.java:141)
at kodo.runtime.ROPStoreManager.load(ROPStoreManager.java:82)
at kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java:2274)
at kodo.runtime.StateManagerImpl.load(StateManagerImpl.java:139)
at
kodo.runtime.PersistenceManagerImpl.load(PersistenceManagerImpl.java:2408)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1244)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1175)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:677)
at kodo.jdbc.meta.OneToOneFieldMapping.load(OneToOneFieldMapping.java:481)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:731)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:720)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:720)
at
kodo.jdbc.runtime.JDBCStoreManager.initialize(JDBCStoreManager.java:338)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at
kodo.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:340)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at kodo.runtime.ROPStoreManager.initialize(ROPStoreManager.java:57)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1240)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1175)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:677)
at kodo.jdbc.meta.OneToOneFieldMapping.load(OneToOneFieldMapping.java:481)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:731)
at
kodo.jdbc.runtime.JDBCStoreManager.initialize(JDBCStoreManager.java:338)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at
kodo.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:340)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at kodo.runtime.ROPStoreManager.initialize(ROPStoreManager.java:57)
I have test every combination and what I see ,is that the Exception comes
because "Eager Fetching" process works recursively.
I remmember the same problem with Top Link Batch Reading.
I don't know if this could help: but I see two solutions.
1) explicity option to work recursively or not.
2) limitate depth level of recursivity.
This is the configuration file:
javax.jdo.PersistenceManagerFactoryClass:
kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName: com.jnetdirect.jsql.JSQLDriver
javax.jdo.option.ConnectionUserName: sa
javax.jdo.option.ConnectionPassword:
javax.jdo.option.ConnectionURL:
jdbc:JSQLConnect://agarcia/database=kodo3/SelectMethod=cursor
javax.jdo.option.Optimistic: true
javax.jdo.option.RetainValues: true
javax.jdo.option.NontransactionalRead: false
kodo.ConnectionFactoryProperties: MaxCachedStatements=0
kodo.DataCacheClass: kodo.datacache.CacheImpl
kodo.DataCacheProperties: CacheSize=1000000
kodo.PersistenceManagerClass: kodo.runtime.PersistenceManagerImpl
kodo.QueryCacheProperties: CacheSize=10000
kodo.RemoteCommitProviderClass: kodo.event.SingleJVMRemoteCommitProvider
kodo.jdbc.DBDictionaryClass=kodo.jdbc.sql.SQLServerDictionary
kodo.jdbc.TransactionIsolation=
javax.jdo.option.Multithreaded: true
## Transaction ###
kodo.TransactionMode: managed
kodo.ManagedRuntimeClass: kodo.ee.JNDIManagedRuntime
kodo.ManagedRuntimeProperties:
TransactionManagerName=java:/TransactionManager
#kodo.jdbc.MappingFactoryClass: kodo.jdbc.meta.MetaDataMappingFactory
kodo.jdbc.DBDictionaryProperties: BatchLimit=0 JoinSyntax=sql92
kodo.EagerFetchMode: multiple
kodo.FetchBatchSize: 10000
kodo.FetchThreshold: -1Oh boy. Oops.
Thanks for the report.
-Patrick
On Fri, 01 Aug 2003 16:57:52 +0000, oscar wrote:
>
I have two classes A and B.
A has two relations to B.
A.theB1 (A 1-1 to B)
A.theB2 (A 1-n to B)
B has two relation to A.
B.theA1 (B 1-n to A)
B.theA2 (B 1-n to A)
If I configure A.theB1 and A.theB2 with default-fetch-group="true".
And then I Use Eager Fetching multiple:everything works fine.
But if I also configure B.theA1 and B.theA2 with
default-fetch-group="true".
And then I Use Eager Fetching multiple
I get this Exception:
java.lang.StackOverflowError
at java.util.TreeMap.access$400(TreeMap.java:77)
at java.util.TreeMap$EntryIterator.nextEntry(TreeMap.java:1024)
at java.util.TreeMap$KeyIterator.next(TreeMap.java:1047)
at java.util.TreeMap.buildFromSorted(TreeMap.java:1588)
at java.util.TreeMap.buildFromSorted(TreeMap.java:1576)
at java.util.TreeMap.buildFromSorted(TreeMap.java:1534)
at java.util.TreeMap.addAllForTreeSet(TreeMap.java:1492)
at java.util.TreeSet.addAll(TreeSet.java:247)
at kodo.jdbc.sql.AbstractSelect$JoinSet.<init>(AbstractSelect.java:1021)
at kodo.jdbc.sql.AbstractSelect.and(AbstractSelect.java:719)
at kodo.jdbc.sql.AbstractSelect.getJoins(AbstractSelect.java:541)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:229)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:221)
at
kodo.jdbc.runtime.JDBCStoreManager.selectBaseMappings(JDBCStoreManager.java:874)
at
kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:835)
at kodo.jdbc.runtime.JDBCStoreManager.access$000(JDBCStoreManager.java:30)
at
kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManager.java:1071)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:259)
at
kodo.jdbc.meta.OneToOneFieldMapping.select(OneToOneFieldMapping.java:452)
at
kodo.jdbc.runtime.JDBCStoreManager.selectBaseMappings(JDBCStoreManager.java:909)
at
kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:835)
at kodo.jdbc.runtime.JDBCStoreManager.access$000(JDBCStoreManager.java:30)
at
kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManager.java:1071)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:259)
at
kodo.jdbc.meta.OneToOneFieldMapping.select(OneToOneFieldMapping.java:452)
at
kodo.jdbc.runtime.JDBCStoreManager.selectBaseMappings(JDBCStoreManager.java:909)
at
kodo.jdbc.runtime.JDBCStoreManager.selectMappings(JDBCStoreManager.java:835)
at kodo.jdbc.runtime.JDBCStoreManager.access$000(JDBCStoreManager.java:30)
at
kodo.jdbc.runtime.JDBCStoreManager$SelectImpl.selectInternal(JDBCStoreManager.java:1071)
at kodo.jdbc.sql.AbstractSelect.select(AbstractSelect.java:259)
at
kodo.jdbc.meta.ManyToManyFieldMapping.load(ManyToManyFieldMapping.java:350)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:427)
at
kodo.runtime.DelegatingStoreManager.load(DelegatingStoreManager.java:141)
at
kodo.datacache.DataCacheStoreManager.load(DataCacheStoreManager.java:386)
at
kodo.runtime.DelegatingStoreManager.load(DelegatingStoreManager.java:141)
at kodo.runtime.ROPStoreManager.load(ROPStoreManager.java:82)
at kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java:2274)
at kodo.runtime.StateManagerImpl.load(StateManagerImpl.java:139)
at
kodo.runtime.PersistenceManagerImpl.load(PersistenceManagerImpl.java:2408)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1244)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1175)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:677)
at kodo.jdbc.meta.OneToOneFieldMapping.load(OneToOneFieldMapping.java:481)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:731)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:720)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:720)
at
kodo.jdbc.runtime.JDBCStoreManager.initialize(JDBCStoreManager.java:338)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at
kodo.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:340)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at kodo.runtime.ROPStoreManager.initialize(ROPStoreManager.java:57)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1240)
at
kodo.runtime.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:1175)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:677)
at kodo.jdbc.meta.OneToOneFieldMapping.load(OneToOneFieldMapping.java:481)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:731)
at
kodo.jdbc.runtime.JDBCStoreManager.initialize(JDBCStoreManager.java:338)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at
kodo.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:340)
at
kodo.runtime.DelegatingStoreManager.initialize(DelegatingStoreManager.java:134)
at kodo.runtime.ROPStoreManager.initialize(ROPStoreManager.java:57)
I have test every combination and what I see ,is that the Exception comes
because "Eager Fetching" process works recursively.
I remmember the same problem with Top Link Batch Reading.
I don't know if this could help: but I see two solutions.
1) explicity option to work recursively or not.
2) limitate depth level of recursivity.
This is the configuration file:
javax.jdo.PersistenceManagerFactoryClass:
kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionDriverName: com.jnetdirect.jsql.JSQLDriver
javax.jdo.option.ConnectionUserName: sa
javax.jdo.option.ConnectionPassword:
javax.jdo.option.ConnectionURL:
jdbc:JSQLConnect://agarcia/database=kodo3/SelectMethod=cursor
javax.jdo.option.Optimistic: true
javax.jdo.option.RetainValues: true
javax.jdo.option.NontransactionalRead: false
kodo.ConnectionFactoryProperties: MaxCachedStatements=0
kodo.DataCacheClass: kodo.datacache.CacheImpl
kodo.DataCacheProperties: CacheSize=1000000
kodo.PersistenceManagerClass: kodo.runtime.PersistenceManagerImpl
kodo.QueryCacheProperties: CacheSize=10000
kodo.RemoteCommitProviderClass: kodo.event.SingleJVMRemoteCommitProvider
kodo.jdbc.DBDictionaryClass=kodo.jdbc.sql.SQLServerDictionary
kodo.jdbc.TransactionIsolation=
javax.jdo.option.Multithreaded: true
## Transaction ###
kodo.TransactionMode: managed
kodo.ManagedRuntimeClass: kodo.ee.JNDIManagedRuntime
kodo.ManagedRuntimeProperties:
TransactionManagerName=java:/TransactionManager
#kodo.jdbc.MappingFactoryClass: kodo.jdbc.meta.MetaDataMappingFactory
kodo.jdbc.DBDictionaryProperties: BatchLimit=0 JoinSyntax=sql92
kodo.EagerFetchMode: multiple
kodo.FetchBatchSize: 10000
kodo.FetchThreshold: -1--
Patrick Linskey
SolarMetric Inc. -
Hi,
I am using eager fetch in Kodo 3.1.3 but not sure if my configuration is
correct.
I have a Report object which contains a collection of Memos objects. It
is a 1-to-many relationship. After configure the kodo.properties and the
mapping file as following:
kodo.properties:
Add the following line
kodo.EagerFetchMode: multiple
kodo.Log: SQL=TRACE
In mapping jdo:
<class name="Report" objectid-class="ReportId">
<field name="memo" default-fetch-group="true">
<collection element-type="Memo"/>
</field>
<field name="policyId" primary-key="true"/>
</class>
After making those changes, running my application against the database
with say 100 reports, the SQL trace still showing 100 SQL statement rather
than 1 single SELECT as I understand, ie. select all 100 reports and all
associated memos in one visit to the db server.
Please correct me if I am worng. Thanks.
Cheers,
DienHi,
I am using eager fetch in Kodo 3.1.3 but not sure if my configuration is
correct.
I have a Report object which contains a collection of Memos objects. It
is a 1-to-many relationship. After configure the kodo.properties and the
mapping file as following:
kodo.properties:
Add the following line
kodo.EagerFetchMode: multiple
kodo.Log: SQL=TRACE
In mapping jdo:
<class name="Report" objectid-class="ReportId">
<field name="memo" default-fetch-group="true">
<collection element-type="Memo"/>
</field>
<field name="policyId" primary-key="true"/>
</class>
After making those changes, running my application against the database
with say 100 reports, the SQL trace still showing 100 SQL statement rather
than 1 single SELECT as I understand, ie. select all 100 reports and all
associated memos in one visit to the db server.
Please correct me if I am worng. Thanks.
Cheers,
Dien -
Active-Active firewall, multiple mode can't do file management?
Hi all
as above title, found that i can't use ASDM to do file management.
I get this after i read the configuration documents: Backing Up and Restoring Configurations, Images, and Profiles (Single Mode)
So in Active-Active it's a multiple mode, can't just simply backup/upgrade it firmware and ASDM?
You are welcome to share your comment, thanks in advance
NoelHi,
Please make sure you are in the system context to take the back up or restore. It only appears in the system context.
Thanks,
Varun Rao
Security Team,
Cisco TAC -
How to check if "fetch" returns Multiple rows
I want to know thru some variable (like %found) if the "fetch" returns multiple rows. How can I do it?
My code:
open tab1_rec for
'select fld1 ' ||
'from tab1 f ' ||
'where f.fld3 = :s1 and ' ||
'f.fld4 = :s2 and ' ||
'f.fld5 = 1 '
using fld3_in,
fld4_in;
fetch tab1_rec into var1;
-- If MULTIPLE
if tab1_rec%multiple
ThanksIf returning more than one row is unusual in some way (that is you are expecting only a single row) then you can do it like:
BEGIN
SELECT fld1 INTO var1
FROM tab1 f
WHERE f.fld3 = fld3_in and
f.fld4 = fld4_in and
f.fld5 = 1;
< Do your processing here >
EXCEPTION
WHEN NO_DATA_FOUND THEN
< handle no rows >
WHEN TOO_MANY_ROWS THEN
< handle multiple rows >
END;No need for a cursor here. If you are expecting more than one row, and just want to know the count for information purposes, then you have to loop and fetch the records.
HTH
John -
Eager Fetch Mode limit clarification
Hi,
I would like clarification of the following from the 3.3.4 docs
(kodo-jdo-3.3.4/docs/ref_guide_perfpack_eager.html):
"Once Kodo eager-joins into a class, it cannot issue any further eager
to-many joins or parallel selects from that class in the same query.
To-one joins, however, can recurse to any level."
Given the following class/table relationships:
X --> Y -->> Z
(where --> is one-to-one and -->> is one-to-many)
Does this mean that if I query X, Y can be eagerly fetched, but not Z?
This is certainly what we see - a join to fetch X and Y in one select
statement and then many one-off selects from Z for each Y.
Is there any way to load Z more efficiently? It would seem that once
Kodo has loaded the Y's that it knows all it needs to load the Z's with
one SQL select - Z would have a FK to Y, so "select ... from z where
y_id in (<kodo puts the loaded y ids here>)" would seem feasible,
especially given Kodo does this in other places.
Thanks,
RichardThanks Abe.
Abe White wrote:
X --> Y -->> Z
(where --> is one-to-one and -->> is one-to-many)
Does this mean that if I query X, Y can be eagerly fetched, but not Z?Yes, unfortunately.Our actual case also includes the following relationships: X -->> W -->>
V and strangely, they do seem to be be eagerly loaded when we query for
X. i.e. one query to load all Vs. How does this work given the above?
Is there any way to load Z more efficiently?Typical workarounds include querying for Y's instead of X's and using
the inverse relation from Y to X, or if there is no such relation,
performing 2 queries: one for Y's and one for X's.Are there any plans to support greater depth eager loadings in any
upcoming Kodo version?
Thanks again for your help,
Richard -
Can we use the built-in Row fetch for Multiple reports in a page?
I need to create a page with multiple report regions. Each of it is based on a table. Those tables are different. I somewhat remembered that we can NOT use the built in automatic row fetch process if there are multiple report regions, neither the built in DML process. You have to make your own fetch and insert/update/delete process if you intend to.
Also if I write my own row fetch and update processes, do I have to consider lock mechnism? or just simply write select and insert/update?
Any input is appreciated.I think I found the answer. Would Scott or other gurus take a look at the thread and confirm it, in case the limitation is not in 2.0?
Re: automatic row fetch
What I am concered about is that the locking mechanism. If I have to write my own process to fetch and insert/update, other than the regular select and insert/update statements, do I have to put commit by myself, or htmldb can handle it automatically? Is there an example for this?
Thanks in advance. -
Cursor fetch with multiple rows
I have been given code which, effectively, looks like this:
declare
cursor cTest is select * from (select 'one' from dual union all select 'two' from dual);
lvText varchar2(10);
begin
open cTest;
fetch cTest into lvText;
close cTest;
dbms_output.put_line(lvText);
end;
/That consistently returns just the result "one", even though there are two rows in the cursor.
If I re-write the code like this:
declare
lvText varchar2(10);
begin
select thecol into lvText from (select 'one' as thecol from dual union all select 'two' from dual);
dbms_output.put_line(lvText);
end;
/...then I get the error I expected (ORA-01422: exact fetch returns more than requested number of rows).
I guess I am a bit surprised the "fetch into" syntax (which I haven't used before) works at all. Why doesn't it spot that multiple rows are being loaded into a single variable and explode? I am guessing that which row 'wins' the competition to be assigned to the variable is completely indeterminate? Any doco on this behaviour you can point me at, please? The bit I read (http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/fetch_statement.htm) simply says that "You must use either a cursor FOR loop or the FETCH statement to process a multiple-row query", but it doesn't say "the code will silent grab one of the rows at random if you use the FETCH statement on a multiple-row resultset".
(tested on 11.2.0.3, if it makes a difference)>
I realise FETCH fetches one row. The problem is that without a loop, doing so is 'wrong', logically. But it's still allowed, and I can't find anywhere in the doco that says "if you use FETCH, you MUST loop through the results, otherwise we will only return the first row, which will then probably be a bug in your code".
I'm asking for something from the doco (or from a website somewhere, maybe) that explains that "fetch without loops will work, but will be wrong". It's not something I expected, put it that way. It's something I would have thought others would have tripped over before now, anyway. In what I've read, like your code example here, you just see fetch-with-loops, with the unstated assumption made that you'd never do it any other way. I've not seen it explicitly said that it's possible to do it without a loop, but would be a dumb thing to do.
>
Oracle has no way to know what a developer is trying to do or how many rows a cursor will return.
It isn't necessarily true that "fetch without loops will work, but will be wrong". My cursor might only return one row.
What about a BULK COLLECT INTO without a LIMIT clause? Should Oracle tell you that if you query too many records you may run out of memory?
What about a BULK COLLECT INTO with a limit clause? Should Oracle tell you that "bulk collect with limit without a loop will work, but will be wrong"? It isn't necessarily wrong either. -
I was curious as when configuring an ASA to be multiple context mode, what happens to the existing configuration on the ASA? I am more concerned with the managament access configuration. Will that config still be present in the default context?
ThanksHi,
The Cisco documentation seems to indicate that when you change the ASA to Multiple Context mode that it will save the current running configuration to the flash (but it is not used?)
It would also seem that the "admin" Security Context is created but no interface is attached to it in the beginning. I have personally only changed ASAs to Multiple Context mode right out of the box and when they have been setup so, there is rarely a need to change that again.
If you are planning such a change remotely I would advice against it. Or you could perhaps have someone onsite providing you remote connectivity to their computer to do the changes that way so you dont loose connectivity. One option is naturally being onsite yourself.
The ASA Configuration Guide and Command Reference had suprisingly little information regarding this change
Here is one older Cisco ASA/PIX documentation
http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a00808d2b63.shtml#multico
ASA 9.0 Configuration Guide
http://www.cisco.com/en/US/docs/security/asa/asa90/configuration/guide/ha_contexts.html#wp1081764
So at the very least the ASA should make a backup of the old RUNNING CONFIGURATION to the Flash but its really a common/good practice to backup all essential information yourself manually.
I am not 100% sure will the old configuration be used for anything. I just can't remember.
- Jouni -
ASA multiple mode upgrade from 8.2.5 to 8.4.5 to 9.0.3
I'm doing ASA code upgrade with contexts from 8.2.5 to 8.4.5 to 9.0.3 and I'm concerned about the NAT syntax with the new code. Should this automatically changed to the new syntax on all contexts or I have to do it manually. Anyone there with that experience, please advise. Thanks.
Please reply to [email protected]
Thanks.Hello,
I am actually working on a project right now really similar to yours.
When are you planning to perform the Upgrade???
As per Cisco documentation the Upgrade should be done from the system context!
Migration will happen automatically:
I created a post about it
http://www.laguiadelnetworking.com/asa-8-3-upgrade-new-features-known-issues-best-practicesetc/
Enjoy
Rate all of the helpful posts!!!
Regards,
Jcarvaja
Follow me on http://laguiadelnetworking.com -
Can't get mail to push or fetch in sleep mode from exchange.
I'm using 2.2.1 Any idea on how to fix this?
Here are a couple of articles from the apple support website that might help out.
http://support.apple.com/kb/HT1737
http://support.apple.com/kb/HT1414
http://support.apple.com/kb/TS1275
You might need to reset and or restore the iphone to resolve any software issues.
Hope this helps. -
Selecting multiple recording modes in Captivate 3
I'm using Captivate 3. I understand the concept of choosing your mode eg. demo mode but when you first start a project, you are allowed to select multiple modes.
From what I can see however, you can only produce and add content to these multiple outputs simultaneously, at project creation. Multiple .cp files have been created but you can only edit one at a time. Any additional recordings/edits I add to one will not be picked up by the others.
Is that your understanding? Or am I missing something? My intention was to produce both a demo version and a training simulation simultaneously, with editing of captions and additional recording to be carried out afterwards. It's not viable for me to do all my recording in one seamless session.Sorry to disagree a little bit. In some cases having the possibility to create 3 recording modes at once is useful and I do not understand why you say this has been abandoned in later versions? They are still there in Captivate 5, and I think that is the latest version. Could you explain
Useful in this situation: you want to have combination of Show me/Try me/Test in one file. Capture in the 3 modes at once and you can use copy/paste (or import in previous versions) slides to achieve your goal. You will be sure that the setup (resolution etc) and the capture will be identical, whereas if you capture at different times in the different modes this is not always the case. It is much easier to delete some slides than to create slides that fit perfectly in the middle of other previous captured slides.In the case you described, I would capture in 2 modes (Demonstration and Training), then copy the 25% slides I need from the Training mode to the Demonstration file.
Hope you understand this viewpoint?
Lilybiri
Maybe you are looking for
-
How do i track a stolen ipod touch
how do i track a stolen ipod touch
-
Hi All, I am using NWDS 7.0.0 version . Where can I get the jaxp jar file to resolve my error.... Thanks and Regards, Bharath. A
-
MAC TO IPHONE (IPAD) FILE TRANSFER
HI COLLEAGUES WE HAVE A MAC BOOK AIR+2 IPHONE+A IPAD. I KNOW HIW TO COPY (IMPORT) PHOTOS OR MOVIES TO MAC. CAN YOU EXPLAIN ME BY SIMPLEV WORDS HOW TO COPY A FILE (PHOTO,...) FROM MAC TO IPHONE (IPAD)? BY A DOMESTIC WAY THANKS
-
Multiple DB Columns in Single UI Column
Hi All, I have an issue with displaying more than one db columns in one UI column. Issue Description* 1. Presentation List contains the following list of fields Report Id Reporter Name Reporter Business Unit Reporter PhoeNo Reporter Lead Lead Phone P
-
I've added a PayPal button to my iWeb site using the HTML widget. It displays fine in iWeb but when I upload it to my service provider the button shows up with an "Oops!!!" message. When I spoke with PayPal and service provider they could not see t