How can I avoid running out of memory when creating components dynamically

Hello everyone,
Recently, I am planning to design a web application. It will be used by all middle school teachers in a region to make examination papers and it must contain the following main functions.
1)Generate test questions dynamically. For instance, a teacher who logs on the web application will only see a select one menu and a Next Quiz button. The former is used for determining the number of options for the current multiple/single choice question. The later is dedicated to creating appropriate input text elements according to the selected option number. That is to say, if the teacher selects 4 in the menu and presses the Next Quiz button, 5 input text form elements will appear. The first one is for the question to be asked such as "1.What is the biggest planet in the solar system?", the others are optional answers like a)Uranus. b) Saturn. c)Jupiter. d)Earch. Each answer stands for an input text elements. When the teacher fills in the fourth answer, another select one menu and Next Quiz button will emerge on the fly just under this answer, allowing the teacher to make the second question. The same thing repeats for the following questions.
2)Undo and Redo. Whenever a teacher wants to roll back or redo what he has done, just press the Undo or[i] Redo button. In the previous example, if the teacher selects the third answer and presses the Delete button to drop this answer, it will delete both the literal string content[i] and the input text element, changing the answer d to c automatically. After that, he decides to get back the original answer c, Jupiter, he can just click the Undo button as if he hadn�ft made the deleting operation.
3)Save the unfinished working in the client side. If a teacher has done half of his work, he can choose to press the Save button to store what he has done in his computer. The reason for doing so is simply to alleviate the burden of the server. Although all finished test papers must be saved in a database on the server, sometimes the unfinished papers could be dropped forever or could form the ultimate testing papers after several months. So if these papers keep in the server, it will waste the server computer�fs room. Next time the teacher can press the Restore button on the page to get the previously stored part of the test paper from his own computer and continue to finish the whole paper.
4)Allow at least 1,000 teachers to make test papers at the same time. The maximum question number per examination paper is 60.
Here are my two rough solutions,
A.Using JSF.
B.Using JavaScript and plain JSP[b] without JSF.
The comparison of the two solutions:
1)Both schemas can implement the first and the second requirements. In JSF page I could add a standard panelGird tag and use its binding attribute. In the backing bean, the method specified by the binding attribute is responsible for generating HtmlInput objects and adding them to the HtmlPanelGird object on the fly. Every HtmlInput object is corresponding to a question subject or an optional answer. The method is called by an actionListener, which is registered in the Next Quiz commandButton, triggering by the clicking on this button in the client side. Using JSF can also be prone to managing the HtmlInput objects, e.g. panelGird.getChildren().add(HtmlInput) and panelGird.getChildren().remove(HtmlInput) respond to the undoing operation of deleting an optional answer and the redoing operation of the deleting action respectively. I know JavaScript can also achieve these goals. It could be more complex since I don�ft know well about JavaScript.
2)I can not find a way to meet the third demand right now. I am eager to know your suggestion.
3)Using JSF, I think, can�ft allow 1,000 teachers to do their own papers at the same time. Because in this scenario, suppose each questionnaire having 60 questions and 4 answers per question, there will be approximately 300,000 HtmlInput objects (1,000X60X(4+1)) creating on the server side. The server must run out of memory undoubtedly. To make things better, we can use a custom component which can be rendered as a whole question including its all optional answers. That is to say, a new custom component on the server side stands for a whole question on the client side. Even so, about 60,000(1,000X60) this type of custom components will be created progressively and dynamically, plus other UISelectOne and UICommand objects, it also can�ft afford for most servers. Do I have to use JavaScript to avoid occupying the server's memory in this way? If so, I have to go back and use JavaScript and plain JSP without JSF.
Thank you in advance!
Best Regards, Ailsa
2007/5/4

Thank you for your quick response, BalusC. I really appreciate your answer.
Yes, you are right. If I manually code the same amount of those components in the JSF pages instead of generating them dynamically, the server will still run out of memory. That is to say, JSF pages might not accommodate a great deal of concurrent visiting. If I upgrade the server to just allow 1,000 teachers making their own test papers at the same time, but when over 2,000 students take the same questionnaire simultaneously, the server will need another upgrading. So I have to do what you have told me, using JS+DOM instead of upgrading the server endlessly.
Best Regards, Ailsa

