Cache an LDAP query result in a Map Object

Is there a way to perform a single LDAP query and store it in some type of an indexed list Object in memory. Specifically I need to populate both LDAP manager and managerFullName for an LDAP user object based on an employeenumber query.
I don't want to query LDAP for every user object. I would like to submit one search such as (objectclass=inetorgperson) and store the result in an indexed list in memolry using employeenumber as the key. This way I only need to query the indexed list object for each user entry.
Is this possible?

No this is not possible.
The only way to do this is to use a java class you write yourself. But and a major but: if you do not stay in the same place in IDM (form or workflow) you will lose the content because the object will be garbage collected when you change.
The other thing is: how much will you gain? The ldap server can probably return the result far quicker then you can iterate through the list to find the entry.
WilfredS

Similar Messages

  • Using the client result cache without the query result cache

    I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
    This is done using a result_cache hint in the query.
    select /*+ result_cache */ * from table
    As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
    The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
    Thanks.

    e3a934c9-c4c2-4c80-b032-d61d415efd4f wrote:
    I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
    This is done using a result_cache hint in the query.
    select /*+ result_cache */ * from table 
    As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
    The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
    Thanks.
    You haven't provided ANY information about how you configured the result cache. Different parameters are used for configuring the client versus the server result cache so you need to post what, if anything, you configured.
    Post the code you executed when you set the 'client_result_cache_lag' and 'client_result_cache_size' parameters so we can see what values you used. Also post the results of querying those parameters after you set them that show that they really are set.
    You also need to post your app code that shows that you are using the OCI statements are used when you want to use client side result cacheing.
    See the OCI dev guide
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci10new.htm#sthref1491
    Statement Caching in OCI
    Statement caching refers to the feature that provides and manages a cache of statements for each session. In the server, it means that cursors are ready to be used without the need to parse the statement again. Statement caching can be used with connection pooling and with session pooling, and will improve performance and scalability. It can be used without session pooling as well. The OCI calls that implement statement caching are:
      OCIStmtPrepare2()
      OCIStmtRelease()

  • Processing large LDAP query results

    I need to perform batch lookups of employees in an Active Directory instance - thousands of employees at a time - from within an ALBPM process based on a group filter. (I.e., get all employees in group X.) This works fine for small groups, but any query against a group with more than 1500 members returns zero results.
    By default, AD limits the size of result sets to 1500. I have worked around this on other platforms by specifying query parameters that allow large result sets to be "paged." This allows results to be returned one chunk at a time over a single connection. Is there a way to do this in ALBPM, such as by including additional parameters in the "lookup" method of an LDAP component?
    Thanks for any assistance.

    Are you using your application from Studio Engine or Enterprise engine?
    Regards
    Right Chord

  • Query Result Replacement between different objects

    Hi All
    I have a req. where i need to pass result of one query and restrict the second query with this. Usually its easy if they both are same object like say Sales Document(0DOC_NUMB). But in my case i need to pass 0DOC_NUMB from first query to 0REF_DOC in second query. Has anyone done this? Any help will be appreciated.
    Thanks

    Hi ,
    You can try creating a replacement path variable on 0DOC_NUMB getting filled by the first query.
    Then you can pass these values to a variable of type customer exit on 0REF_DOC in second query in the user exit for variables.
    I guess however both the variables need to be used in the second query to get the results.
    rgds
    Deepak

  • Howto handle persistence API query result list

    Hello.
    I need some advice on how to handle a persistence API query result List since the Object variable returned by the "list.get(i)" method cannot be cast to an EntityClass declared by the EntityClassManager.
    The piece of code below might help you understand my exact problem.
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("SporTakipPU");
    EntityManager em = (EntityManager) emf.createEntityManager();
    Query q1 = em.createQuery( "SELECT d.id, d.date, c.name, c.sirname FROM Log d, Kisi c WHERE d.id = :id AND c.id = :id" );
    q1.setParameter( "id", argument );
    List logList = q1.getResultList();
    Log log = (Log) logList.get(1);
    In this code i cannot cast Object to Log in the last line. Apparently this has something to do with the query.
    Trying to solve this problem i declared two private string variables name and sirname and their set and get methods but this didn't help.
    Thanks...

    Entity Class : ReportView
    ===================
    @Entity
    @Table(name = "dummy")
    public class ReportView implements Serializable {
    @Id
    @Column(name = "id", nullable = false)
    private Integer id;
    // getter , setter
    SessionBean : ReportSessionBean
    ==========================
    public List<ReportView> getReports() {
    Query q = em.createNativeQuery("SELECT ID FROM REPORT", ReportView.class);
    List<ReportView> r=(List<ReportView>)q.getResultList();
    return r;
    JSF / Back Bean : ReportBackBean
    ==========================
    public class ReportBackBean {
    @EJB
    private ReportSessionRemote reportSessionBean;
    /** Creates a new instance of ReportBackBean */
    public ReportBackBean() {
    public List<ReportView> getReports() {
    return reportSessionBean.getReports();
    JSF
    ===
    <f:view>
    <h:dataTable value="#{ReportBackBean.reports}" var="report" border="1">
    <h:column>
    <h:outputText value="#{report.id}"/>
    </h:column>
    </h:dataTable>
    </f:view>
    Regards,
    Telman
    ..

  • cache-query-results question

    I have another post for general descriptor tag information but I do have a specific question. In a project I am looking at I see:
    <cache-usage> check cache by primary key </cache-usage>
    <cache-query-results>false</cache-query-results>
    <maintain-cache>true</maintain-cache>
    I'm not sure how to interpret this. Does this mean that a cache is in place or not? cache-query-rests is set to false which implies no caching, yet the other parameters imply a cache is in place. What overrides here?
    Thanks

    The XML maps directly to the API so the JavaDocs and related documentation are the best tools:
    cache-usage: query.setCacheUsage(int)
    This option indicates how the object cache should be used when processing the query. This is how in-memory query is configured as well as support for cache-hits on ReadObjectQuery.
    cache-query-result: query.setShouldCacheQueryResults(boolean)
    This option allows you to indicate that the results returned from the query execution should be held. When the query is executed again these results will be returned without going to the database or searching the object cache. This is just caching the results locally within the query.
    maintain-cache: query.maintainCache() or query.dontMaintainCache()
    This setting determines if the results returned from the query should be cached in the shared object cache. It is on by default and turning this off is very rare. Occasionally done to compare the cache version with the database verision when handling an optimistic locking failure.
    Doug

  • Query result caching on oracle 9 and 10 vs indexing

    I am trying to improve performance on oracle 9i and 10g.
    We use some queries that take up to 30 minutes to execute.
    I heard that there are some products to cache query results.
    Would this have any advantage over using indexes or materialized views?
    Does anyone know any products that I can use to cache the results of this queries on disk?
    Personally I think that by using the query result caching I would reduce the cpu time needed to process the query.
    Is this true?

    Your message post pushes all the wrong buttons starting with the fact that 9i and 10g are marketing labels not version numbers.
    You don't tune queries by spending money and throwing resources at them. You tune them by identifying the problem queries, running explain plans, visualizing their output using DBMS_XPLAN, and addressing the root cause.
    If you want help post full version numbers, the SQL statements, and the DBMS_XPLAN outputs.

  • Cannot query using both conforming and cached query result

    TopLink doesn't allow me to both use conforming and cached query result at the same time.
    Conforming is certainly not a superset of the [cached query result] features.
    Can you confirm that it's a limitation of TopLink?
    Any know workaround to end-up with the same features as using both conforming and cached query result?
    Conforming is about seeing modifications you do in the same transaction. As a bonus, if you query for one object and specify at least the id as criteria because TopLink will have to check in memory anyway it can avoid going to the database.
    But if I do a query like "give me employees hired before now and after 30 days ago" it's about more than one objects and about finding existance so cached query result is needed to get acceptable performance in a complex application trying to avoid the same SQL generated over and over again.

    Thats where the trace just ends? It doesnt look like there's any LIKE or filtering going on (with respect to the Oracle pieces anyway), apparently MSAccess simply requested the whole table.
    What do you mean by 'hang' exactly? Are you sure it's just not taking a long time to complete? How long have you waited? How fast does it complete on the other environment?
    ODBC tracing isnt likely to help much for that. SQLNet tracing would be better to see what is going on at a lower level. Specifically, what is going on at the network level? Is the client waiting for a packet to be returned from the database?
    Is the database having a hard time processing the query, perhaps due to index/tuning issues?
    Assuming that is indeed the query that is "hung", how much data does that return?
    Are you able to reproduce the same behavior with that query and vbscript for example?
    Greg

  • Mapping query result

    Hello,
    I can't map string Display Name to the string property, on the User prompts tab I set prompt with type Query Result, on the Configure Prompts I configure this query by selecting AD User of Group -> Display Name, now I have Prompt Output called DisplayName
    (string). On the Map prompts I can't map this prompt to the string property, why? I just want to choose one user from AD and put it on the form as string.

    You will never get "simple values" from a query result. The option "3. Display Columns" are the properties on the class that you display on the portal. You will not be able to map a query result anywhere. You must attach it somehow to the request (in the
    last tab "4. Options").
    So even though the prompt output says "DisplayName (string)" you are still getting an object out of it. This makes more sense if you select more properties in 3.
    http://codebeaver.blogspot.dk/
    Thanks fro info, I have a script which reads custom string property of my custom service request class and translates it to 'AD user class' and makes it as Reviewer in the Review Activity. But instead of textbox field on the portal I need to use query,
    how can I get info from this service request about query to create AD user in my script?
    I placed query form on the portal to test, it shows only 2000 objects by default, is it possisble to show members of some OU or group in this field?

  • Critical: LDAP: query DNS result DNS Hard Error looking up e

    I am not having any luck when trying to connect to all 3 of our LDAP Servers...I get this error in the logs:
    Critical: LDAP: query DNS result DNS Hard Error looking up MyServer.Mydomain.com (A): NXDomain
    It is open through our Firewalls. I don't even see the Test Query reach our Firewalls...any suggestions what I am doing wrong?
    We were using Surfcontrol and it worked fine... :?:

    In Surfcontrol I put the IP without the DN and the query returns all the users.
    In IronPort when I put the IP without the DN and do an Accept query using my email address in the Recipient Address I get the above error.

  • Create Materialized View based on Results from LDAP Query

    Hi -- I'm trying to create a materialized view based on results from an LDAP query. Unfortunately, it looks like a materialized view can't be created based on a stored procedure, which is where the LDAP results are obtained (using nested loops).
    Does anyone have any idea how to do this without first kicking off a stored procedure that populates a temp table which would be used to create the materialized view? I'm trying to minimize the steps that the DBA's will need to go through when refreshing this new view.
    Thanks,
    ~Christine

    Can you give us more details about the stored procedure you're calling. It will help to know what parameters are involved and what data types they are.
    Off the top of my head though it looks like, at the very least, you would need a stored function that calls the stored procedure. I don't think there is any way to call stored procedures from CREATE ... commands. If you're going to create a stored function anyway ... well, you might as well just create a procedure that inserts values into a regular table instead of fussing with functions and materialized views. You'll probably want to schedule your new procedure to run periodically since it sounds like you'll need the values refreshed from time to time.

  • Query result cache with functions

    Hi all,
    one of my colleagues has found a little bit weird behavior of a query result cache. He has set result_cache_mode = 'FORCE' (but it can be reproduced with a result_cache hint too) and suddenly functions called from the query get executed twice (for the first time) .
    An easy example:
    alter session set result_cache_mode = 'FORCE';
    create sequence test_seq;
    create or replace function test_f(i number)
    return number
    is                  
    begin
      dbms_output.put_line('TEST_F executed');
      --autonomous transaction or package variable can be used too
      return test_seq.nextval;
    end;
    prompt First call
    select test_f(1) from dual;
    prompt Second call
    select test_f(1) from dual;
    drop sequence test_seq;
    drop function test_f;
    First call
    TEST_F(1)
             2
    TEST_F executed
    TEST_F executed
    Second call
    TEST_F(1)
             1
    As you can see - for the first time the function is executed twice and return the value from the second execution. When I execute the query again it returns the value from the first execution... but it doesn't matter, problem is in the double execution. Our developers used to send emails via select (it's easier for them):
    select send_mail(...) from dual;
    ... and now the customers complains that they get emails twice
    And now the question - is there any way, hot to get rid of this behavior (without changing the parameter back or rewriting code)? I thought that the result cache is automatically disabled for non-deterministic functions...or is this an expected behavior?
    Thanks,
    Ivan

    Interesting.. you are right:
    SELECT /*+ RESULT_CACHE */ 'dog' FROM DUAL;
    And at the second execution:
    | Id  | Operation        | Name                       | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |                            |     1 |     2   (0)| 00:00:01 |
    |   1 |  RESULT CACHE    | cc5k01xyqz3ypf9t0j28r5gtd1 |       |            |          |
    |   2 |   FAST DUAL      |                            |     1 |     2   (0)| 00:00:01 |
    Hmmm..

  • Query results cached?

    For a report region, is the query results cached?
    That is, is the report query being executed again
    in the following condition:
    * when a user navigate between pages of a report
    (from page 1 (1-100 of 1000 rows) to page 2 (101-200 of 1000 rows)
    * when a user clicks on the column heading to sort the report

    Ken,
    In both cases the query is executed again.
    Regards,
    Marc

  • PL/SQL to map query results to a column?

    Is there a programmatic way to map the query result to a value in a table?
    I have table A. There's a column with a carat-delimited string 0^0^1^ that I can parse with substr/instr functions. So, query that table/column for a 5th digit that sits between 5th and 6th ^ character.
    There's table B. It has a 'position' column and 'key' column. How do I let the table A know that when I query table A for 5th digit, it needs to map to table B's where position=5?
    thanks,

    Did you try to run those statements? Please do so next time.
    Also the creation of table C (or is it D) and E are missing.
    However, the tricky part is in deciphering table A to make up for the flawed design.
    I hope this piece of SQL is helpful for you, because you could join the outcome to your other tables:
    SQL> create table a
      2  ( visitor_id number(*,0),
      3  adate date,
      4  carat varchar2(4000 byte),
      5  ip_address varchar2(4000 byte),
      6  state varchar2(4000 byte),
      7  city varchar2(4000 byte),
      8  id number(*,0) not null enable,
      9  constraint "a" primary key (id)
    10  )
    11  /
    Tabel is aangemaakt.
    SQL> insert into A
      2  (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(194296532,TO_DATE('2007-06-26.00.01.46',''),'-1^1^2^0^3^85741^3^0^176^0^1
    ^-1^41^-1^-1^US^0^-1^2^0^1^^^^^^^','71.226.9.44','az','tucson',1);
    1 rij is aangemaakt.
    SQL> insert into A
      2  (VISITOR_ID,ADATE,CARAT,IP_ADDRESS,STATE,city,id) VALUES(37482918,TO_DATE('2007-06-26.00.01.46',''),'0^1^2^5^^78154^3^7^184^0^1^2^
    17^2^1^US^1^0^1^0^0^^^^^^^','70.163.196.111','tx','san antonio',2);
    1 rij is aangemaakt.
    SQL> select id
      2       , visitor_id
      3       , i position
      4       , c value
      5    from a
      6   model
      7         return updated rows
      8         partition by (id, visitor_id)
      9         dimension by (0 i)
    10         measures ('^' || carat || '^' c)
    11         rules
    12         ( c[for i from 1 to length(regexp_replace(c[0],'[^\^]'))-1 increment 1]
    13           = regexp_substr(c[0],'[^\^]+',1,cv(i))
    14         )
    15   order by id
    16       , position
    17  /
            ID VISITOR_ID   POSITION VALUE
             1  194296532          1 -1
             1  194296532          2 1
             1  194296532          3 2
             1  194296532          4 0
             1  194296532          5 3
             1  194296532          6 85741
             1  194296532          7 3
             1  194296532          8 0
             1  194296532          9 176
             1  194296532         10 0
             1  194296532         11 1
             1  194296532         12 -1
             1  194296532         13 41
             1  194296532         14 -1
             1  194296532         15 -1
             1  194296532         16 US
             1  194296532         17 0
             1  194296532         18 -1
             1  194296532         19 2
             1  194296532         20 0
             1  194296532         21 1
             1  194296532         22
             1  194296532         23
             1  194296532         24
             1  194296532         25
             1  194296532         26
             1  194296532         27
             1  194296532         28
             2   37482918          1 0
             2   37482918          2 1
             2   37482918          3 2
             2   37482918          4 5
             2   37482918          5 78154
             2   37482918          6 3
             2   37482918          7 7
             2   37482918          8 184
             2   37482918          9 0
             2   37482918         10 1
             2   37482918         11 2
             2   37482918         12 17
             2   37482918         13 2
             2   37482918         14 1
             2   37482918         15 US
             2   37482918         16 1
             2   37482918         17 0
             2   37482918         18 1
             2   37482918         19 0
             2   37482918         20 0
             2   37482918         21
             2   37482918         22
             2   37482918         23
             2   37482918         24
             2   37482918         25
             2   37482918         26
             2   37482918         27
             2   37482918         28
    56 rijen zijn geselecteerd.Regards,
    Rob.

  • How to force Work Item Query Policy to refresh its cached query results?

    I have enabled the Work Item Query Policy on my TFS project.  It works as expected, except when using Visual Studio 2013 with the following sequence of steps:
    User selects Check in Pending Changes from the Source Control Explorer
    User enters in the ID of the work item to be associated to the changeset
    User clicks the Check In button
    Work Item Query Policy displays message ' Work item ##### was not found in the results of stored query...'
    User realizes his mistake, and modifies (and saves) the work item so that it is returned in in the query result set
    User clicks the Check In button again expecting the TFS policy to accept the association
    Work Item Query Policy still displays message ' Work item ##### was not found in the results of stored query...'
    Removing the Work Item and re-associating it does not make a difference.  The only workaround that I have found is to close Visual Studio and reopen it.  Does any one have a better solution than this?

    Our setup is different from the one you are using:
    - User is using VS 2013 Update 4.
    - We are running TFS 2010 SP1
    The test case that you described is different from the one that is causing my problem (that scenario works fine for me as well).  I am trying to associate the check in to the same work item both times; whereas, you are associating it to a different
    work item the second time.  I can consistently reproduce the error using the following steps:
    1) Create a query that returns All Bugs in Active state, and set it as the query for the Work Item Query Policy
    2) Create and save a new Bug
    3) Run the query to confirm that the new bug does not appear in the result set
    4) Checkout a file, modify it, save it
    5) Check in the file and associate it to the bug from step 2)
    - the Work Item Query Policy will issue an error message saying that the work item cannot be found in the associated query
    6) Change the state of the bug to Active, and save
    7) Refresh the query to confirm that the bug now appears in the result set
    8) Check in the file again
    - error message from step 5) will not go away

