Disable lazy loading
Hi everybody!
i've searched a way to disable the lazy loading, in order to retrieve all
my datas tree when I need and to test performance.
The problem is that I've found nothing about it and till now I don't know
how to perform it with the version 3.3.2 ...
Can someone help me please?
Best regards,
Rudy
There is no global option to enable or disable whether a field should be
fetched: this is controlled in the metadata.
However, you could always configure all your fields to be in a single
named fetch group, and then control whether they will be fetched by
using the "kodo.FetchGroups" property. See:
http://docs.solarmetric.com/manual.html#kodo.FetchGroups
In article <dajfsf$jq2$[email protected]>, rentsch wrote:
Abe White wrote:
See the "default-fetch-group" field metadata attribute, and Kodo'sdocumentation
on custom fetch groups for additional flexibility:
http://www.solarmetric.com/Software/Documentation/latest/docs/jdo_overview_meta.html
>
http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_fetch.html
Hi ,
I tought about a global option to setup into the .properties file... like
in a previous version of Kodo, if the option
'com.solarmetric.kodo.DefaultFetchThreshold' had the value '-1' then no
lazy loading was performed...
Does exist another option of this type to disable the lazy loading in the
new version?
Marc Prud'hommeaux
SolarMetric Inc.
Similar Messages
-
Disable Lazy Loading for Navigation Properties on Entities in EF 5
Hello all,
Can we disable Lazy Loading for Navigation properties on any entity?
If yes, how we can achieve the same.
Thanks,
NareshHi Naresh;
If you are using code first you can do the following to turn off Lazy loading for a given navigation property. For example
lets say we have a Customers table and a Orders table and a Customer can have 1 to many Orders the following POCO class has a ICollection that is mark as virtual, This causes Lazy loading to happen when a property of order is accessed.
// Lazy Loading Enabled
public class Customers
public int Id { get; set; }
public string Name { get; set; }
public virtual ICollection<Order> Orders { get; set; }
To turn off Lazy loading remove the virtual key word as follows:
// Lazy Loading Is Disabled
public class Customers
public int Id { get; set; }
public string Name { get; set; }
public ICollection<Order> Orders { get; set; }
To turn of Lazy Loading for all entities using Code First you can do the following in the constructor of the DbContext.
public class MyContext : DbContext
public MyContext()
this.Configuration.LazyLoadingEnabled = false;
If the above does not meet your needs please tell us what version of the Entity Framework, which context type you are using, for example ObjectContext or DbContext, and which modeling you are using such as Code First, Model First or Database First.
Fernando (MCSD)
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful". -
How to disable lazy load CLR assembly in sqlserver?
Hi, all:
We are using 'CREATE ASSEMBLY' to have the sqlserver2008 loading the managed assemblies contains implementation of DB trigger, and everything works fine.
While recently several issues reported that after the PC reboot, and our system starts up(some .net application),
the first time we insert some data to tables, which will cause the db trigger logic been executed in the managed assembly loaded to sql server, it would cost a lot of time. After that, all the coming sql operation would be very fast.
We are not sure the 'a lot of time' is caused by lazy load of the managed assembly or the JIT compile of the managed assembly, or something else.
We'd rather user to wait more time at the windows startup, rather than wait in our system(because sometimes it will make our code timeout and not functional). So is there any configuration we can set in sqlserver, or some other 'smart' ways we can do, to
let the sqlserver finish all the works which will cause 'a lot of time' for the first time user operation?
Thanks,
GuohaoYou could embed something that causes your assembly to load in a stored procedure that runs at startup.
http://technet.microsoft.com/en-us/library/ms181720(v=sql.105).aspx
Cheers, Bob -
Bugs in lazy loading of result sets in 2.4.0 RC3
I have a simple query that goes like that
Extent rules = pm.getExtent (RefundRule.class, false);
Query qryRefundRules = pm.newQuery (rules);
qryRefundRules.setFilter("ruleNr >= 0");
Collection refundRules = (Collection) qryRefundRules.execute ();
"ruleNr" is the primary key of the table and is an int.
The generated SQL as something like "select ... from refrule where t0 >= ?"
(perfect)
BUG 1:
The Collection "refundRules" is always empty, even though there are records
with ruleNr >= 0.
After some experimenting I found that the program works as expected if I
disable lazy loading by setting "com.solarmetric.kodo.DefaultFetchThreshold"
to "-1".
BUG2:
The same query without the filter produces another problem
Extent rules = pm.getExtent (RefundRule.class, false);
Query qryRefundRules = pm.newQuery (rules);
Collection refundRules = (Collection) qryRefundRules.execute ();
Now refundRules.size() gets me the correct number of records (35). But
walking through the collection is is very slow and throws this exception
after 10 records are retrieved from the Collection:
javax.jdo.JDODataStoreException: java.sql.SQLException: java.io.IOException:
LNA session closed [code=0;state=null]
NestedThrowables:
java.sql.SQLException: java.io.IOException: LNA session closed
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
tions.java:23)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:201)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:123)
at java.util.AbstractList$Itr.next(AbstractList.java:416)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
at com.globalrefund.refundmanual.Writer.write(Writer.java:92)
at com.globalrefund.refundmanual.Export.main(Export.java:17)
NestedThrowablesStackTrace:
java.sql.SQLException: java.io.IOException: LNA session closed
at
com.pervasive.jdbc.lna.LNAStatement.extendedFetch(LNAStatement.java:559)
at
com.pervasive.jdbc.lna.InsensitiveResultCache.fetchNext(J:/comp/sdk/jdbc/pvj
dbc2/src/com/pervasive/jdbc/lna/InsensitiveResultCache.java:450)
at
com.pervasive.jdbc.lna.InsensitiveResultCache.relative(J:/comp/sdk/jdbc/pvjd
bc2/src/com/pervasive/jdbc/lna/InsensitiveResultCache.java:277)
at com.pervasive.jdbc.v2.ResultSet.next(ResultSet.java:758)
at com.p6spy.engine.spy.P6ResultSet.next(P6ResultSet.java:123)
at
com.solarmetric.datasource.ResultSetWrapper.next(ResultSetWrapper.java:71)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyRes
ultList.java:165)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.jav
a:123)
at java.util.AbstractList$Itr.next(AbstractList.java:416)
at
com.solarmetric.kodo.runtime.objectprovider.ResultListIterator.next(ResultLi
stIterator.java:49)
at com.globalrefund.refundmanual.Writer.write(Writer.java:92)
at com.globalrefund.refundmanual.Export.main(Export.java:17)
Again setting "com.solarmetric.kodo.DefaultFetchThreshold" to "-1" cures the
problem
I use "com.solarmetric.kodo.impl.jdbc.DictionaryClass" =
"com.solarmetric.kodo.impl.jdbc.schema.dict.GenericDictionary" (because I am
testing against Pervasive.SQL)
No other parameter set (everthing default)
Regards,
BernhardThanks! Let me know if you need further information.
Regards,
Bernhard
"Patrick Linskey" <[email protected]> schrieb im Newsbeitrag
news:atioc1$3s0$[email protected]..
Bernhard,
Sorry about the delay getting back to you. We've been busy getting 2.4.0
released. We'll look into the issue further later this week.
-Patrick
Bernhard Mandl wrote:
Does "no response" mean you did not read my post or that you are not
willing
to look into it?
Thanks,
Bernhard
"Bernhard Mandl" schrieb im Newsbeitrag
news:asam6g$1rl$[email protected]..
Abe,
the same program worked perfectly with 2.3.x, so you must have changed
something. I could try to send you a reproducable example, but it will
probably take me a few hours to reduce it to something that I can send.Will
you look into it if I send you instructions how to reproduce? You can
download an evaluation version of Pervasive.SQL from the Pervasive
site.
>>>
Regards,
Bernhard
"Abe White" schrieb im Newsbeitrag
news:as92h5$ban$[email protected]..
Lazy loading works great with other databases (try it out with
Hypersonic
or any other databases you have). Apparently Pervasive.SQL's JDBCdriver
is
giving back invalid information. Since we obviously can't fix that,
you
should just stick with the -1 setting for DefaultFetchThreshold.--
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Many of the sites I visit are instruction text separated by large images. Unfortunately most of these sites implement lazy loading which delays loading the image until you scroll down to it. In some cases scrolling down just leads to a white page until the image loads.
My connection is quite fast enough to load the whole page by the time I have read the first scroll.
I have not found a single browser that allows disabling lazy loading (as if it was not specified in the code). If I disable javascript only the first image loads.
In the days of dialup you could preload all the content from pages that were linked to on a page, in case you clicked the link. Some browsers do something like this but still do not load the images until you scroll there.
Is there anything in about:cfg or an extension that can actually load all the content when I open the URL (I don't care if the images load before the text, that isn't my issue).
Thanks!There's an '''about:config''' entry, called ''' browser.newtab.preload''', (probably) per default set to ''false''. If you set it to'' true'', you will have all tabs ready to watch - once the browser stops twidling thumbs at the beginning of the session.
For any page, you may stumble upon, I do not think there's an easy solution. Browser.newtab.preload, however, may help if it is always the same dozen or so pages you want to see ready for viewing. -
Is there any material about lazy-loading in kodo. If one class contains a
collection type field, how does kodo deal with this field when query the
object ?
Thanks
Liang Zhilong
EMail : [email protected]
Tel : (021)54235858-6650
Fax : (021)54235800
PhotonicBridges Co., Ltd.
12F, 900 Yi Shan Rd., Shanghai 200233Thanks for your kind help, my Chinese friend.
"Sun Bin" <[email protected]> ??????:[email protected]...
I'm also a JDO user. Glad to see your Chinese name!
I think you should not close the pm before any pending use of PC objects.
You may use a ThreadLocal object to get the pm in different methods
without passing the pm as an argument.
see:
http://www.jdocentral.com/forums/index.php?act=ST&f=11&t=625&s=94c11c31c3acd
a1bf154a6d50fde9b36
>
My answers to your former questions:
Lazy loading is configurable according to JDO spec, to the field-level,
and this is called Default-Fetch-Group. By default, all Collections are
lazy-loaded.
As for the "makeTransientAll" behavior, there's some discussion on
JDOCentral.com/forums/
I remember someone pointed out a solution for your need. While, you can
still use a ThreadLocal object to solve this problem.
Liang Zhilong wrote:
I write a class
public class NciEms
protected String emsVersion = null;
protected String type = null;
protected List subnetworkList = new ArrayList();
protected List managedElementList = new ArrayList();
protected List topoLinkList = new ArrayList();
protected List trafficDescriptorList = new ArrayList();
And an application:
// Obtain pm
pm = xx.getPersistenceManager();
// Query out the jdo object
ems = (NciEms)getJdoObject( pm, NciEms.class,
"name=="/EMS=PhotonicBridges@/SNM"" );
// Print the object
Whether "com.solarmetric.kodo.DefaultFetchThreshold" is set to "30" or
"-1"(Disable lazy loading), the output is always:
1.1) name =/EMS=PhotonicBridges@/SNM
1.2) native ems name=PhotonicVision SNM
1.3) owner =None
1.4) user label =PhotonicVision SNM
1.5) ems version = 1.2.0
1.6) type = MSTP
1.7) me list (length:0) = null
1.8) TL list (length:0) = null
1.9) Subnetwork list (length:0) = null
1.10) TD list (length:0) = null
Why ?
If I close the pm after query the object out, and pass this object to
another method, I cannot use this object in that method because pm has
been
closed. I try to makeTransient the object before it is passed, it doeswork.
But when I use the list field in this object(this list field has been
retrieved out in pm), the "PersistenceManager has been closed" exception
turns up again. Need I makeTransientAll every list fields ? It's awful.
If this usage is required, what the best way?
"Liang Zhilong" <[email protected]> __'____________________
:[email protected]...
Furthermore, what granularity is configurable for lazy loading,
global,
class-level or field-level ?
"Liang Zhilong" <[email protected]> __'____________________
:[email protected]...
Is there any material about lazy-loading in kodo. If one class
contains
a
collection type field, how does kodo deal with this field when query
the
object ?
Thanks
Liang Zhilong
EMail : [email protected]
Tel : (021)54235858-6650
Fax : (021)54235800
PhotonicBridges Co., Ltd.
12F, 900 Yi Shan Rd., Shanghai 200233 -
Problem with module lazy loading in flex 3
Hi every body!
I have some problems with Module lazy loading. I am using flex 3.5, Module-flex3-0.14, parsley 3.2.
I can't get the LazyModuleLoadPolicy working correctly.
In my main application (the one that loads the modules), my parsley context is the following:
<cairngorm:LazyModuleLoadPolicy objectId="lazyLoadPolicy" type="{ OpenViewMessage }" />
<cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }"/>
<cairngorm:ParsleyModuleDescriptor objectId="test"
url="TestModule.swf"
applicationDomain="{ClassInfo.currentDomain}"
/>
And to load my module:
[Inject(id="test")]
[Bindable] public var test:IModuleManager;
<core:LazyModulePod
id="moduleLoader"
moduleManager="{test}"
moduleId="testModule"
/>
with LazyModulePod.mxml:
<mx:Canvas
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:module="com.adobe.cairngorm.module.*"
xmlns:parsley="http://www.spicefactory.org/parsley">
<mx:Script>
<![CDATA[
import com.adobe.cairngorm.module.ILoadPolicy;
import com.adobe.cairngorm.module.IModuleManager;
[Bindable]
public var moduleId:String;
[Bindable]
public var moduleManager:IModuleManager;
[Bindable]
[Inject(id="lazyLoadPolicy")]
public var lazyLoadPolicy:ILoadPolicy;
]]>
</mx:Script>
<parsley:Configure/>
<module:ViewLoader id="moduleLoader"
moduleId="{ moduleId }"
moduleManager="{ moduleManager }"
loadPolicy="{lazyLoadPolicy}">
<!--<module:loadPolicy>
<module:BasicLoadPolicy/>
</module:loadPolicy>-->
</module:ViewLoader>
</mx:Canvas>
OpenViewMessage.as in a swc:
public class OpenViewMessage
private var _moduleId:String;
private var _viewId:String;
public function OpenViewMessage(moduleId:String, viewId:String)
this._moduleId = moduleId;
this._viewId = viewId;
public function get viewId():String{
return _viewId;
[ModuleId]
public function get moduleId():String
return _moduleId;
In another flex project, my module context is:
<mx:Object
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:controler="com.cegedim.myit.controler.*">
<controler:WindowControler/>
</mx:Object>
The module implements IParsleyModule
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
implements="com.adobe.cairngorm.module.IParsleyModule"
xmlns:spicefactory="http://www.spicefactory.org/parsley">
<mx:Script>
<![CDATA[
import org.spicefactory.parsley.flex.FlexContextBuilder;
import com.adobe.cairngorm.module.IParsleyModule;
public function get contextBuilder():ContextBuilderTag
return contextBuilderTag;
]]>
</mx:Script>
<spicefactory:ContextBuilder id="contextBuilderTag" config="{ MyITTestModuleContext }"/>
<spicefactory:Configure/>
</mx:Module>
and the WindowControler:
public class WindowControler
public function WindowControler(){}
[Init]
public function initialize():void
Alert.show("Module Initialized");
[MessageHandler(scope="local")]
public function openViewMessageHandler(message:OpenViewMessage):void
Alert.show("Opening view " + message.viewId + " in the module " + message.moduleId);
If i uncomment the basicLoadPolicy in LazyModulePod.mxml and remove the lazyModuleLoadPolicy, everything works fine. The module is loaded when it's added to stage and it receives correctly messages dispatched to it. But with the lazy policy the module never loads.
I may have missed something or there is somthing i don't understand because i tried the ModuleTest provided in example in cairngorm sources. It works fine (i mean loading the moduleA2 when receiving a message), but if i replace the change the lazyModulePolicy to listen to broadcasted messages instead of a pingMessage, the module never loads too.
<cairngorm:LazyModuleLoadPolicy objectId="lazyLoadPolicy" type="{ BroadcastMessage }" />
<cairngorm:ModuleMessageInterceptor
type="{ BroadcastMessage }" moduleRef="moduleA" />
public class BroadcastMessage
public function BroadcastMessage()
If someone has any clue, i'll be happy to test it =)
Thanks.Hello, back on my issue, i tested a little bit more the message dispaching.
I read the lazyLoadPolicy class and noticed that it always has to have a ModuleId property in the message to work, that's why the broadcast message didn't work to awake the module with the lazy loading policy.
So i added copy of my module:
<cairngorm:ParsleyModuleDescriptor objectId="test"
url="TestModule.swf"
applicationDomain="{ClassInfo.currentDomain}"
/>
<cairngorm:ParsleyModuleDescriptor objectId="testbis"
url="TestModuleBis.swf"
applicationDomain="{ClassInfo.currentDomain}"
/>
Set them both with a basicLoadPolicy, and tries to dispatch a message to only one of them using the ModuleId metatag. I then noticed that both modules received the message and not only the one i expected.
I then changed the ModuleMessageInterceptor configuration to dispatch to only one kind of module:
<cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }" moduleRef="test"/>
and this worked as expected. Only the first module catched the message. I am obiously messing with the ModuleId metatag but i cannot see what's wrong...
I compiled with
-keep-as3-metadata+=ModuleId
but this hasn't changed anything... -
It doesn�t work lazy loading with remote client (toplink)
I am trying to use lazy loading in a @ManyToOne field but I get an exception. I have been reading in some oracle tutorials that it's necesary use -javaagent:.../lib/toplink-essentials-agent.jar for that it works because this argument activate dynamic weaving in JavaSE. I have put this command line argument javaagent but it doesn't work. Why? Can I have to do another thing? I have done a lot of tests in base to comments read in another forums but I only obtains an exception.
Caused by: java.io.IOException: Mismatched serialization UIDs
NOTE: The server use toplink and the remote client query the entitties through a session bean of the server. Besides, I am using Glassfish (Sun application server and toplink).
Thanks in advance.
haykenAt first, thank you for your reply.
I know that I haven´t explained the problem too well. I have a stateless bean with one remote method that execute a query an returns an entity like this
@Entity
public class ModuloEntity extends Serializable
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idModulo;
private String nombre;
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="IdProyecto")
private ProyectoEntity proyecto;
The remote client invoke this method and in that moment I get this exception.
21-may-2007 18:55:48 com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
ADVERTENCIA: "IOP00810211: (MARSHAL) Exception from readValue on ValueHandler in CDRInputStream"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 211 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.valuehandlerReadException(ORBUtilSystemException.java:7053)
Caused by: java.io.IOException: Mismatched serialization UIDs : Source (Rep. IDRMI:com.syskonic.gesplan.entities.ModuloEntity:6D06A8C14D488FFF:8E6FC8687EA9E512) = 8E6FC8687EA9E512 whereas Target (Rep. ID RMI:com.syskonic.gesplan.entities.ModuloEntity:1C6925798CDFD3DF:3455DBF4457AE337) = 3455DBF4457AE337
at com.sun.corba.ee.impl.util.RepositoryId.useFullValueDescription(RepositoryId.java:573)
If I look the server log, I can see that the call has not been produced, it doesn´t show any exception. It looks that the object managed by the server and the remote client aren´t the same and the corba service doesn´t work when remote client call session method. If I change the ModuloEntity and remove the fetch attribute then all this process executes correctly. The problem is in this attribute.
NOTE: I am using the javaagent command line argument.
Hayken -
Facing problem with lazy loading in ejb3.0
The following error is coming up when i try to access the collection in the entity entity bean. i am using entitymanager.find() to retrieve the entity. intial set of values are coming fine but when try to access the collection in the entity the error is coming up. one solution is to make the fetch type=eager. but can we do lazy loading with out any problem. the following is the error. kindly help me in this. do i need to do anything extra that mean have to add any annotations or anything.
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.lucid.erp.entities.EmployeeDTO.addresses, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentBag.get(PersistentBag.java:422)
at com.lucidlabs.erp.actions.EmployeeAction.view(EmployeeAction.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:184)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
atthis is transactions 101 material. Do you know about transactions and how they work? Do you know about managed entities?
The problem you are having is that the addresses are accessed outside of the transaction in which the entity was fetched. That means there is no more database session and thus the lazy fetch cannot work. If you really need the addresses, you can at least force fetch them by calling getAddresses().size() right after you fetch the entity from the database; assuming that the transaction is still active at that point. -
Hello,
We are running into a ConcurrentModificationException when we are firing 100 concurrent requests without warming up the server.
Looks like the error is coming up when a a relationship is being lazy loaded.
We are seeing this behavior consistently. Once the server is warmed up, we are not seeing any issues under concurrency.
I am attaching the two DAOs that are related to the issue.
ExtensionPointRulesetDAO has a M:1 relationship with RuleSetEntityDAO and we are getting the error when ExtensionPointRuleSetDAO._persistence_get_ruleSetEntity() is called.
2015-02-13 12:14:24,021 ERROR [uimadmin] [[ACTIVE] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'] [ExtensionRuleMediator] [INV-180012] Failed to retrieve the extension point ruleset: null.
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
at java.util.ArrayList$Itr.next(ArrayList.java:831)
at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:134)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:574)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1717)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:253)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:666)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2656)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2627)
at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:450)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1081)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:844)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)
at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:418)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1128)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
at org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:98)
at org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.instantiateForUnitOfWorkValueHolder(QueryBasedValueHolder.java:113)
at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:156)
at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:222)
at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:88)
at oracle.communications.platform.entity.impl.ExtensionPointRuleSetDAO._persistence_get_ruleSetEntity(ExtensionPointRuleSetDAO.java)
at oracle.communications.platform.entity.impl.ExtensionPointRuleSetDAO.getRuleSetEntity(ExtensionPointRuleSetDAO.java:272)
at oracle.communications.inventory.extensibility.extension.util.ExtensionRuleMediator.findExtensionPointRule(ExtensionRuleMediator.java:267)
at oracle.communications.inventory.extensibility.extension.util.ExtensionRuleMediator.initialize(ExtensionRuleMediator.java:134)
at oracle.communications.inventory.extensibility.extension.SpecBasedArgumentExtension.configureMediator(SpecBasedArgumentExtension.aj:134)
Thanks,
RavindraHi,
Found a note explaining the significance of these errors.
It says:
"NZE-28862: SSL connection failed
Cause: This error occurred because the peer closed the connection.
Action: Enable Oracle Net tracing on both sides and examine the trace output. Contact Oracle Customer support with the trace output."
For further details you may refer the Note: 244527.1 - Explanation of "SSL call to NZ function nzos_Handshake failed" error codes
Thanks & Regards,
Sindhiya V. -
ORA-01002/ Fetch out of sequence on lazy loading
Hello,
We are facing an oracle SQLException (ORA-01002: fetch out of sequence)
while we are trying to get a field (retrieved via lazy loading) from an
object that was retrieved using a kodoquery.
This error only occurs during performance testing under a heavy load.
(100 concurrent users). For each thread we get a new persistencemanager
from the factory. And we have put the multithreaded option to true.
Can anyone help us with this problem?
Thanks in advance,
Kind Regards,
Niels Soeffers
Caused by: java.sql.SQLException: ORA-01002: fetch out of sequence
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at
oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1027)
at
oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:291)
at
oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:213)
at
com.solarmetric.jdbc.DelegatingResultSet.next(DelegatingResultSet.java:97)
at kodo.jdbc.sql.ResultSetResult.nextInternal(ResultSetResult.java:151)
at kodo.jdbc.sql.AbstractResult.next(AbstractResult.java:123)
at kodo.jdbc.sql.Select$SelectResult.next(Select.java:2236)
at
kodo.jdbc.meta.AbstractCollectionFieldMapping.load(AbstractCollectionFieldMapping.java:592)
at kodo.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java:521)
at
kodo.runtime.DelegatingStoreManager.load(DelegatingStoreManager.java:133)
at kodo.runtime.ROPStoreManager.load(ROPStoreManager.java:79)
at kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java:3166)
at kodo.runtime.StateManagerImpl.loadField(StateManagerImpl.java:3265)
at kodo.runtime.StateManagerImpl.isLoaded(StateManagerImpl.java:1386)
at
com.ardatis.ventouris.domain.OntvangstReeks.jdoGetontvangstTransacties(OntvangstReeks.java)
at
com.ardatis.ventouris.domain.OntvangstReeks.getStatus(OntvangstReeks.java:72)
at
com.ardatis.ventouris.service.financien.transfer.FinancienTOAssembler.getOntvangstReeksBaseTO(FinancienTOAssembler.java:71)
at
com.ardatis.ventouris.service.financien.transfer.FinancienTOAssembler.getOntvangstReeksBaseTOs(FinancienTOAssembler.java:84)
at
com.ardatis.ventouris.service.financien.FinancienManagerImpl.getOntvangstReeksBaseTOs(FinancienManagerImpl.java:241)
at
com.ardatis.ventouris.service.financien.ejb.FinancienManagerBean.getOntvangstReeksBaseTOs(FinancienManagerBean.java:62)
at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
at
com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
at $Proxy31.getOntvangstReeksBaseTOs(Unknown Source)
at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)We are using Oracle 10g and have tried multiple dirvers. (classes12.jar,
ojdbc14.jar)
Our kodo.properties ( actually the ra.xml we supply with the kodo.rar )
<connector>
<display-name>KodoJDO</display-name>
<description>Resource Adapter for integration of the Kodo Java Data
Objects (JDO) implementation with J2EE 1.3 compliant managed
environments</description>
<vendor-name>Solarmetric, Inc.</vendor-name>
<spec-version>1.0</spec-version>
<eis-type>jdo</eis-type>
<version>1.0</version>
<license>
<description>
See http://www.solarmetric.com for terms and license conditions.
</description>
<license-required>true</license-required>
</license>
<resourceadapter>
<managedconnectionfactory-class>kodo.jdbc.ee.JDBCManagedConnectionFactory</managedconnectionfactory-class>
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>kodo.jdbc.ee.JDBCConnectionFactory</connectionfactory-impl-class>
<connection-interface>javax.resource.cci.Connection</connection-interface>
<connection-impl-class>kodo.runtime.PersistenceManagerImpl</connection-impl-class>
<transaction-support>XATransaction</transaction-support>
<config-property>
<description>A comma-separated list of query aggregate listeners
to add to the default list of extensions. Each listener must implement
the kodo.jdbc.query.JDBCAggregateListener interface.</description>
<config-property-name>AggregateListeners</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The kodo.jdbc.meta.ClassIndicator to use by default
for new mappings. The class indicator is responsible for tracking the
concrete class or subclass implemented by the object stored in each row of
a table.</description>
<config-property-name>ClassIndicator</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>in-class-name</config-property-value>
</config-property>
<config-property>
<description>The kodo.util.ClassResolver implementation that
should be used for JDO class resolution. Defaults to a JDO spec-compliant
resolver.</description>
<config-property-name>ClassResolver</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>spec</config-property-value>
</config-property>
<config-property>
<description>Details about various compatibiity levels for the
current environment.</description>
<config-property-name>Compatibility</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<config-property>
<description>The class name of either the JDBC java.sql.Driver, or
an instance of a javax.sql.DataSource to use to connect to the non-XA data
source.</description>
<config-property-name>Connection2DriverName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The password for the user specified in
Connection2UserName</description>
<config-property-name>Connection2Password</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of properties to be passed to
the non-XA JDBC Driver when obtaining a Connection. Properties are of the
form "key=value". If the given JDBC Driver class is a DataSource, these
properties will be used to configure the bean properties of the
DataSource. </description>
<config-property-name>Connection2Properties</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The URL for the non-XA data source.</description>
<config-property-name>Connection2URL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The username for the connection listed in
Connection2URL.</description>
<config-property-name>Connection2UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of
com.solarmetric.jdbc.ConnectionDecorator implementations to install on all
connection pools.</description>
<config-property-name>ConnectionDecorators</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The class name of either the JDBC java.sql.Driver, or
an instance of a javax.sql.DataSource to use to connect to the data
source.</description>
<config-property-name>ConnectionDriverName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The JNDI name of the connection factory to use for
finding non-XA connections. If specified, this is the connection that
will be used for obtaining sequence numbers.</description>
<config-property-name>ConnectionFactory2Name</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>jdbc/VentourisNonXA</config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of properties used to
configure the javax.sql.DataSource used as the non-XA ConnectionFactory.
Each property should be of the form "key=value", where "key" is the name
of some bean-like property of the data source.</description>
<config-property-name>ConnectionFactory2Properties</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The JNDI name of the connection factory to use for
obtaining connections.</description>
<config-property-name>ConnectionFactoryName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>jdbc/Ventouris</config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of properties used to
configure the javax.sql.DataSource used as the ConnectionFactory. Each
property should be of the form "key=value", where "key" is the name of
some bean-like property of the data source.</description>
<config-property-name>ConnectionFactoryProperties</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The password for the user specified in
ConnectionUserName</description>
<config-property-name>ConnectionPassword</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of properties to be passed to
the JDBC Driver when obtaining a Connection. Properties are of the form
"key=value". If the given JDBC Driver class is a DataSource, these
properties will be used to configure the bean properties of the
DataSource. </description>
<config-property-name>ConnectionProperties</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>This property dictates when PersistenceManagers will
retain and release data store connections. Available options are
"on-demand" for retaining a connection only during pessimistic
transactions and data store operations, "transaction" for retaining a
connection for the life of each transaction, or "persistence-manager" to
indicate that a persistence manager should retain and reuse a single
connection for its entire lifespan.</description>
<config-property-name>ConnectionRetainMode</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>transaction</config-property-value>
</config-property>
<config-property>
<description>The URL for the data source.</description>
<config-property-name>ConnectionURL</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The username for the connection listed in
ConnectionURL.</description>
<config-property-name>ConnectionUserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>Set to true if you''d like Kodo to copy all object
ids before returning them to your code. If you do not plan on modifying
identity objects, you can set this property to false to avoid the copying
overhead.</description>
<config-property-name>CopyObjectIds</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<config-property>
<description>Plugin used to cache data loaded from the data store.
Must implement kodo.datacache.DataCache.</description>
<config-property-name>DataCache</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The number of milliseconds that data in the data
cache is valid for. A value of 0 or less means that by default, cached
data does not time out.</description>
<config-property-name>DataCacheTimeout</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>-1</config-property-value>
</config-property>
<config-property>
<description>The type of data source in use. Available options
are "local" for a standard data source under Kodo''s control, or
"enlisted" for a data source managed by an application server and
automatically enlisted in global transactions.</description>
<config-property-name>DataSourceMode</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>enlisted</config-property-value>
</config-property>
<config-property>
<description>The kodo.jdbc.sql.DBDictionary to use for database
interaction. This is auto-detected based on the setting of
javax.jdo.option.ConnectionURL, so you need only set this to override the
default with your own custom dictionary or if you are using an
unrecognized driver.</description>
<config-property-name>DBDictionary</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>Whether to dynamically create custom structs to hold
and transfer persistent state in the Kodo data cache and remote
persistence manager frameworks. Dynamic structs can reduce data cache
memory consumption, reduce the amount of data serialized back and forth
under remote persistence managers, and improve the overall performance of
these systems. However, they increase application warm-up time while the
custom classes are generated and loaded into the JVM. Set to true to
enable dynamic data structs.</description>
<config-property-name>DynamicDataStructs</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<config-property>
<description>Specifies the default eager fetch mode to use.
Either "none" to never eagerly-load relations, "join" for selecting 1-1
relations along with the target object using inner or outer joins, or
"parallel" for selecting 1-1 relations via joins, and collections
(including to-many relations) along with the target object using separate
select statements executed in parallel.</description>
<config-property-name>EagerFetchMode</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>parallel</config-property-value>
</config-property>
<config-property>
<description>The number of rows that will be pre-fetched when an
element in a Query result is accessed. Use -1 to pre-fetch all
results.</description>
<config-property-name>FetchBatchSize</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>-1</config-property-value>
</config-property>
<config-property>
<description>The name of the JDBC fetch direction to use.
Standard values are "forward", "reverse", and "unknown".</description>
<config-property-name>FetchDirection</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>forward</config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of fetch group names that
PersistenceManagers will load by default when loading data from the data
store.</description>
<config-property-name>FetchGroups</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of query filter listeners to
add to the default list of extensions. Each listener must implement the
kodo.jdbc.query.JDBCFilterListener interface.</description>
<config-property-name>FilterListeners</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>Whether or not Kodo should automatically flush
modifications to the data store before executing queries.</description>
<config-property-name>FlushBeforeQueries</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>with-connection</config-property-value>
</config-property>
<config-property>
<description>If true, Kodo will order all SQL inserts, updates,
and deletes to meet your schema''s foreign key constraints. Defaults to
false.</description>
<config-property-name>ForeignKeyConstraints</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<config-property>
<description>If false, then the JDO implementation must consider
modifications, deletions, and additions in the PersistenceManager
transaction cache when executing a query inside a transaction. Else, the
implementation is free to ignore the cache and execute the query directly
against the data store.</description>
<config-property-name>IgnoreCache</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<config-property>
<description>Plugin used to manage inverse relations during flush.
Set to true to use the default inverse manager. Custom inverse managers
must extend kodo.runtime.InverseManager.</description>
<config-property-name>InverseManager</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of
com.solarmetric.jdbc.JDBCListener implementations to install on all
connection pools.</description>
<config-property-name>JDBCListeners</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The license key provided to you by SolarMetric. Keys
are available at www.solarmetric.com</description>
<config-property-name>LicenseKey</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value><KEY-REMOVED></config-property-value>
</config-property>
<config-property>
<description>Plugin used to handle acquiring locks on persistent
instances. Must implement kodo.runtime.LockManager.</description>
<config-property-name>LockManager</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>pessimistic</config-property-value>
</config-property>
<config-property>
<description>The number of milliseconds to wait for an object lock
before throwing an exception, or -1 for no limit.</description>
<config-property-name>LockTimeout</config-property-name>
<config-property-type>java.lang.Integer</config-property-type>
<config-property-value>-1</config-property-value>
</config-property>
<config-property>
<description>LogFactory and configuration for Kodo''s logging
needs.</description>
<config-property-name>Log</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>kodo(DefaultLevel=WARN, Tool=WARN,
Runtime=WARN, SQL=WARN)</config-property-value>
</config-property>
<config-property>
<description>The mode to use for calculating the size of large
result sets. Legal values are "unknown", "last", and "query".</description>
<config-property-name>LRSSize</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>query</config-property-value>
</config-property>
<config-property>
<description>Plugin used to integrate with an external transaction
manager. Must implement kodo.runtime.ManagedRuntime.</description>
<config-property-name>ManagedRuntime</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>auto</config-property-value>
</config-property>
<config-property>
<description>Plugin used to configure management and profiling
capabilities.</description>
<config-property-name>ManagementConfiguration</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>none</config-property-value>
</config-property>
<config-property>
<description>The kodo.jdbc.meta.MappingFactory that will provide
the object-relational mapping information needed to map each persistent
class to the database.</description>
<config-property-name>MappingFactory</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>file</config-property-value>
</config-property>
<config-property>
<description>Plugin used to create metadata about persistent
types. Must implement kodo.meta.MetaDataLoader</description>
<config-property-name>MetaDataLoader</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>jdo</config-property-value>
</config-property>
<config-property>
<description>If true, then the application plans to have multiple
threads simultaneously accessing a single PersistenceManager, so measures
must be taken to ensure that the implementation is thread-safe. Otherwise,
the implementation need not address thread safety.</description>
<config-property-name>Multithreaded</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<config-property>
<description>If true, then it is possible to read persistent data
outside the context of a transaction. Otherwise, a transaction must be in
progress in order read data.</description>
<config-property-name>NontransactionalRead</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<config-property>
<description>If true, then it is possible to write to fields of a
persistent-nontransactional object when a transaction is not in progress.
If false, such a write will result in a JDOUserException.</description>
<config-property-name>NontransactionalWrite</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<config-property>
<description>Determines the persistence manager's behavior in
calls to getObjectById with a validate parameter of false. Use "check" to
check that a database record exists for the object and load its fetch
group fields. Use "hollow" to return a hollow instance.</description>
<config-property-name>ObjectLookupMode</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>check</config-property-value>
</config-property>
<config-property>
<description>Selects between optimistic and pessimistic (data
store) transactional modes.</description>
<config-property-name>Optimistic</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<config-property>
<description>Action to take when Kodo discovers an orphaned key in
the database. May be a custom action implementing
kodo.event.OrphanedKeyAction.</description>
<config-property-name>OrphanedKeyAction</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>log</config-property-value>
</config-property>
<config-property>
<description>The name of the concrete implementation of
javax.jdo.PersistenceManagerFactory that
javax.jdo.JDOHelper.getPersistenceManagerFactory () should create. For
Kodo JDO, this should be kodo.jdbc.runtime.JDBCPersistenceManagerFactory
or a custom extension of this type.</description>
<config-property-name>PersistenceManagerFactoryClass</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>kodo.jdbc.runtime.JDBCPersistenceManagerFactory</config-property-value>
</config-property>
<config-property>
<description>Persistence manager plugin and properties. If you
use a custom class, it must extend
kodo.runtime.PersistenceManagerImpl.</description>
<config-property-name>PersistenceManagerImpl</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>default</config-property-value>
</config-property>
<config-property>
<description>Configure this persistence manager factory to service
remote persistence managers.</description>
<config-property-name>PersistenceManagerServer</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>false</config-property-value>
</config-property>
<config-property>
<description>A comma-separated list of the class names of all
persistent classes to register whenever a persistence manager is
obtained.</description>
<config-property-name>PersistentClasses</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>com.ardatis.ventouris.domain.KwartaalVerhoging,
com.ardatis.ventouris.domain.Land, com.ardatis.ventouris.domain.Gemeente,
com.ardatis.ventouris.domain.Adres,
com.ardatis.ventouris.domain.ContactGegeven,
com.ardatis.ventouris.domain.AdresContactGegeven,
com.ardatis.ventouris.common.type.AdresType,
com.ardatis.ventouris.domain.OntvangstTransactie,
com.ardatis.ventouris.domain.OntvangstReeks,
com.ardatis.ventouris.domain.Ontvangst,
com.ardatis.ventouris.domain.Inkomen,
com.ardatis.ventouris.domain.loopbaan.LoopbaanPeriode,
com.ardatis.ventouris.common.type.InkomenSoort,
com.ardatis.ventouris.common.type.INSZ,
com.ardatis.ventouris.domain.Aangeslotene,
com.ardatis.ventouris.domain.NatuurlijkePersoon,
com.ardatis.ventouris.domain.Persoon, com.ardatis.ventouris.domain.Rol,
com.ardatis.ventouris.domain.Dossier,
com.ardatis.ventouris.common.type.Geslacht,
com.ardatis.ventouris.common.type.Taal,
com.ardatis.ventouris.common.type.Nationaliteit,
com.ardatis.ventouris.common.type.KostType,
com.ardatis.ventouris.domain.Verhoging,
com.ardatis.ventouris.domain.Aanvraag,
com.ardatis.ventouris.domain.AanvraagAansluitingSS,
com.ardatis.ventouris.domain.AanvraagToestand,
com.ardatis.ventouris.common.type.AanvraagToestandType,
com.ardatis.ventouris.domain.Factuur,
com.ardatis.ventouris.domain.TaakType, com.ardatis.ventouris.domain.Taak,
com.ardatis.ventouris.domain.BijdrageBerekening,
com.ardatis.ventouris.domain.calculationparameters.HerwaarderingsIndex,
com.ardatis.ventouris.domain.integration.asis.TempInterneOntvangst,
com.ardatis.ventouris.domain.calculationparameters.InkomenGrens,
com.ardatis.ventouris.domain.calculationparameters.BijdrageCategorie,
com.ardatis.ventouris.domain.calculationparameters.BijdrageCategorieGroep,
com.ardatis.ventouris.domain.integration.asis.TempOntvangstKinderbijslag,
com.ardatis.ventouris.domain.calculationparameters.JaarVerhogingParameter,
com.ardatis.ventouris.domain.calculationparameters.KwartaalVerhogingParameter,
com.ardatis.ventouris.domain.UitgaveReeks,
com.ardatis.ventouris.domain.Uitgave,
com.ardatis.ventouris.domain.Terugbetaling,
com.ardatis.ventouris.domain.BedragTerugbetaald,
com.ardatis.ventouris.domain.BijdrageSS</config-property-value>
</config-property>
<config-property>
<description>Plugin used to proxy second class object fields of
managed instances. Must implement kodo.util.ProxyManager.</description>
<config-property-name>ProxyManager</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>default</config-property-value>
</config-property>
<config-property>
<description>Plugin used to cache query results loaded from the
data store. Must implement kodo.datacache.QueryCache.</description>
<config-property-name>QueryCache</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<config-property>
<description>Plugin used to cache query compilation data. Must
implement java.util.Map. Does not need to be thread-safe -- it will be
wrapped via the Collections.synchronizedMap() method if it does not extend
kodo.util.CacheMap.</description>
<config-property-name>QueryCompilationCache</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>true</config-property-value>
</config-property>
<config-property>
<description>The default lock level to use when loading objects
within non-optimistic transactions. Set to none, read, write, or the
numeric value of the desired lock level for your lock
manager.</description>
<config-property-name>ReadLockLevel</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>read</config-property-value>
</config-property>
<config-property>
<description>Plugin used to communicate commit information among
JVMs. Must implement kodo.event.RemoteCommitProvider.</description>
<config-property-name>RemoteCommitProvider</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>Whether or not RemoteCommitEvents will include the
object Ids of objects added during the transaction.</description>
<config-property-name>RemoteCommitTransmitAddObjectIds</config-property-na -
Lazy loading loads eager anyway ?
Hello,
I read in some articles and books that the lazy loading in EJB 3.0 is just a hint, in the sence that the persistence manager could decide to load eager, even if lazy configured.
Is this correct, or will the default lazy loading always only fetch when asked ?
C.This is true in the JPA Spec, i.e. meaning that supporting lazy loading is "optional" not required by the JPA Spec.
However TopLink does support lazy loading. By default any @OneToMany or @ManyToMany mappings are lazy and will not be fetched until accessed. By default in the JPA Spec @OneToOne and @ManyToOne are not lazy, but if you set them to be lazy then TopLink will also support this, as long as you enable weaving (weaving is not require for @ToManys). I would recommend you always make your @OneToOne and @ManyToOne lazy. Weaving in TopLink can be enable either through using the TopLink agent when launching your Java VM, or is used automatically in OracleAS or Glassfish, or through using the TopLink static weaving ant task.
In TopLink Essentials lazy on @Basic mappings is not supported, however this will be supported in TopLink 11g. -
Lazy Loading, Muse, and Scripts
Hi, I'm trying to integrate Lazy loading with Muse in a Web Site.
I would like know if anyone has a better workflow...
So, first I uploaded to the server the "lazy loading content"
http://dandalo.net/teste/lazy-patricia/lazy-pat.html
Then, in Muse, I inserted the html from the page source that I had uploaded.
http://dandalo.net/teste/export-muse/detalhes-old.html
But it didn't work... : (
So...
I have started looking at the html code that Muse created and fond this special phrase... <!-- Other scripts -->
Then, I tried this:
Coping the scripts from the "lazy loading content" page and pasting it after this special line:
http://dandalo.net/teste/export-muse/detalhes.html
And it Worked !!!
PS: The java scrips should be in root folder, not in the Scripts folder that Muse created
Does anyone have any tip or workflow not to have to edit the html file to add these script lines?Hi
Do you have the link to the "lazy loading content"?
I can't find a proper way to do it.
Thanks -
JPA - lazy loading for LOB field
Hi all,
JPA 1.0 specification mandates that all JPA-compliant implementation support lazy loading for certain kind of entity field.
For LOB fields lazy loading is OPTIONAL.
I am experiencing odd runtime behaviors on my custom software which would point to this feature not being supported.
Can anyone please tell me if SAP JPA 1.0 implementation on NW CE 711 implements this feature or not?
Thanks in advance
Regards
VincenzoHi Vincenco,
I am sure that this is the same as with single-valued relationships (@OneToOne, @ManyToOne): Lazy loading would require bytecode manipulation/generation, so SAP JPA does not support it in 7.20 (and of course not in 7.11)
See tulsi jiddimani's elaborate answer here: Re: JPA: Documentation on LazyLoad.
In 7.30 enhancements, you really can find lazy loading support for single-valued relationships with getReference.
http://help.sap.com/saphelp_nw73/helpdata/en/68/f676ef36094f4381467a308a98fd2a/content.htm
but @Lob and @Basic is not mentioned.
If you need lazy loading in 7.11, you have two alternatives:
1. Put the Lob fields into separate entities, work around the missing feature in SAP JPA with ugly @OneToMany - Relations
2. Use another persistence provider like EclipseLink, read Sabine Heider's blogs about integrattion of EclipseLink in SAP NetWeaver and static bytecode weaving for lazy loading. /people/sabine.heider/blog
Regards
Rolf -
Hello all!
I have three question regarding lazy loading:
Question one: Can it be said that java works by lazy loading by default?
Question two: What is the opposite of lazy loading?
Question three: How can I change this default behavior to the opposite of lazy loading?
Thanks in advance,
Julien.1. Yes.
2. Eager loading.
3. You can't. You can get a half-decent approximation using a suitable classloader, though. After defining your class, you parse the string table and load the classes referred to therein. BCEL may useful for the parsing.
Maybe you are looking for
-
Unable to sync, "unknown error (-50)"
I have been having this problem for a couple months now, and cannot find anything in the forums- even the guy at the Genius Bar wasn't sure what to do- I'm HOPING someone here can help. A while ago my old ipod photo stopped syncing. It would put up a
-
Since I got my new iMac, or since I upgraded to iTunes 10 (which happened at the same time), iTunes opens erratically with no iPod or iPhone attached. It even starts playing the first song/book in the list that was opened in the last session. What ca
-
Help with Developer Toolbox...
I am getting the following message when I try to download a file by clicking on the link that was created by the download file server behavior: (ERR_DOWNLOAD_FILE_NO_READ) Can anyone help?
-
Solution to using Aperture for ordering books from other companies?
I am a professional photographer who has been using Photoshop CS3 to design and output books for Shared Ink, WHCC and others. While SharedInk does accept PDF files, they're complicated to construct in just the right format. WHCC will only accept prop
-
Run Time error - can't synch calendar or contcts
I plugged my 8700 into the desktop while the inbox was archiving, by mistake. Everything froze and I had to re-boot the computer. Ever since, synching with my desktop is broken. I get a message that says Run Time Error, then it gives the file name