Deferred Instantiation
We have a collection business object that contains business objects. Within
this collection object we have an attribute which is itself a business
collection object. What we would like to do is this. We want to be able to
instantiate the "main" collection object without instantiating its
attribute's collection object (thus we wish to defer instantiation of
subcollections within this collection object).
As it stands to instantiate our subcollection object we perform something
like the following when the user calls a method on the main collection like
GetSubCollectAttrib():
if SubCollectionAttrib = NIL then
SubCollectionAttrib = ServerSO.GetSubCollection();
end if;
return SubCollectionAttrib;
My questions are these. Should a business object have any knowledge that a
ServerSO even exists? What other ways have people gotten around the issue
of deferred instantiation? (Or is there a white paper or tech note we should
be looking at.)
Thanks in advance.
Anthony J. Falabella
[email protected]
Tony -
There may well be problems with a business data object (BDO) referencing an
SO to fill in the deferred attributes - if the BDO migrates between
partitions the SO reference may become either unsupported or inappropriate.
One approach is to place the deferred instantiation logic in what has been
called a Partition-Visible object; this has been discussed previously in
this list - feel free to contact me for details. The BDO (or any other
party) can call this universal local facility to perform the deferred
instantiation, passing the BDO reference. A related problem is how to
determine which of three states an attribute is in: valued, deferred, or
NIL; using NIL for deferred is obviously a problem if three-way resolution
is needed. Not distinguishing between deferred and NIL states may be
expensive, if database i/o or other overhead is involved in instantiation.
Possible solutions that come to mind are paired flag attributes, flag
attributes reflecting the state of a whole group of value attributes, and
byte-string flags - I'd be interested in hearing othe suggestions on this
issue....
All the best -
Gerard R. Connolly
GRC Associates, Inc. - A Forte Consultancy
610/296-0688
Similar Messages
-
Deferred instantiation for Flex 4?
In Flex 3, we can set the following properties in a container object for deferred instantiation:
creationPolicy = "queued"
creationIndex = "1" (or "2" or "3" etc.)
In Flex 4, for I can find the creationPolicy property but there is no creationIndex - trying to set the creationIndex throws a "deprecated" warning but there is no hint on what to use otherwise
Any ideas?
Thanks - SamiSpark will not support queued creationPolicy so there is no replacement.
-
Revision: 3065
Author: [email protected]
Date: 2008-09-02 16:52:05 -0700 (Tue, 02 Sep 2008)
Log Message:
Initial checkin of the deferred instantiation feature for Gumbo.
ItemsComponent has a "creationPolicy" property that controls when the content items are created. Possible values are:
* "all" - content is created as soon as the ItemsComponent is created
* "auto" - content is created as soon as it is needed
* "none" - content is not automatically created. When this creationPolicy is set, you must call createDeferredContent().
The "contentCreationComplete" event is sent when the content has been created.
Added IDeferredContentOwner interface. ItemsComponent is the only Gumbo component that implements this interface.
Reviewers: Corey, Ryan, Chet
Modified Paths:
flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as
flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/FlexEvent.as
flex/sdk/trunk/frameworks/tests/flex4/flex4test.mxml
flex/sdk/trunk/frameworks/tests/flex4/flex4test_testScript.mxml
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/StatesModel.java
Added Paths:
flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/IDeferredContentOwner.asI have restarted database. Now running adpatch, but still in starting phase:
====================================
Skipping...
Compile JSP files for Specified driver
since no such action is present for this driver file
or this APPL_TOP does not implement the "web" server type
Number of invalid objects: 942
Getting list of invalid objects in APPS schema.
Invalid object reports are recorded in
/u06_qa/oracle/apps/apps_st/appl/admin/QA/log/03356_preenv.*
Running SQL scripts and EXEC commands...
====================================
I shall update once I have more info.
br,
Anjum -
Error in CF form in a Flash format...
Hi
I receive the following error when loading a CF form in a
Flash format...
Errors, warnings or exceptions were found when compiling
/mystore/admin/purchases_not_processed.cfm. Visit the online Flex
documentation or API reference for further information.
1 Error found.
Error
C:\Inetpub\wwwroot\MyStore\admin\purchases_not_processed.cfm:4
A function in the code exceeds the 64K byte limit (actual
size = '122810'). Since the problem occurs in the
compiler-generated deferred instantiation code, please
refactor/componentize portions of this document.
How do i overcome this error?
I hope someone can assist with this...
Thanks in advance...
Regards
Mr PappyHi
I receive the following error when loading a CF form in a
Flash format...
Errors, warnings or exceptions were found when compiling
/mystore/admin/purchases_not_processed.cfm. Visit the online Flex
documentation or API reference for further information.
1 Error found.
Error
C:\Inetpub\wwwroot\MyStore\admin\purchases_not_processed.cfm:4
A function in the code exceeds the 64K byte limit (actual
size = '122810'). Since the problem occurs in the
compiler-generated deferred instantiation code, please
refactor/componentize portions of this document.
How do i overcome this error?
I hope someone can assist with this...
Thanks in advance...
Regards
Mr Pappy -
Error in compiling Flex application: 64K byte limit
Hi experts ,
While deploying the VC model , i m getting this error :
Error in compiling Flex application: Error: A function in the code exceeds the 64K byte limit (actual size = '65557'). Since the problem occurs in the compiler-generated deferred instantiation code, please refactor/componentize portions of this document.
(/usr/sap/NW2/JC00/j2ee/cluster/server0/GUIMachine_Business_Packages/Contribution_Margin_36461/FLEX_COMPILATION_FOLEDR/AAD15VY.mxml:19)
Failed to compile AAD15VY.mxml
Could any one help me out in solving this issue ..its urgent ...
Your suggestions will be rewarded.
Thanks,
PratimaYou have to remove few components from your model to decrease the compiler generated LOC.
Check the following link for detailed solution:
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=936390
Taken from SAP Notes:
<i>Solution
Doing the following may help:
1.Divide problematic iViews into a number of nested iViews.
2.Optimize each model to reduce the number of elements that it
contains:
a.Reduce the number of signals by merging signals of the same name.
b.When your application updates forms with read-only fields, use
expression boxes and a data store instead of signals.
c.Minimize the use of animations in your models, including form
sliding and chart animation effects
d.Use a data store to store variables, instead of invisible forms.
To display messages, use a simple text rather than a static dynamic
expression.
3.For on-the-spot, temporary workarounds, you can try dragging an empty
layer onto the Design board. This sometimes solves the problem ad
hoc, but is not recommended as a best practice.
</i> -
Error in compiling flex - 64K limit
Hi folks,
I entered a new dimension in the flex compiling error dimension (see error-message below). Can anybody help me? I'm familiar with the 32K-problem ( and do have functional workarounds for that) but this one is a new one for me.
regards,
Martin
Error in compiling Flex application: Error: A function in the code exceeds the 64K byte limit (actual size = '66289'). Since the problem occurs in the compiler-generated deferred instantiation code, please refactor/componentize portions of this document.Hi Marcel,
infortunately I'm not allowed atm to make the model public.
however, I circeled the problem and found a workaround. It has nothing to do with our "old pal 32K", this time it simply was a (sub-)model too large to get deployed (problem with the to-build XML-pakages.)
Background on this: It's a nested iview collecting a lot of data from different parts of a highliy complex model to process an RFC. For monitoring reasons I've switched some of the tables to visible and that acutally caused the error. After hiding the colums the error vanished. (actually was replaced by the 32K error. But that's like meeting an old friend, no problem any more....)
I'm looking forward to sharing the model some time. Would be interesting to get some feedback from the comunity..
regards,
Martin
Message was edited by:
Martin Wolpers -
Hi
I receive the following error when loading a CF form in a
Flash format...
Errors, warnings or exceptions were found when compiling
/mystore/admin/purchases_not_processed.cfm. Visit the online Flex
documentation or API reference for further information.
1 Error found.
Error
C:\Inetpub\wwwroot\MyStore\admin\purchases_not_processed.cfm:4
A function in the code exceeds the 64K byte limit (actual
size = '122810'). Since the problem occurs in the
compiler-generated deferred instantiation code, please
refactor/componentize portions of this document.
How do i overcome this error?
I hope someone can assist with this...
Thanks in advance...
Regards
Mr PappyI have given permission to all users in the object from. This problem is not happening for all applications. Only for applications which are having child form the problem is there. When i debugged the custom UI code the error displayed in console is 'Error in editing Object Form .After request is submitted, data canot be added, updated or deleted any further by the requestor'. Thanks.
-
Understanding the practical implications of the Cairngorm 3 Navigation Library
Hi there again,
Based on the discussion from yesterday:
http://forums.adobe.com/thread/897088?tstart=0
... I forgot to mention that I have difficulties to find practical use cases for the Navigation Library. What does the Navigation Library solve when it will be used in the development architecture? Nothing explicit seems to be mentioned about it in your documentation:
http://sourceforge.net/adobe/cairngorm/wiki/HowToUseCairngormNavigation/
When speaking in theory I also have the concern that the Navigation Library is breaking the separation of concern between the Presentation Layer and the Domain Layer (when using the Domain Driven Design language):
http://sourceforge.net/adobe/cairngorm/wiki/UnderstandingCairngorm/
... or the separation of concern between the View Layer and the Data Layer (when using my language):
http://code.google.com/p/masuland/wiki/NanoarchitectureMVCb
Practically speaking again, I usually store the application state (or the waypoints/landmarks of the application) in the Application Model ... see:
public class AppModel
// States
[Publish(scope='appModel', objectId='loginBoxState')]
public var loginBoxState:String;
[Publish(scope='appModel', objectId='appStackState')]
public var appStackState:String;
[Publish(scope='appModel', objectId='settingsBoxState')]
public var settingsBoxState:String;
For more information please check out these two versions:
http://code.google.com/p/masuland/wiki/LoginExample#Flex_4_(Halo)_with_MVCbCtl_PInj
http://code.google.com/p/masuland/wiki/LoginExample#Flex_4_(Halo)_with_MVCbCtl_PInjDdd
... of my Login Example:
http://code.google.com/p/masuland/wiki/LoginExample
I hope you can help me clarify this!
Thank you,
masuI managed to reproduce this issue in the NavigationParsleyProject. After the NavigationParsleySample1 application is started the active view is content.dashboard.nested.child1. However if you try to navigate to content.tasks.timetracking view, it will redirect you to content.tasks.expenses view which is the first child in the content.tasks ViewStack. All Timetracking view's enter and exit handlers as well as interceptors will be executed though.
After I commented out the metadata for all event handlers and both interceptors in TimeTrackingPM class, I was successfully navigated to the content.tasks.timetracking view.
This issue occurs only once and I believe it has something to do with the deferred instantiation. I tried to debug the source of the navigation library but haven't had any success yet. -
Solution for Visual composer error: 32k span and 64k byte limit
Dear friends,
I am getting the error in visual composer 32k span and 64k byte limit since last half year,
some time error will get resolved by adding layer in to model OR adding some table and form to model OR reduce the animation effect OR even by doing tab strip view for layer model, doing nested ivew.
but this solution not usefull for every time.
what should we do for this error(32k span and 64k byte limit),
is it solved by updating EP version or by EP java stack or any other updates which will solve the This VC error.
64k error i am getting is:
+Error in compiling Flex application: Error: A function in the code exceeds the 64K byte limit (actual size = '65570'). Since the problem occurs in the compiler-generated deferred instantiation code, please refactor/componentize portions of this document.
(/usr/sap/IBD/DVEBMGS10/j2ee/cluster/server0/GUIMachine_Business_Packages/Managment_cockpit11_31066/FLEX_COMPILATION_FOLEDR/AADCDM.mxml:19)
Failed to compile AADCDM.mxml+
hope to get answer form you,
Thanks and Regards,
Dushyant.Hi,
I think it's better to post this question into the Visual Composer forum. Anyway, the 32k/64k bug is solved with the flex2 server which is already released.
Also have a look into the [Wiki page|https://wiki.sdn.sap.com/wiki/display/VC/64Kbytelimit].
Hope that helps!
Best Regards,
Marcel -
How to access the function in loaded application using swfloader?
Hi,
I have a main flex application which has a view stack, panel
and swfloader in the below hierarchy.
Flex main app --> Canvas1(Viewstack) --> Panel1 -->
Swfloader
Please view
http://www.probe7.com/flex_ques.gif
for better understanding.
I have a function in the loaded application which has to be
called from a function within the main application. I am not sure
of the syntax to access the swfloader content which is placed in a
canvas -> panel.
I tried this example (
http://livedocs.adobe.com/flex/3/html/help.html?content=controls_15.html),
it works when the swfloader is placed in the main application
without the viewstack or panel. How can I do this, Is there a way
to access all the running applictaions, regardless of the
hierarchy? Any help will be greatly appreciated.
Also any links for quick reference on various components and
their access will be helpful.
Thanks for your time.You are probably seeing the deferred instantiation behavior
which is the default for ViewStack.
The Swfloader component does not exist until a user navigates
to the View that contains it.
Use events to determine when the swfloader content is ready
for interaction. Here is an example:
http://www.cflex.net/showFileDetails.cfm?ObjectID=690
Tracy -
Hi all,
I have two canvas in a tab navigator. From my function I can
change the
properties of a comboBox from the first canvas (conbo1_cb)
but I can't do it
for the second one.
Any way how to do this?
Why works only for the first canvas?
Tks
JFB
<mx:Script>
<![CDATA[
import mx.controls.ComboBox;
public function setCombos(event:ResultEvent):void
this.combo1_cb.label = "label1";
this.combo2_cb.label = "label2";
]]>
</mx:Script>
<mx:TabNavigator width="800" height="100%" y="18"
horizontalCenter="60">
<mx:Canvas label="view1" width="100%" height="100%">
<mx:ComboBox id="combo1_cb" x="148"
y="53"></mx:ComboBox>
</mx:Canvas>
<mx:Canvas label="view2" width="100%" height="100%">
<mx:ComboBox id="conbo2_cb" x="148"
y="153"></mx:ComboBox>
</mx:Canvas>
</mx:TabNavigator>Great... This make a lot of sense, Tks
JFB
"ntsiii" <[email protected]> wrote in message
news:f4pj4i$bn$[email protected]..
>A little more detail:
> The Flex navigation containers all use what is called
"deferred
> instantiation"
> by default.
>
> This means that the child views are not rendererd (do
not exist) until a
> user
> has navigated to that view. The purpose of this is to
improve the
> percieved
> performance of the application at start-up. If every
view in a complex
> app
> must be rendered at start-up, the start-up time can be
unacceptably slow.
>
> Setting creationPolicy="all" should be considered a
short-term fix. The
> correct way to handle this is to have the child
components bind to a
> central
> data location, or have initialization code in them to
retrieve and set the
> desired properties.
>
> Tracy
> -
VPD: Problems calling a function on another schema
Here's the setup:
I've create a schema called "AllYourBase". It contains all of my tables, views, functions, procs, etc.
These tables are protected by a DBMS_RLS policy. The policy uses a function to define its predicate which looks like this:
create or replace function tous_filter(schemaName varchar2, tableName varchar2)
return varchar2 is
begin
return 'account = sys_context(''USERENV'', ''CLIENT_IDENTIFIER'')';
end;
All of the tables have an account column for this to work. So far, this is a pretty basic VPD setup.
I have other db users that login and view data in the "AllYourBase" schema.
So when "ArbyLong" logs in, I set sys_context('USERENV', 'CLIENT_IDENTIFIER') to "ArbyLong", and when he runs a query, he gets back his rows.
Now, "AllYourBase" has several functions. Here's a very contrived, simplified example of one (but it illustrates the issue I'm running into just fine):
create or replace function getUserID
return integer is retval integer;
begin
select user_id into retval from users;
return (retval);
end;
When "ArbyLong" runs the equivalent query (select user_id from users), he gets back the one row where the account column is equal to "ArbyLong", as expected.
But this getUserID function lives in the "AllYourBase" schema. And here's the catch: I've made "AllYourBase" exempt from the policies by running "grant exempt access policy to AllYourBase".
When "ArbyLong" runs the function getUserID, it runs in the "AllYourBase" schema and pulls ALL of the rows from the users table.
This particular function simply errors out (since it's only expecting one row), but other functions are returning data that the logged in user shouldn't see.
So even though there are policies in place, by calling a function on another schema who is exempt from the policies, a user is able to see all returned data and not just the rows they are normally limited to.
Ultimately my question is this: Is there a way to enforce VPD policies when a user calls a function that lives in another schema?
Doing my own research, the answers I've come up with are:
* Don't use "grant exempt policy"!
* Put the function directly into the users' schemas. So "ArbyLong" would have his own getUserID function that would look at the "AllYourBase" users table.
I'd rather not do either of these, so does anyone have any other ideas? If it turns out these are the only solutions, then I'll go with one of them.
Thanks!Need more info. Are you using a ViewStack or other navigator container, and trying to access a view that has not been displayed yet, due to deferred instantiation?
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
www.ChikaraDev.com
Flex Training and Support Services -
Problems calling a function from another function
Hello all.
I am trying to create a function that will loop a few other function.
Basically the main function is this
private function publish(event:MouseEvent):void
if (doPublish.label == 'Publish')
// create a new NetStream object for video publishing
nsPublish = new NetStream(nc);
nsPublish.addEventListener(NetStatusEvent.NET_STATUS, nsPublishOnStatus);
// set the buffer time to zero since it is chat
nsPublish.bufferTime = 0;
// publish the stream by name
nsPublish.publish(publishName.text);
// add custom metadata to the stream
var metaData:Object = new Object();
metaData["description"] = "Chat using VideoChat example."
nsPublish.send("@setDataFrame", "onMetaData", metaData);
// attach the camera and microphone to the server
nsPublish.attachCamera(camera);
nsPublish.attachAudio(microphone);
doPublish.label = 'Stop';
else
// here we are shutting down the connection to the server
nsPublish.attachCamera(null);
nsPublish.attachAudio(null);
nsPublish.publish("null");
nsPublish.close();
doPublish.label = 'Publish';
I am then trying to call that function like this
protected function startloop():void {
publish(event);
But i get the error Access of undefined property event.
Any ideas on how i can call this function ? I need to call it as part of a loop against a timer..
Thanks in advanceNeed more info. Are you using a ViewStack or other navigator container, and trying to access a view that has not been displayed yet, due to deferred instantiation?
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
www.ChikaraDev.com
Flex Training and Support Services -
Entire website in Flex? Performance?
This is sort of in conjunction with my other post, but we are
deciding whether to have an entire website built in flex, with no
HTML. The site is roughly 30 pages and includes everything from
simple text to photo galleries. The photo galleries would be in
flex, but other items such as regular editorial dont HAVE to be in
flex, but we may use flex just for consistency.
I'm curious about performance impacts between using flex in
only certain parts, or embedded in html (if possible, see other
post). Loading an entire flex movie just for text in my opinion
seems a little over-kill. I'd like to hear everyone's opinions on
this. Thanks!
RyanFor a large app, Flex has several approaches to increase
performance. And 30 or so "pages" is not very large for a Flex app,
if you design it right.
First, many of the navigator containers us deferred
instantiation, so their contents are not rendered until a user
navigates to them.
Second, you can use SWFLoader to load independent
applications as needed.
Third, Modules also allow for runtime swapping of content,
minimizing the initial start-up time
"Loading an entire flex movie just for text ..." It sounds
like you are still thinking in HTML. Just make the text part of the
application, loaded from the server as needed.
A Flex app typically never calls an url (except to get data),
never refreshes the browser, and is always present in memory, until
the user exits. There is only one "movie" ever loaded (unless you
use SWFLoader).
Tracy -
Error in CF form in flash format
Hi
I receive the following error when loading a CF form in a
Flash format...
Errors, warnings or exceptions were found when compiling
/mystore/admin/purchases_not_processed.cfm. Visit the online Flex
documentation or API reference for further information.
1 Error found.
Error
C:\Inetpub\wwwroot\MyStore\admin\purchases_not_processed.cfm:4
A function in the code exceeds the 64K byte limit (actual
size = '122810'). Since the problem occurs in the
compiler-generated deferred instantiation code, please
refactor/componentize portions of this document.
How do i overcome this error?
I hope someone can assist with this...
Thanks in advance...
Regards
Mr PappyKarl, is your problem still happening?
If so, are you sure that your web site (is it IIS) is set so that the CFIDE it points to is the one inside CF11? We see from the screenshot you shared that inside the stack trace it points to the page as running in some /CFIDE folder (as if it’s the root of a file system—and it’s odd, because there’s no drive reference, which would be there normally on Windows.)
Normally, it should point to the coldfusion11\cfusion\wwwroot\CFIDE folder, which is where CF11 puts that folder by default. If your web site is pointing at some other folder for that, it could simply be that your Admin was using a different version of code for that mail settings page than CF11 is expecting you to use.
Let us know if that helps.
/charlie
Maybe you are looking for
-
IChat - no Jabber connectivity since Xserve reboot -Bonjour is fine
Any ideas. Since a reboot of our Xserve, we have lost ichat services across the network... only local Bonjour accounts work within individual sites... no longer any jabber connectivity between sites... Clients set to open and login to iChat at StartU
-
TS4338 Missing Text Issue Resoved
Windows 7(X64) I followed this discussion but found that I had both segoeui.ttf and segoeuib.ttf in my font directory. The fonts were in my registry as "Segoe UI (TrueType)" and "Segoe UI Bold (TrueType)". Used registry edit to add "Segoe UI" (exclu
-
SAP Netweaver 7.01 Abap Trial Version - Flight Model
Hello everyone, Iu2019ve installed SAP Netweaver 7.01 Abap Trial Version for practicing purpose. Iu2019ve the handbooks of the course version 63 (Year 2008). It uses the structure type BC400_S_FLIGHT and the class CL_BC400_FLIGHTMODEL among others bu
-
Should I keep media after "BACKUP DATABASE PLUS ARCHIVELOG"?
Hi there, If I do full backup like this ... BACKUP DATABASE PLUS ARCHIVELOG ... do I have to keep copy of media (database files)? I am under impression that as long as my recovery window falls between "BACKUP DATABASE PLUS ARCHIVELOG" and NOW ... I d
-
It doesn't even let me download Empire Total war which is 13gb