I don't understand lazy loading

Could someone please help me understand lazy loading...
I have a simple ORM model where Users have a OneToMany mapping to providers...
But when I run
public Users getUser(Long id){
Users u = em.find(Users.class, id);
List pu = u.getProviderUsers();
System.out.println( pu );
return u;
I get "{IndirectList: not instantiated}" ... How do I control the population of List when I need it but leave it lazy when I don't. If I change it to EAGER fetch it works but performance slows down when I get a list of 20 users.

The message "IndirectList: not instantiated" is not an error message. It happens when a toString() is invoked on a indirect collection.
Following thread will clarify the issue further
IndirectList: not instantiated

Similar Messages

  • I don't understand why i cant log in to my fb account using mozilla but with googlechrome i am able to do that.. mozilla can load up the fb site but cannot log in to my fb account.. i am comfortable with using the mozilla as my browser.. pls help thanks

    i don't understand why i cant log in to my fb account using mozilla but with googlechrome i am able to do that.. mozilla can load up the fb site but cannot log in to my fb account.. i am comfortable with using the mozilla as my browser.. pls help thanks

    hey thanks alot.. it helped me alot!! bring it on!!! cheers!!!

  • 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...

  • Lazy Load in a View?

    All,
    I recentely completed initial development for a fairly complex, custom reporting component. As one might expect, it heavily uses SQL queries and a graph of objects in memory to render the various reports and search functionality available. The graph of objects can contain parent-child relationships up to five nesting levels deep. Not all reports and screens use all five nesting levels. In order to increase efficiency and lower the memory footprint, I implemented Lazy Load on these parent-child relationships.
    My issue might just be a philosophical one. However, what I have ended up with is that a given JSP will initiate a Lazy Load as needed. For most model calculations and API usage, the Lazy Load simply is not required. So, the JSP ends up making these calls.
    It seems a bit strange to have a JSP invoking operations that require database calls after the model has been returned to a view for dispatch.
    Am I worrying overmuch about something not all that important? Or would you recommend moving this type of Lazy Load logic into the controller (we are using Struts) before dispatching the model to a given JSP?
    - Saish

    Not sure I completely understand what your solution was but I once designed a model that would do incremental 'lazy' loads.
    The basic idea was to resolve an issue with downloading large amounts of data from before displaying anything. The model Objects were heirarchical (think tree) so we made it so that a the data was retrieved in parts and reassembled on the client. The top level items were retrieved first. So we would go ahead a display the top level Object while we were retrieving it's substructure in a background thread. As the user started digging down, a parent would block if it's child was not yet available.
    The desired effect was that the users would not be aware of any delays. the server would tend to fill in the heirarchy faster than the user could expand it. Really fast users might catch up with it but would still benefit from at some level.
    I left the company before I saw it go implemented but a competent developer did work on it (I don't know how much was revised) and my old boss told me that he asked that the design not be changed much and that the final result flew.
    However this was for a 'fat' client. I'm not sure if this applies to your JSP situation. The basic point is that you can lazy load in the model and the gui doesn't have to know anything about it.

  • I don't understand my EtreCheck report. What can I do to improve the speed of my Macbook 2010, which became very slow after upgrading to Yosemite?

    I just updated my Macbook (2010) to Yosemite, and it's become very slow. After searching through this community, I downloaded and run EtreCheck, but don't understand what the report means. Please could you help me with what I should do to improve my computer's speed, aside from upgrading my RAM? Thank you so much.
    The report:
    Problem description:
    my macbook is running very slowly after upgrading to yosemite.
    EtreCheck version: 2.0.11 (98)
    Report generated 12 November 2014 1:44:14 pm SGT
    Hardware Information: ℹ️
      MacBook (13-inch, Mid 2010) (Verified)
      MacBook - model: MacBook7,1
      1 2.4 GHz Intel Core 2 Duo CPU: 2-core
      2 GB RAM Upgradeable
      BANK 0/DIMM0
      1 GB DDR3 1067 MHz ok
      BANK 1/DIMM0
      1 GB DDR3 1067 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      NVIDIA GeForce 320M - VRAM: 256 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10 (14A389) - Uptime: 3:23:3
    Disk Information: ℹ️
      TOSHIBA MK2555GSXF disk0 : (250.06 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) /  [Startup]: 249.20 GB (25.42 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-ST DVDRW  GS23N 
    USB Information: ℹ️
      Western Digital My Passport 0748 1 TB
      S.M.A.R.T. Status: Verified
      EFI (disk1s1) <not mounted> : 210 MB
      tansey (disk1s2) /Volumes/tansey : 999.83 GB (951.98 GB free)
      Apple Inc. Built-in iSight
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
    Configuration files: ℹ️
      /etc/hosts - Count: 15
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [not loaded] com.NovatelWireless.driver.NovatelWirelessUSBCDCECMControl (3.0.13) Support
      [not loaded] com.NovatelWireless.driver.NovatelWirelessUSBCDCECMData (3.0.13) Support
      [not loaded] com.ZTE.driver.ZTEUSBCDCACMData (1.3.8) Support
      [not loaded] com.ZTE.driver.ZTEUSBMassStorageFilter (1.3.8) Support
      [not loaded] com.novamedia.driver.IceraUSB_MSD_Bypass (1.3.0) Support
      [not loaded] com.novatelwireless.driver.3G (3.0.13) Support
      [not loaded] com.novatelwireless.driver.DisableAutoInstall (3.0.13) Support
      [not loaded] com.option.driver.Option72 (2.15.0) Support
      [not loaded] com.option.driver.OptionHS (3.26.0) Support
      [not loaded] com.option.driver.OptionMSD (1.21.0) Support
      [not loaded] com.option.driver.OptionQC (1.11.0) Support
      [not loaded] com.rim.driver.BlackBerryUSBDriverInt (0.0.39) Support
      [not loaded] com.rim.driver.BlackBerryUSBDriverVSP (0.0.45) Support
      [not loaded] com.vodafone.driver (3.0.9) Support
      [not loaded] com.zte.driver.cdc_ecm_qmi (1.0.1) Support
      [not loaded] com.zte.driver.cdc_usb_bus (1.0.1) Support
      [not loaded] de.novamedia.driver.NMSamsung (0.0.2) Support
      [not loaded] de.novamedia.driver.NMSmartplugSCSIDevice (1.0.1) Support
      [not loaded] de.novamedia.oem.vodafone.vtp.huawei.cdc (0.0.2) Support
      /System/Library/Extensions/NMHuaweiPhonesVTPCDC_106.kext/Contents/PlugIns
      [not loaded] de.novamedia.driver.NMUSBCDCACMControl (3.2.12) Support
      /System/Library/Extensions/NMSamsungDriver_106.kext/Contents/PlugIns
      [not loaded] de.novamedia.driver.NMUSBCDCACMData (3.2.12) Support
      /System/Library/Extensions/NovatelWireless3G.kext/Contents/PlugIns
      [not loaded] com.novatelwireless.driver.3GData (3.0.13) Support
      /System/Library/Extensions/Vodafone.kext/Contents/PlugIns
      [not loaded] com.vodafone.driver.Data (3.0.9) Support
    Startup Items: ℹ️
      HP IO: Path: /Library/StartupItems/HP IO
      HWNetMgr: Path: /Library/StartupItems/HWNetMgr
      HWPortDetect: Path: /Library/StartupItems/HWPortDetect
      Startup items are obsolete and will not work in future versions of OS X
    Problem System Launch Agents: ℹ️
      [failed] com.apple.accountsd.plist
      [failed] com.apple.AirPlayUIAgent.plist
      [failed] com.apple.bird.plist
      [failed] com.apple.CallHistoryPluginHelper.plist
      [failed] com.apple.CallHistorySyncHelper.plist
      [failed] com.apple.cloudd.plist
      [failed] com.apple.coreservices.appleid.authentication.plist
      [failed] com.apple.coreservices.uiagent.plist
      [failed] com.apple.EscrowSecurityAlert.plist
      [failed] com.apple.icloud.fmfd.plist
      [failed] com.apple.iconservices.iconservicesagent.plist
      [failed] com.apple.nsurlsessiond.plist
      [failed] com.apple.pluginkit.pkd.plist
      [failed] com.apple.recentsd.plist
      [failed] com.apple.security.cloudkeychainproxy.plist
      [failed] com.apple.spindump_agent.plist
      [failed] com.apple.telephonyutilities.callservicesd.plist
    Problem System Launch Daemons: ℹ️
      [failed] com.apple.awdd.plist
      [failed] com.apple.cache_delete.plist
      [failed] com.apple.coresymbolicationd.plist
      [failed] com.apple.ctkd.plist
      [failed] com.apple.diagnosticd.plist
      [failed] com.apple.iconservices.iconservicesagent.plist
      [failed] com.apple.iconservices.iconservicesd.plist
      [failed] com.apple.ifdreader.plist
      [failed] com.apple.installd.plist
      [failed] com.apple.MobileFileIntegrity.plist
      [failed] com.apple.nehelper.plist
      [failed] com.apple.nsurlsessiond.plist
      [failed] com.apple.sandboxd.plist
      [failed] com.apple.softwareupdated.plist
      [failed] com.apple.spindump.plist
      [failed] com.apple.sysmond.plist
      [failed] com.apple.tccd.system.plist
      [failed] com.apple.wdhelper.plist
      [failed] com.apple.xpc.smd.plist
      [running] de.novamedia.nmnetmgrd.plist Support
    Launch Agents: ℹ️
      [not loaded] com.adobe.AAM.Updater-1.0.plist Support
      [failed] com.adobe.CS5ServiceManager.plist Support
      [loaded] com.google.keystone.agent.plist Support
      [running] de.novamedia.VodafoneDeviceObserver.plist Support
      [invalid?] SwapperUFi.plist Support
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist Support
      [invalid?] com.adobe.SwitchBoard.plist Support
      [loaded] com.cloudpath.maccmd.plist Support
      [loaded] com.google.keystone.daemon.plist Support
      [loaded] com.microsoft.office.licensing.helper.plist Support
      [invalid?] PPPMonitord.plist Support
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist Support
      [invalid?] com.akamai.client.plist Support
      [invalid?] com.divx.agent.postinstall.plist Support
      [failed] com.facebook.videochat.[redacted].plist Support
    User Login Items: ℹ️
      Dropbox Application (/Applications/Dropbox.app)
      SurplusMeterAgent UNKNOWN (missing value)
      Google Chrome ApplicationHidden (/Applications/Google Chrome.app)
      HP Scheduler Application (/Library/Application Support/Hewlett-Packard/Software Update/HP Scheduler.app)
    Internet Plug-ins: ℹ️
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 Support
      Google Earth Web Plug-in: Version: 7.1 Support
      Default Browser: Version: 600 - SDK 10.10
      OfficeLiveBrowserPlugin: Version: 12.2.6 Support
      OVSHelper: Version: 1.1 Support
      AdobePDFViewerNPAPI: Version: 10.1.12 Support
      FlashPlayer-10.6: Version: 15.0.0.152 - SDK 10.6 Support
      Silverlight: Version: 5.1.10411.0 - SDK 10.6 Support
      Flash Player: Version: 15.0.0.152 - SDK 10.6 Mismatch! Adobe recommends 15.0.0.223
      iPhotoPhotocast: Version: 7.0
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 Support
      QuickTime Plugin: Version: 7.7.3
      AdobePDFViewer: Version: 10.1.12 Support
      SharePointBrowserPlugin: Version: 14.0.0 Support
      JavaAppletPlugin: Version: 15.0.0 - SDK 10.10 Check version
    User Internet Plug-ins: ℹ️
      OctoshapeWeb: Version: 1.0 Support
    Safari Extensions: ℹ️
      DivX Plus Web Player HTML5 <video>
    3rd Party Preference Panes: ℹ️
      DivX  Support
      Flash Player  Support
    Time Machine: ℹ️
      Skip System Files: NO
      Auto backup: NO - Auto backup turned off
      Volumes being backed up:
      Macintosh HD: Disk size: 249.20 GB Disk used: 223.78 GB
      Destinations:
      Time Machine Backups [Local]
      Total size: 0 B
      Total number of backups: 0
      Oldest backup: -
      Last backup: -
      Size of backup disk: Too small
      Backup size 0 B < (Disk used 223.78 GB X 3)
    Top Processes by CPU: ℹ️
          15% WindowServer
          1% Dropbox
          0% AppleSpell
          0% Skype
          0% imagent
    Top Processes by Memory: ℹ️
      60 MB Google Chrome
      56 MB JavaApplicationStub
      47 MB Skype
      45 MB Finder
      45 MB WindowServer
    Virtual Memory Information: ℹ️
      60 MB Free RAM
      443 MB Active RAM
      398 MB Inactive RAM
      349 MB Wired RAM
      16.91 GB Page-ins
      633 MB Page-outs

    I advise to reply to the one you want to reply to.
    You have had good information here. I will not repeat that here.
    I would like to add:
    you have incompatible software: start in SafeMode, read Woodmeister and see if it is free of issues.
    Akamai is crap software needed or not, Huawei the same.
    It is very possible that the keygenerator you used for generating a key for some softwares has infected your mac.
    The non-regular software with the false key(s) are not compatible probably or generate malware. Luckily you can not update them automatically because the keygenerator blocked the software for contacting the developer... I propose to consider getting rid of those softwares by really good uninstalling.
    You have a beautiful mac, don't degenerate it with crapped software. There are alternatives for expensive software, for example Adobe Photoshop has a free alternative (with a less beautiful interface) in GIMP. And so on.
    Lex

  • Slow Macbook Pro- please help, I don't understand previous advice.

    Hello all,
    I have a very slow Macbook Pro running on Lion 10.7.3.
    I looked up this problem on the forums before I sent this message but I didn't quite understand the advice. I have been on something called Disk Utility and Activity Monitor but don't really understand what I'm looking for. It seems a large percentage of my mac is 'idle' if that makes sense. Someone said to look at Page Out but I really don't understand what that means and what sort of numbers are normal.
    I do have some storage left so I don't think it could be that. A lot of my gigabytes seem to be taken up by movies and 'other'. I've tried deleted a load of videos but it hardly made a difference. I have Mac Mail and it seems very slow on my Macbook compared to on my Ipad and iphone. iCal is also very slow on here and it always takes a while to load internet pages. It isnt the wifi connection.
    Please help and bear in mind I am by no means a Mac whizz so you might have to talk in layman's terms!
    Thanks,
    Amy

    If you have more than ten or so files or folders on your Desktop, move them, temporarily at least, somewhere else in your home folder.
    If iCloud is enabled, disable it.
    Disconnect all wired peripherals. Launch the usual set of applications you use when you notice the problem.
    Step 1
    Launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Activity Monitor in the page that opens.
    Select the CPU tab.
    Select All Processes from the menu in the toolbar, if not already selected.
    Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
    Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
    Step 2
    Launch the Console application in the same way as above, and select “kernel.log” from the file list. Post the dozen or so most recent messages in the log — the text, please, not a screenshot.
    If there are runs of repeated messages, post only one example of each. Do not post many repetitions of the same message.

  • 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.
    hayken

    At 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

  • Equals and lazy loading

    Hi all,
    We have an application in which we use lazy loading on our client, so we can't be sure that both objects have the same objects reference loaded already. While implementing the equals method I came to the problem if it makes sense to compare the lazy loaded objects as well, because this might lead to a very deep object comparison through the whole object tree which might be very unperformant if I load this references on demand. Otherwise not comparing the references might be an incomplete comparision of these objects and makes the usage of the equals method very difficult.
    Has anyone experience using the equals method with lazy loading?
    Thanks in advance
    Marco

    Okay - here comes a little more detail about our architecture to give you a deeper understanding. Currently we are working with EJB3 / JBoss environment but our intention is to encapsulate this through a DAO-layer. Anyways we have special object-dependencies as per example a customer has it�s orders. So in my understanding a customer with the an address, a name etc. with NO orders is not the same as a customer with the same address and the same name and let�s say 2 orders. So I can stick with comparing simply the name and the address, but this wouldn�t give you an exact comparison.
    The other way would be to compare the orders as well, but what if the orders have a number of invoices behind them. The conclusion would be, that I�d have to compare them as well. Additionally I have the problem, that I have totally equal customers with the same number of orders and invoices, but the first one has a null-value in its orders, because they have not been loaded from database yet and the other one has. So my technique with comparing the lazy-loaded references would not work here. A complete loading of all references for a comparison cannot be the solution here either.
    So it is hard to say if they are I/O intensive. Worst case would be, that we have to load the complete object-tree for comparison from database and send them between client and server (jboss). This is part of our question? Should this be the consequence of lazy loading or is it best pratice to stick with the local attributes and let the client do the work, so that he has to work through the whole object-tree if he wants to know the exact equality.
    Does this give you a more detailled view of our question? I guess I am not the first to deal with this problem, so I�d like to share your experiences with you about what is "wise" to do.
    Thanks for your help
    Marco

  • Toplink JPA LAZY loading in Java SE works without javaagent?

    hi there,
    I tought that mappings like
    @JoinColumn(name = "join_col_name")
    @ManyToOne(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    private RelatedObject relObj;
    with TopLink JPA in Java SE environment works ONLY with the
    -javaagent:toplink-essentials-agent.jar
    JVM parameter?
    the strange thing is: I did 2 test runs, with and without the java agent parameter. I also could see that in the first case the weaver is working, in the second the property "toplink.weaving=false" is printed to the console BUT if I access the LAZY mapped attribute of the object instance it works in both cases - I expected a NullPointerEx. in the case without the javaagent.
    Is there anything I missed?
    Hans

    Chris,
    thank for for the tip about verifying lazy or eager fetching. The results are interesting - or better: confusing - to me:
    I have built a test project with 3 entities:
    Entity A hast @OneToMany to Entity B and
    Entity B has ManyToONe to Entity C
    A <-- B --> C
    ALL relations are marked with FetchType.LAZY in all directions.
    When I simply run the test project via main()-method out of eclipse, WITHTOUT specifycing a -javaagent parameter in the run dialog, I can confirm using your test case that the realtion IS LAZILY FETCHED.
    So, I do not really know how this should work without the javaagent.
    You mentioned statically weaved classed - is this the default case when no agent is present, how is it done? Toplink logging says that weaving is NOT active:
    ServerSession(16821027)--Thread(Thread[main,5,main])--property=toplink.weaving; value=false
    so how can the lazy loading work then?
    regards,
    Hans

  • Don't understand how to do the proxy setting to configured with computer need phone no. for help Please!

    try and open a web pg. that friend sent me it keeps coming up on screen in box says, The Proxy server refusing connections Firefox is configured to use a proxy server that is refusing connections , Check t proxy settings to make sure that , they are correct,Check network to see if proxy server is working
    okay so how do I fix this cause really don't understand what this means , Help! to fix as I am missing a lot of information I would like to read .KMH

    You can find the connection settings in Tools > Options > Advanced : Network : Connection
    If you do not need to use a proxy to connect to internet then select "No Proxy" if the default "Use the system proxy settings" setting doesn't work.
    See "Firefox connection settings":
    * https://support.mozilla.com/kb/Firefox+cannot+load+websites+but+other+programs+can

  • 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.

  • I get message:can't save library file not enough access privileges.Don't understand what this means?

    I get message:"Can't save library file.  Not enough access privileges" .Don't understand what this means. No visible effect that I can see now.

    Classic example of why you should save your workm in progress...just hit Ctrl+s to do it on the fly.
    Yes I know. But it is the first time I work with Photoshop on such a big project and I thought it would be more stable.. Do the newer versions manage the memory better ?
    You can shrink your image down which will make it smaller enough to save
    Not enough memory to resize the image. And in the manipulation, it would corrupt some of my layers..
    you can try to save as a diffeent format
    I could succesfully save in Bitmap format. But I lose all my layers info..
    The making loads of screen shots would be good if it wasnt really an
    option seeing as it would use even more memory to do that then put the
    image together out of the screen shots.
    I made screen shots without any problem. I saved them through MS Paint without any memory problem, while Photoshop in parallel was just used as a static image for snapping...

  • Stop lazy loading

    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.

  • What is Lazy Loading In AM

    Hi
    My understanding is on lazy Loading is
    At the design Time , The BC4J are associated with RootAM are Instantiated On demand.
    Isn't it?

    Close you old thread also...Dont leave them open until or unless the issue is not resolved.
    DescritiveFlexField Requirement
    The Lazy Loading option defers instantion of view instances and nested application modules until they are needed. This is more performant than choosing to instantiate all referenced objects at AM instantiation time regardless of whether or not they are needed.
    Read more in dev guide
    Thanks
    --Anil
    http://oracleanil.blogspot.com/

  • Serializing an entity with lazy loaded relationships

    Cross-posted from http://forum.java.sun.com/thread.jspa?threadID=793605
    Started to think I posted to the wrong forum.
    Is it possible to use FetchType.LAZY when sending an entity (let's say Person) to a remote client? I'm fine with the fact that a call like person.getAddress() would have to return null or throw an exception of some sort. But, is it possible to even send the Person object when using lazy fetching?

    I have tried, unsuccessfully. The reason I posted this question is that I don't have the experience to know if my failure is due to the goal being impossible or just do to a mistake I made. So, telling me to try doesn't help answer my question. So let me restate...
    Can YOU serialize an entity (sending it to a remote client) even though the entity has lazy-loaded relationships? I know that I cannot.
    Everything I have read implies that it is possible. However, I have been unable to pull this off using NB 5.5 and the Sun App Serv 9.0. If I make the relationships FetchType.EAGER, everything works. Using FetchType.LAZY, I can't even send the entity to the client, EVEN IF the client doesn't do anything with the entity.

Maybe you are looking for

  • My blackberry style 9670 keeps shutting down wit a fully charged battery, can anyone give me any advice

    i am so tired of  my phone dying on me and the battery is charged. i have to take battery out and put back in and sometimes that wont even work

  • Genius

    Hey guys I was curious if anyone knew if there was a way to do a genius search of a song or artist in the iTunes Store....  If not, I think it would be cool, and make more sales on my end!!!            Thanks

  • Table for storing the substitutes in workflows.

    Hi , I would like to know the table in which all the sustitute reletionship is stored i.e for which user who is the substitute. Regards Aditya

  • HDD not detecting

    Hello! My SATA WD Caviar Green with SATA&IDE USB 2.0 Cable not detecting in Windows 7. I can see "DISK 0" in Disk Manager and when i trying initialize "DISK 1", i recieving a message "Device not ready ". Does anyone any ideas?

  • Can't access to iCloud files after latest update

    Hi, After I update latest version of numers (version 2.1 1129) on both 5S and ipad air, I cant access to my icloud files on these devices. However I sitll can find them from the icloud.com. Does anyone know whats going on?