Connecting To Same Value List Handler

I have a question about using the Value List Handler pattern. Right now I am just working on the design of my application (class diagrams, scenario diagrams, etc).
I have a VLH that will retrieve data from the DB (via a DAO) and will return data to the caller. The VLH basically fronts the DAO. The caller in this case will be a Business Delegate. So the call sequence is:
client (JSP) --> Business Delegate --> Value List Handler --> DAO
Now the VLH is a stateless EJB. But the Business Delegate is just a plain Java class that will get instantiated on every call to the server. My hope is that it will connect to the same VLH instance (I use a ServiceLocator). But I'm not sure this will happen.
According to what I read about Stateless Session EJBs, they are dedicated to a single client. But what is the "client" in my scenario? Is it the browser session? Or is it the Business Delegate? If its the latter, then will new instances of the Business Delegate be able to connect to the same VLH?

Use a stateful session bean! Says so on the Sun Blueprints site for this pattern.

Similar Messages

  • Want detailed sample code(value list handler pattern) for my case

    I am trying to write a Session Facade Bean with getAllUsers() method which get Collection pased from my UserBean(entity), to get all my users info.and I have a helper class called UserInfo
    public class UserInfo implements java.io.Serializable
    public String userid;
    public String username;
    public String password;
         public UserInfo()
         public void setUserInfo(String userid,String username,String password)
              this.userid=userid;
              this.username=username;
              this.password=password;
    I dont' know How my ejb client(jsp maybe) to use value list handler pattern to implement getting all users shown.
    I found http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html the sample code is to complex.
    any one could help me figure out ...
    what helper class do i need .or maybe interface
    what is the best practice?
    thanks in advanced.

    Hi,
    For a J2EE system with session facades, I've implemented that pattern based on the DTO pattern.
    The idea is based on Sun's blueprint Pet Store implementation.
    For that' I've created a DTO called "ListChunk", which holds a chunk of the complete list. In the Pet Store
    application v1.3.2 it's called "Page".
    So, those facade methods that would possibly return a huge list (such as getAllXXX and findXXX)
    return a ListChunk. As arguments, those methods take start index and the maximum size.
    If you want a value-list handler to control the iteration on your client side, you code such a class that
    uses the facade method.
    Here's some code:
    public class ListChunk implements Serializable {
         private List list;
         private int startIndex;     // starts on '0'
         private int totalSize;
         public ListChunk(List list, int startIndex, int totalSize)  {
              this.list = list;
              this.startIndex = startIndex;
              this.totalSize = totalSize;
         public List getList()  {
              return list;
         public int size()  {
              return list.size();
         public boolean hasNext()  {
              return totalSize > (startIndex + list.size());
         public boolean hasPrevious()  {
              return startIndex > 0;
         public int getTotalSize()  {
              return totalSize;
    }And a method in the facade could look like this:
         public ListChunk getAllCoWorkers(int startIndex, int maxSize, CoWorkerSortBy sortBy) {...}

  • Transfer Objects in Value List Handler

    Do we need really the EJB for Caching the data using Value List Handler.If EJB is not required then how can we cache the data using Value List Handler

    Sorry for disturbing u again.Actually my requirments
    is , In the Jsp page i have to display 1000You are referring to java server pages and not java script correct?
    records(example) provided with pagination option ie
    each page should display 50 records and options will
    be given to user to see another 50 records by
    clicking the pagination hyper link.This time it
    should pick up from Cache memory not form DB.I came
    to know thru documentation posted in website that
    ValueList Handler provides the Caching Facility.Can i
    achieve this by using ValueList Handler.You can achieve it in any number of ways.
    Nothing in your description suggests that Value List Handler is going to help you in any substantial way.
    Another
    restrictions is not to use EJB.You have to get the data from somewhere.

  • Value-list handler, value-list iterator and session-facade strategy

    Hello all,
    Further to an earlier post, I rewrote my post trying to me more accurate in my question.
    Here is my problem:
    I am trying to implement the value-list handler design pattern using the session facade strategy. In the pattern as it is described here
    (http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html) the client accesses the value-list handler AND the iterator directly.
    As I chose the session-facade strategy having my value-list handler as a stateful session ejb, I don't know how the client is going to access the iterator. I see only one option: Having the client access the iterator through the ejb value-list handler. This requires adding new methods to the ejb.
    Is this the correct way of doing it? Is there another way of doing this?
    Thanks in advance,
    Julien Martin.

    u can use project list handler as ur session facade.
    regarding ur second question ..session facade and value list handler session bean which is also a session facade( but there is difference between first and second) so u can use session facade and value listhandler

  • Caching using - Value List Handler

    Hi All,
    Iam new to Value List Framework.I had a doubt regarding the caching in Value List Handler.Suppose there are 1000 records in DB.I querying the DB using Value List Handler.I want to display the paging functionality in JSP.That is i want to display 50 recodrs each in the jsp.Then if have to provide the Link for another set of records.I had donr this functinality.What is the problem is if i click the hyperlink which is provided for PAgination Functionality now it is hiting the DB and fetching the recodrs and iam showing in JSP.I don't know how to do the Caching functionality using Value List Handler.so that i can avoid each time DB hit.First time i will hit the DB fetch all the records and store it in the Cache.Can anyone help me regarding this issue.

    hi [email protected]
    can you plz provide me some stuff for pagination using toplink. I am new to toplink and need to use pagination.

  • Value List- EHP4

    Hi,
    We are working on PMR-ehp4. We have some ratings for the appraisals EX: 1- 5 Scale but when we see the same scales on portal as a standard SAP EHP4 fucntionality the blank fields against the ratings are showing "No value" Text on the portal.
    Could any one please share your inputs how to bring the "blank field" instead of "No Value" text.
    Thanks in advance
    VK

    u can use project list handler as ur session facade.
    regarding ur second question ..session facade and value list handler session bean which is also a session facade( but there is difference between first and second) so u can use session facade and value listhandler

  • How can I move a task from a Summary Task to another Summary Task in the same task list?

    Hey, I tried to move tasks through the SP UI from one Summary Task to other in the same task list, but I didn't find possibility for it.
    Then I spent time to learn the SP Client Object Model and now I can read tasks form the list. I see every task has a "FileRef" and a "FileDirRef" field. If I think right these fields show the relation between list elements for example between
    a Task and a Summary Task elements.
    I changed these fields' values and I tried to Update the ListItem but I got this error message: "Invalid data has been used to update the list item. The field you are trying to update may be read only."
    I really need to move tasks what were created below a wrong Summary Task so please explain a method or pattern how I can do this. (I can create a new Task below to any Summary Task and I can set field values but I hope there is a way to really move tasks (I
    mean I should change the right field values somehow.).
    I can reach the Task List both on the server and client side so I'm very interested in every solution. PowerShell solution is also good for me.
    I'm using SharePoint 2010 SP2.
    Thank you for your answer and your time. :)
    Csaba Marosi

    Hi,
    According to your post, my understanding is that you want to move a task from one summary task to another in the same task list.
    We can do it like this:
    We can create a Gantt View for this task list, then copy your tasks inside a summary task, then navigate back to the other summary and paste, then go back to original and delete.
    Here is another way for your reference:
    SharePoint vs Powershell – Moving List Items between folders
    http://sharepointstruggle.blogspot.in/2010/07/sharepoint-vs-powershell-moving-list.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Need to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.

    Hi All
    I have one sharepoint list with huge data i.e with 20columns and more than 200 records with the fields .
    Suppose lets consider there are A,B,C,D,E,F,G,H columns.
    Now i want to create one form with the fields A,C,E.
    When the user enter the existing data of list for columns A,C..based on C value the E column value should change and update that particular item in the list.
    Please guide me without visual web part can we acheive this by Sharepoint designer 2013 or what would be the preferable solution.
    Please help me on this as it is very urgent from me..
    Thanks in Advance
    Sowjanya G

    Hi,
    According to your post, my understanding is that you wanted to update the list item in the same sharepoint list with particular condition with Sharepoint Designer 2013.
    I recommend to create workflow associated to the list and then start the workflow automatically when an item is changed.
    In the workflow, you can add condition and actions as below:
    If current item: C equal to Test1
         Set E to Test2
    Then the value of the filed E will be changed based on the value of the filed C.
    In addition, if you create the form using InfoPath, you can add rule to the filed C as below:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How can we use C# to read dynamic parameter's value list from .rpt?

    I'm using Cystal Report 2008. We know starting from CR XI we can create dynamic parameters, the list of items of this kind of parameter are fetching from database. So in general the SQLs to get the list of values for dynamic parameters are stored in the .rpt.
    In Crystal Report Designer, if I preview a report with dynamic parameters, it will first query the database and then show the input dialog with list of values from database for user to choose. My question is can we implement the same thing by our C# code? I'm planning to use C# code to read this dynamic parameter's value list from .rpt and render them on the web page. Then pass back the user selected values to the .rpt to run the report after user make the choice. I didn't find any APIs can do this. Is it possible?
    Thanks in advance!!

    Hi,
    Can you explain a bit in detail, I have similar scenario. I am using the following code but not getting the Column name for dynamic parameter list.
    foreach (ParameterFieldDefinition prm
                              in reportDocument.DataDefinition.ParameterFields)
                    try
                        string vParameterFieldName;                   
                        *vParameterFieldName = prm.ParameterFieldName.ToString();*
    Shakeel

  • Cannot add new items to a value list in AW database

    I have a database which I have been using for many years. One of the fields is a value list. I just went to add another item to the list, and no matter what I do, the Create button is grayed out. I have another value list in the same database that works fine.
    There are currently 170 items in the value list that is causin the problem, but I didn't think that there was a limit to the number of items that can be is a value list. (At least there is nothing in the AW technical specifications to indicate thin. I duplicated the existing database, deleted about 20 items from the list, then saved the file, and reopened it, and still cannot add new items to that value list. Does anyone know what might be causing the problem?

    Oops
    I read too fast.
    Here is a short script which may help.
    Replace the pop-up item by a text one and edit the property myList in my script to fit your needs.
    Select the field to fill and run the script.
    Then choose an item in the displaid list. It will be pasted in the selected field.
    This trick would give you to work with a "no limit" list of items.
    -- [SCRIPT DB fillFieldFromAlist ]
    Assuming that
    the front document is a database one
    and that a text field is selected,
    run the script to select an item in a list
    and paste it in the field.
    Yvan KOENIG, Vallauris (FRANCE)
    le 19 mars 2007
    property MyList : {"item 1", ¬
    "item 2", ¬
    "item 3", ¬
    "item 4", ¬
    "item 5", ¬
    "item 6", ¬
    "item 7", ¬
    "item 8", ¬
    (* edit the list to fit your needs *)
    tell application "AppleWorks 6"
    activate
    tell document 1
    set laClasse to (get class of selection)
    if laClasse is not field then return (* the selection is not a field *)
    set myItem to choose from list MyList
    if myItem is false then return
    set the clipboard to myItem's item 1
    select menu item 7 of menu 3 (*
    Tout sélectionner •• Select All *)
    paste
    end tell -- document 1
    end tell -- AppleWorks
    -- [/SCRIPT]
    Yvan KOENIG (from FRANCE lundi 19 mars 2007 16:44:53)

  • YTD and accumul. depreciation have the same value when dpis is 2 years ago

    Hi all
    I am using FA and i have some problems. I have just setup this module and now i want to migrate assets in the system. The customer gave me an excel with the following fields that want to be in the system like: asset cost, accumulated depreciation, date placed in service, ytd accumulation and so on.
    the problems are:
    1) when i want to enter new asset manually the ytd depreciation and accumulated depreciation are required to be equal. ok so far, i register new asset on test environment and when i enter the date placed in service for example two years ago (because that is the real date placed in service of the asset) and run depreciation, the system has calculated correctly the accumulated depreciation, but has calculated the same value even for YTD depreciation which is not true, because in this case accumulated depreciation and ytd depreciation are completely different. how to solve this problem? How can i put correct values in this fields?
    2) when i enter these assets directly in the fa_mass_additions table according to the fixed assets user guide, i have the following errors: when i put "ON HOLD" on queue name, and open these assets on the system, the on hold field has no value (is empty)
    When i try to run post mass additions, the report is not finding the parameter (book) because the system is giving en error message telling me that there is no value in this list of values
    please help to solve this problems because i am not being able to migrate assets for the company.
    Thank you and best regards

    gaskins,
    You may have different Color Settings, and if you use Pantone you should be aware that the whole interpretation has changed (a number of times, most radically recently).
    If you say more, more can be said.

  • Crystal Reports and values list of BEx variables

    Hello.
    I read this - http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsandBWquery+elements
    And there are writed in wiki:
    "List of values for SAP variables are created automatically by Crystal Reports only when you use SAP Toolbar to create the report:
    The list of values for a variable in Crystal Reports will be static, but the list will be always dymanic in InfoView as long as you use BW Publisher (save reports to BW, publish to BOE)and you logon to BOE using SAP Authentication."
    I have two link to BEx queries from my CR report - and my variables have not values. I think that I don't use "SAP" menu when created the report.
    But... what I can doing now? Is way transform "simple" report into "SAP" report?
    May be is way create "SAP" report and after it copy all content of old report into new "SAP" report including all objects, formats, formulas, connections?
    May be is way load values list from BEx query with "simple" reports?
    And another question - I see that in list I get texts and codes but showing only texts in run-time. Can I tune CR for show codes too?

    Post to Integration Kit SAP forum

  • Changing multiple velocities to the same value...?

    Hey guys,
    I have a very humanly played kick drum that I need to get all the velocities to the same value. How would I go about doing that?
    Anytime I try selecting them all - in hyper or event list - I can drag them all down the same amount, but not TO the same value.

    Do what you did before, but also press the ⌥ and ⇧ keys as you drag.

  • SCCM 2012 Reporting Code Returns Same Value For Total Number Of Required Updates Per Computer

    I'm trying to make a custom report in SCCM 2012 R2 with SQL 2012 since Microsoft took out the ability to list the number of updates needed per computer. This was in WSUS reporting but is not in SCCM reporting. I've made a custom report for this but can't
    quite get it to work. The report runs but the same value for total number of updates needed shows up for every computer. I took a query from one report and am trying to get it to run inside the select statement from another report. Here is the code as it is
    right now:
    declare @CI_ID int; select @CI_ID=CI_ID from fn_rbac_ConfigurationItems(@UserSIDs)  where CIType_ID=9 and CI_UniqueID=@AuthListID
              declare @StateID int
              select @StateID=StateID from fn_rbac_StateNames(@UserSIDs)  sn where sn.StateName=@StateName and TopicType=300
              declare @RequiredUpdateCount int
              select @RequiredUpdateCount=Count(v_StateNames.Statename) from   
    v_StateNames,   
    v_Update_ComplianceStatusAll   
    Inner Join v_R_System On (v_R_System.ResourceID = v_Update_ComplianceStatusAll.ResourceID)   
    Inner Join v_UpdateInfo On (v_UpdateInfo.CI_ID = v_Update_ComplianceStatusAll.CI_ID)   
    where   
    v_StateNames.TopicType = 500 and   
    v_StateNames.StateID = v_Update_ComplianceStatusAll.Status and   
    v_StateNames.Statename = 'Update is required'   
    Group By v_R_System.Name0
              select
                ccm.ResourceID,
                rs.Name0+isnull('.'+rs.Resource_Domain_or_Workgr0, '') as MachineName,
                rs.User_Domain0+'\'+User_Name0 as LastLoggedOnUser,
                asite.SMS_Assigned_Sites0 as AssignedSite,
                rs.Client_Version0 as ClientVersion,
    @RequiredUpdateCount as RequiredUpdates  
              from fn_rbac_ClientCollectionMembers(@UserSIDs)  ccm
              join fn_rbac_Update_ComplianceStatusAll(@UserSIDs)  cs on cs.CI_ID=@CI_ID and cs.ResourceID=ccm.ResourceID
                and (@StateID=0 and cs.Status=0 or @StateID=1 and cs.Status in (1,3) or @StateID=2 and cs.Status=2)
              join fn_rbac_R_System(@UserSIDs)  rs on rs.ResourceID = ccm.ResourceID
              left join fn_rbac_RA_System_SMSAssignedSites(@UserSIDs)  asite on asite.ResourceID = ccm.ResourceID
              where ccm.CollectionID=@CollID
              order by MachineName
    Ben JohnsonWY

    There's plenty wrong with it. It gives you no idea of how many patches each box needs. Then you have to click on each computer, click the sort arrow by the "required" column, and count the number needed. When you have hundreds of computers to work on this
    is a big deal as it's very time consuming. What's great about the view in WSUS that had this is that it listed this for you and you could sort the required column. So if have most computers needing 2 patches, you can go find the one that needs 40 and 150 (to
    over exaggerate) and put the time on them needed to see why they're so far behind. The WSUS format was quick, easy, and informative. SCCM makes getting this info a royal PITA which is why I'm (and many others) so royally peeved at MicroShaft for removing this
    functionality, but that's what we've all come to expect from MicroShaft--just like when then took the nice colorful themes out of Office 2010 and replaced them in Office 2013 with just white, gray, and a darker gray. That's super boring and actually hurts
    my eyes.
    Ben JohnsonWY

  • Appraisals - Value list/Rating scales problem

    I assign the rating scale/value list to a template. I face a problem. I have defined a 5 scale rating. Its working fine in R/3 side. But when I go to ESS/MSS, an extra 'Select a Value' comes as default. I do not want this default. Is there any way, I can remove it or change its description. This is coming even if I make the value required.
    Also, I want to change the standard description of the value. So I went to 'Value Description' tab in the template. But it is greyed out. How can I make it open for entry?

    >
    Michael L Pappis wrote:
    > FS,
    >
    > I've also worked through some problems on the value list display in EP4.  Before even resolving your issue, I would strongly urge you to implement the following notes:
    >
    > 0001412852
    > 0001447316
    > 0001450122
    >
    > regarding changing the descriptions of the value list - go to phap_catalog (refresh it new, dont click on any templates), immediately navigate to go-to -> value list.  Here you can define your value list and change descriptions.  Typically you don't modified the sap value list, create your own. 
    >
    > you also need to cateogrize your value list, go back to phap_catalog - navigate to go-to -> basic settings.  Create your value with same value reference # in the qualitative class. 
    >
    > Now, regarding how to make "select a value" disappear, trying configuring an value ID of 0  in your value list- with whatever description you want. 
    >
    > see what effect that has - only after implementing the 3 notes.
    Michael - I am reading this note "  > you also need to cateogrize your value list, go back to phap_catalog - navigate to go-to -> basic settings.  Create your value with same value reference # in the qualitative class.  "   and I am confused.  Are you saying to create the same list under more than one ValueClass ? 
    I am struggling with a Yes, No, N/A value list  having the 'No Value' included in the dropdown. 
    Hope you are having a terrific day!

Maybe you are looking for