Maybe you are looking for

  • Error occur when installing weblogic server 10.3.3?

    Hello, I try to install weblogic server 10.3.3 in REDHAT linux 5.4 x86_64 (64-bit) server. as installation manul direct (http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14142/guimode.htm#BABIFBII) , run java -jar wls1033_generic.jar ( by the w

  • Posting to gl a/c with open item management are not permitted.

    hello, When i run FAGL_FC_VAL it display the report and generate the batch input session. But when i run the session the error massage appear -             "posting to gl a/c with open item management are not permitted." When i post the same gl mannu

  • Battery performance on vista v osx

    Hi there I have a macbook which runs vista and osx and am finding that the battery performance on vista is pretty poor compared to running osx - has anybody else experienced this and what would be causing it? cheers

  • Using indicator in drill through report

    Hey there, I'm working with Reporting Services in SharePoint mode using Sql Server 2012. I created a child report which gets several values from another report. I used one of these passed parameters as value for an indicator. When I deploy this repor

  • Urgent: how to add additional records to hashed table

    Hi, I want to add records to a hashed table. my code is: data: ipn_pc_zoba type hashed table of tpn_pc_zoba with unique key vbeln. loop at izoba into wzoba. clear wpn_pc_zoba . read table ipn_pc_zoba into wpn_pc_zoba with key vbeln = wzoba-LS_KDAUF.