Similar Messages

  • How can I avoid running rmiregistry when launch an RMI based application

    Hi,
    How can I avoid running rmiregistry when launch an RMI based application?
    Will invocation of LocalRegistry.createRegistry() do?
    Thanks a lot!
    Regards,
    Justine

    yes it will do...better try it out
    good luck

  • How can I maintain the classification in UI when creating a new BP?

    SAP CRM 2007 (UI)
    Hi,
    In SAP GUI the classification can be maintained in tab “classification”.
    How can I maintain the classification in UI when creating a new BP?
    Thanks for your support.
    Regards,
    AV

    Hi Anand,
    thanks for your prompt answer.
    By default all ship-to-parties are assigned to classification “Customer”. How can we assign a different classification to ship-to-parties in UI? The view “Account classification” seems to be different from the tab “classification” in SAP GUI.
    Regards,
    AV

  • How can i add smiley or special character when creating new contacts?

    how can i add smileys or special character when creating a contact on my contacts? help please...

    I think you need to download an app for that - do a search in the app store.

  • How can I boot/run from external HD when internal HD is fried?

    Background: I have an original vintage 2002 emac G4 1.25 that I've been messing with for the past couple of months due to slow running and hanging/crashing apps. I upgraded the RAM with an additional 256 MB several years ago and I was running OSX 10.2 without many problems until recently. I was getting messages about the hard drive being full, so I cleaned up and backed up my files to an external HD (USB, of course, since I hadn't found this forum at that time). Freeing up memory didn't help and neither did creating an administrator account, so I ran Apple Hardware Test, which turned up an error code: mem_/2/4 DIMM1/J1601
    When I tried to do an erase and reinstall, the erase part went fine but the reinstall wouldn't work because (on the last of 4 discs) the machine returned a "can't write" error and suggested that the hard drive is unusable.
    My questions: How can I use an external HD (Firewire, of course) to boot and run my emac when the internal HD is fried and there's no operating system on board? How do I install OSX on the external HD to boot the emac in the first place? Also, will the 384 MB of RAM be enough, or must I upgrade that, too? For that matter, what version of OSX would be best?
    Thanks for any help you can offer. I am a long-time mac user (still have my Classic, which still works), and I'd really rather not replace the emac.

    HFS stands for Hierarchical File System. The plus sign stands for extended or extended format.
    This is the data system format that Apple uses for their operating systems.
    When you buy an external hard drive device, typically they do not come pre-formatted.
    You'll need to use the Disk Utility app in OS X in your username/Applications/Utilities folder on your eMac if it's still operational or when you start up your eMac from the OS X 10.5 DVD located in the Applications/Utilities folder.
    You use this app to initialize and format the drive once it is connected to your eMac. If you wish, you can also, at that stage, partition the drive into separate variable size sections to make a large capacity HD more manageable.
    You need to have a functioning stick of RAM in your eMac in order for it to boot up correctly.
    The OS X startup routine looks for all components in your eMac that are necessary for a successful start up.
    Your eMac will not boot up, even from CD/DVD, without any RAM installed.
    If you have only one stick of RAM in your eMac and it's bad or corrupted, you'll need to purchase and Install a new stick of RAM to start.
    You might as well purchase 2 brand new 1 GB RAM sticks for your eMac. 2 GBs
    OS X 10.5 Leopard's minimum RAM requirements are 512 MBs of RAM.
    Your eMac can max out at 2 GBs of RAM.
    The specs for the RAM are PC2700 SDRAM, DDR333, 184 pins.
    Here are links to websites I use to buy Mac accessories and Hard drives compatible with Macs.
    http://eshop.macsales.com/shop/firewire/
    http://www.lacie.com/us/products/range.htm?id=10033

  • Running out of memory when trying to run two VMs

    Hi all,
    I have created a VM (RHEL 5 with Oracle 11g) and cloned it in the same server pool. When i tried to start up the clone, I received the following error:
    Start - /OVS/running_pool/13_OVM_10g_1
    PowerOn Failed : Result - failed:errcode=20000, errmsg=No enough memory to run vm(/OVS/running_pool/13_OVM_10g_1), required memory=2048.
    StackTrace:
    File "/opt/ovs-agent-2.3/OVSSiteVM.py", line 124, in start_vm
    Is there a way to configure more memory for additional VMs?
    Thanks.

    I thought is was not enough physical memory. The server has 4GB of RAM and the BIOS can see it.
    However, the OS only sees 574 MB:
    [root@patchy ~]# free -m
                 total       used       free     shared    buffers     cached
    Mem:           574        228        345          0         16         63
    -/+ buffers/cache:        148        425
    Swap:         1027          0       1027xm info shows 4095MB:
    [root@patchy ~]# xm info
    host                   : patchy
    release                : 2.6.18-128.2.1.4.25.el5xen
    version                : #1 SMP Tue Mar 23 12:43:27 EDT 2010
    machine                : i686
    nr_cpus                : 4
    nr_nodes               : 1
    cores_per_socket       : 1
    threads_per_core       : 2
    cpu_mhz                : 2992
    hw_caps                : bfebfbff:20100800:00000000:00000180:0000641d:00000000:00000000:00000000
    virt_caps              :
    total_memory           : 4095
    free_memory            : 1418
    node_to_cpu            : node0:0-3
    node_to_memory         : node0:1418
    xen_major              : 3
    xen_minor              : 4
    xen_extra              : .0
    xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p
    xen_scheduler          : credit
    xen_pagesize           : 4096
    platform_params        : virt_start=0xff800000
    xen_changeset          : unavailable
    cc_compiler            : gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)
    cc_compile_by          : mockbuild
    cc_compile_domain      : (none)
    cc_compile_date        : Wed Mar 24 16:00:43 EDT 2010
    xend_config_format     : 4xm dmesg shows (only showing partial output to preserve space):
    [root@patchy ~]# xm dmesg
    \ \/ /___ _ __   |___ /| || |  / _ \
      \  // _ \ \047_ \    |_ \| || |_| | | |
      /  \  __/ | | |  ___) |__   _| |_| |
    /_/\_\___|_| |_| |____(_) |_|(_)___/
    (XEN) Xen version 3.4.0 (mockbuild@(none)) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) Wed Mar 24 16:00:43 EDT 2010
    (XEN) Latest ChangeSet: unavailable
    (XEN) Command line: dom0_mem=574M
    (XEN) Xen-e820 RAM map:
    (XEN)  0000000000000000 - 00000000000a0000 (usable)
    (XEN)  0000000000100000 - 00000000dffc0000 (usable)
    (XEN)  00000000dffc0000 - 00000000dffcfc00 (ACPI data)
    (XEN)  00000000dffcfc00 - 00000000dffff000 (reserved)
    (XEN)  00000000e0000000 - 00000000f0000000 (reserved)
    (XEN)  00000000fec00000 - 00000000fec90000 (reserved)
    (XEN)  00000000fed00000 - 00000000fed00400 (reserved)
    (XEN)  00000000fee00000 - 00000000fee10000 (reserved)
    (XEN)  00000000ffb00000 - 0000000100000000 (reserved)
    (XEN)  0000000100000000 - 0000000120000000 (usable)
    (XEN) System RAM: 4095MB (4193664kB)
    (XEN) Detected 2992.646 MHz processor.
    (XEN) CPU0: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
    (XEN) Booting processor 1/6 eip 8c000
    (XEN) CPU1: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
    (XEN) Booting processor 2/1 eip 8c000
    (XEN) CPU2: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
    (XEN) Booting processor 3/7 eip 8c000
    (XEN) CPU3: Intel(R) Xeon(TM) CPU 3.00GHz stepping 03
    (XEN) Total of 4 processors activated.
    (XEN) mm.c:804:d1 Error getting mfn 17e9b (pfn 5555555555555555) from L1 entry 0000000017e9b025 for dom1
    (XEN) mm.c:4224:d1 ptwr_emulate: fixing up invalid PAE PTE 0000000017e9b025I am able to start up one VM, and xm list shows that it has 2GB of memory:
    [root@patchy ~]# xm list
    Name                                        ID   Mem VCPUs      State   Time(s)
    13_OVM_10g_1                                 1  2048     2     -b----     33.6
    Domain-0                                     0   574     4     r-----    100.9When I try to start a clone of the first VM from the VM Manager, it errors out with the following error message:
    Start - /OVS/running_pool/19_10g_clone_1
    PowerOn Failed : Result - failed:errcode=20000, errmsg=No enough memory to run vm(/OVS/running_pool/19_10g_clone_1), required memory=2048.
    StackTrace:
      File "/opt/ovs-agent-2.3/OVSSiteVM.py", line 124, in start_vm
        raise eI'm not sure how Xen handles memory, but I would imagine that dom0 should see all 4GB of RAM.
    How can I make sure that all 4GB of RAM are available?
    Thanks.
    Edited by: Christoph on Jan 5, 2011 8:39 AM

  • How can we take print out for challen no. create d by J1INCHLN

    hi,.
    actually i forgot to take print after running J1INCHLN  .
    how can we take printout or display without running J1INCHLN .
    one challen number is created , is there any tcode to view or print.
    regards.
    hari priya

    hi,
    We can use the T.code  J1INMIS. GOTO   Report selection option & select challan Update status.
    Excute the report. you will get a list of all bank challan made so far. Then select the required document & take print.
    The Process is :
    Invoice in FB60/MIRO
    Bank Remittance - J1INCHLN
    Bank Challn Update - J1INBANK
    TDS Print - J1INCERT.
    assign points if found useful
    Regards,
    R.Ramakrishnaraj

  • I run out of memory when trying to run a query

    I need help with a query. I am trying to extract Total Qty Sold ( and eventually get this data by month), but when I would run the query asking for QTY I get "System Out Of Memory". I removed that party of the query asking for Qty and posted what I came up with below. Any Help is greatly appreciated.
    SELECT T0.[ItemCode], T0.[ItemName], T1.[FirmName], T0.[CardCode], T0.[SuppCatNum], T2.[ItmsGrpNam], T0.[U_U_CMG_PROGRAM], T0.[U_U_CMG_CATEG], T0.[U_CMG_STATUS], T0.[U_CMG_STORES], T0.[U_CMG_COLOR], T0.[U_CMG_LOCAT], T0.[MinLevel], T0.[MinOrdrQty]
    FROM OITM T0  INNER JOIN OMRC T1 ON T0.FirmCode = T1.FirmCode INNER JOIN OITB T2 ON T0.ItmsGrpCod = T2.ItmsGrpCod

    Hi,
    Welcome you post on the forum.
    Try this fist:
    SELECT T0.ItemCode, T0.ItemName, T1.FirmName, T0.CardCode, T0.SuppCatNum, T2.ItmsGrpNam, T0.MinLevel, T0.MinOrdrQty
    FROM OITM T0
    INNER JOIN OMRC T1 ON T0.FirmCode = T1.FirmCode
    INNER JOIN OITB T2 ON T0.ItmsGrpCod = T2.ItmsGrpCod
    WHERE T0.ItemCode Like '[%0\]%'
    Thanks,
    Gordon

  • How can i avoid a pop-up window when calling the avi.dll?

    Ok, here another try!
    My problem is as followed:
    My program calls the avi.dll to initialize, write into and close an
    avi-file.
    Now, when initializing it, a pop-up window is shown so you can choose the
    codec to use.
    My question is, can I pre-define the codec, so the pop-up window won't show
    up?
    The program is meant to write several files, some starting without the user
    having to control them, so the pop-up window really isn't helping.
    Any ideas?
    I attached the avi.dll in case you need it to look at the problem.
    Also helpful would be, if someone could tell me, how I can take a closer
    look at the structure of the dll. Is there a program I can do that with?
    Thanx!
    regar
    ds,
    Martin

    Hello Martin,
    I have used this DLL before and wasn't asked to choose a codec. Maybe if you use all three functions (init, write, close), it works without problems. Here's a example that uses IMAQ hardware to acquire an 8-bit image at 30fps and writes each image to an avi file.
    There are utilities to examine dlls (see what functions are exported and what the dependencies are, but you can't see source code since it is compiles.) Check out QuickView or DependencyWalker.
    Attachments:
    avigrab.zip ‏66 KB

  • Running out of memory when I delete apps does it give mee memory back

    I

    When I delete apps on my iPhone 4 with 32g it doesn't free up any memory? I goto settings,general, about and it says 28g used and like 4g free.  I deleted almost all my apps and the memory stayed the same.
    Why am I having this problem and what can I do to fix it? It seems like it is slowing phone down also. Plz help I really don't want to use reset option but if I have to I will.

  • How can I avoid pixilation and image degradation when I import PhotoShop files into Final Cut Pro X.9?

    When ever I import a RGP file (11.8 MB) into FC 10.9 I get pixilation with jagged images showing up on the full screen view.
    Any way or possiblity of solving this problem?
    Happy New Year!

    An RGP file?  Not officially supported by FCP X.  Now, if you're going through Photoshop, save it out as a PSD or PNG, you'll be fine.  And make sure the frame size matches the frame size of your FCP Project tilmeline.  If it is smaller, and must be enlarged to fit the frame, it will pixelate.  Can't enlarge digital images much without distroying them.

  • How can I add an extra in pages when creating a newsletter?

    Hi,
    I'm working on a newsletter in Pages via the newsletter template (I'm working in 5.2) it won't however let me add an extra page, I just have the two that are in the original template.
    Any ideas?
    Thanks.

    Hi Chl0w,
    In layout mode (again, Pages 5.x) you can use Insert (Page) from the menu bar or toolbar.
    Pages Help for Mac, Add, delete, and rearrange pages
    Add a page
    In a page layout document: Click Insert   in the toolbar, then choose Page.
    The new page appears at the end of the document.
    In a word-processing document: Add a page break. You can also add a section that begins on a new page.
    Take care,
    Nubz

  • Lightroom 5 permanently runs out of memory

    Lightroom 5 on Windows 7 32 Bit and 8 Gigabytes of memory (more than the 32 Bit system can use) permanently runs out of memory when doing some more complex edits on a RAW file, especially when exporting to 16 Bit TIFF. The RAW files were created by cameras with 10 up to 16 megapixel sensors with bit depths between 12 and 14.
    After exporting one or two images to 16 Bit uncompressed TIFF an error message "Not enough memory" will be displayed and only a Lightroom restart solves that - for the next one to two exports. If an image has much brush stroke edits, every additional stroke takes more and more time to see the result until the image disappears followed by the same "Not enough memory" error message.
    A tab character in the XMP sidecar file is *not* the reason (ensured that), as mentioned in a post. It seems that Lightroom in general does not allocate enough memory and frees too less/late allocated.
    Please fix that bug, it's not productive permanently quit and restart Lightroom when editing/exporting a few RAW files. Versions prior to Lightroom 4 did not have that bug.
    P.S. Posting here, because it was not possible to post it at http://feedback.photoshop.com/photoshop_family/topics/new It's very bad design, to let a user take much time to write and then say: "Log in", but a log in with the Adobe ID and password does not work (creating accounts on Facebook etc. is not an acceptable option, Adobe ID should be enough). Also a bugtracker such as Bugzilla would be a much better tool for improving a software and finding relevant issues to avoid duplicate postings.

    First of all: I personally agree with your comments regarding the feedback webpage. But that is out of our hands since this is a user-to-user forum, and there is nothing we users can do about it.
    Regarding your RAM: You are running Win7 32-bit, so 4 GB of your 8 GB of RAM sit idle since the system cannot use it. And, frankly, 4 GB is very scant for running Lr, considering that the system uses 1 GB of that. So there's only 3 GB for Lr - and that only if you are not running any other programs at the same time.
    Since you have a 8 GB system already, why don't you go for Win7 64-bit. Then you can also install Lr 64-bit and that - together with 8 GB of RAM - will bring a great boost in Lr performance.
    Adobe recommends to run Lr in the 64-bit version. For more on their suggestion on improving Lr performance see here:
    http://helpx.adobe.com/lightroom/kb/performance-hints.html?sdid=KBQWU
    for more: http://forums.adobe.com/thread/1110408?tstart=0

  • I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?

    I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?
    Thanks!
    David

    Either of these should help.
    http://grandperspectiv.sourceforge.net/
    http://www.whatsizemac.com/
    Or search 'disk size' in the App Store.
    Be carefull with what you delete & have a backup BEFORE you start, you may also want to reboot to try to free any memory that may have been written to disk.

  • How can I avoid the tenacious Out-of-Memory Monster

    Hi there
    I'm editing a short video and I have three different kind of source material.  Half of it is done with a Canon D5 (full HD H.264). A third with a sony Z7 (1440 X 1080) and the Rest with the GoPro Action Camera in full HD (mp4). What is the best way for the setting of the sequence or a change of format for the source in order to avoid the out of memory message. It's driving me crazy.
    Thanks
    m

    One way to avoid potential problems in FCP is to only import media that works natively with FCP.  That means you'll need to convert any H.264, MPEG-4 and other MPEG files and all other non-conforming media PRIOR to importing into an FCP project.
    I recommend reading through the section of the manual/help files that covers native formats.
    -DH

Maybe you are looking for

  • How to store multiple values in a coloum for a particaular row?

    By mistake i posted this in abap general forum but i think this question should belong to Data Dictionary section I want to design a table where we can store a table where we can save multiple values of  column for a particular row. how to achieve th

  • Error while loading data from R3 to BW

    Hi, After mapping my DataSource created in R/3 system to my Infosource, I was taken to the maintenance screen of the transfer structure. I proposed the transfer rules. But my traffic signal of my transfer rule is not turning green. If I continue to a

  • Regarding Overtime issue

    Hi friends, I got issue regarding to OT.The employee must get OT for 3 week but they have paid only for one week.Here they are paying OT through wagetype.What i assume here i think administator might forgot to update the OT entries for remaining two

  • Validate_password OAM plug-in

    Hi, I want to write custom Authentication plug-in in manager c++ in the Oracle access manager, It should get the authentication details (authentication success or failure) from validate_password(standard OAM plug-in) and it has to post the report to

  • How to achieve shadow in this guys?

    hi...any advice in how to built the shadow for this guys??..thanks..i cant figure it out how...