JLDAP Pool Manager use with asynchronous search

I want to know the best way to use Pool Manager with asynchronous
searches. Specifically, when should I call makeConnectionAvailable().
Can I do this immediately after issuing the search cmd or do I need to
wait until after I have processed the LDAPSearchQueue?
Currently I am retrieving a BoundConnection from the PoolManager,
calling an async search, passing the LDAP SearchQueue off to another
thread for processing and calling makeConnectionAvailable() to release
the thread. My concern is that this is not thread safe and that I am
releasing the connection too early.
bcampbell88
bcampbell88's Profile: http://forums.novell.com/member.php?userid=104522
View this thread: http://forums.novell.com/showthread.php?t=432304

jwilleke;2074885 Wrote:
> On 2/11/11 3:06 PM, bcampbell88 wrote:
> >
> > I want to know the best way to use Pool Manager with asynchronous
> > searches. Specifically, when should I call
> makeConnectionAvailable().
> > Can I do this immediately after issuing the search cmd or do I need
> to
> > wait until after I have processed the LDAPSearchQueue?
>
> AFAIK, yes you have to wait.
> -jim
>
> >
> > Currently I am retrieving a BoundConnection from the PoolManager,
> > calling an async search, passing the LDAP SearchQueue off to another
> > thread for processing and calling makeConnectionAvailable() to
> release
> > the thread. My concern is that this is not thread safe and that I
> am
> > releasing the connection too early.
> >
> >
Thanks Jim! much appreciated.
bcampbell88
bcampbell88's Profile: http://forums.novell.com/member.php?userid=104522
View this thread: http://forums.novell.com/showthread.php?t=432304

Similar Messages

  • A good design for a single thread pool manager using java.util.concurrent

    Hi,
    I am developing a client side project which in distinct subparts will execute some tasks in parallel.
    So, just to be logorroic, something like that:
    program\
                \--flow A\
                           \task A1
                           \task A2
                \--flow B\
                            \task B1
                            \task B2
                            \...I would like both flow A and flow B (and all their launched sub tasks) to be executed by the same thread pool, because I want to set a fixed amount of threads that my program can globally run.
    My idea would be something like:
    public class ThreadPoolManager {
        private static ExecutorService executor;
        private static final Object classLock = ThreadPoolManager.class;
         * Returns the single instance of the ExecutorService by means of
         * lazy-initialization
         * @return the single instance of ThreadPoolManager
        public static ExecutorService getExecutorService() {
            synchronized (classLock) {
                if (executor != null) {
                    return executor;
                } else {
                    // TODO: put the dimension of the FixedThreadPool in a property
                    executor = Executors.newFixedThreadPool(50);
                return executor;
         * Private constructor: deny creating a new object
        private ThreadPoolManager() {
    }The tasks I have to execute will be of type Callable, since I expect some results, so you see an ExecutorService interface above.
    The flaws with this design is that I don't prevent the use (for example) of executor.shutdownNow(), which would cause problems.
    The alternative solution I have in mind would be something like having ThreadPoolManager to be a Singleton which implements ExecutorService, implementing all the methods with Delegation to an ExecutorService object created when the ThreadPoolManager object is instantiated for the first time and returned to client:
    public class ThreadPoolManager implements ExecutorService {
        private static ThreadPoolManager pool;
        private static final Object classLock = ThreadPoolManager.class;
        private ExecutorService executor;
         * Returns the single instance of the ThreadPoolManager by means of
         * lazy-initialization
         * @return the single instance of ThreadPoolManager
        public static ExecutorService getThreadPoolManager() {
            synchronized (classLock) {
                if (pool !=null) {
                    return pool;
                } else {
                    // create the real thread pool
                    // TODO: put the dimension of the FixedThreadPool in a property
                    // file
                    pool = new ThreadPoolManager();
                    pool.executor = Executors.newFixedThreadPool(50);
                    // executor = Executors.newCachedThreadPool();
                    return pool;
         * Private constructor: deny creating a new object
        private ThreadPoolManager() {
        /* ======================================== */
        /* implement ExecutorService interface methods via delegation to executor
         * (forbidden method calls, like shutdownNow() , will be "ignored")
          // .....I hope to have expressed all the things, and hope to receive an answer that clarifies my doubts or gives me an hint for an alternative solution or an already made solution.
    ciao
    Alessio

    Two things. Firstly, it's better to use     private static final Object classLock = new Object();because that saves you worrying about whether any other code synchronises on it. Secondly, if you do decide to go for the delegation route then java.lang.reflect.Proxy may be a good way forward.

  • Assign points to quiz slides using Question Pools Manager

    Is it possible to assign the points to be reported for a slide when using the Question Pools Manager?
    If one slide, for example, has 10 points, and another slide has 5 points, when they are both added to a question pool, do their loose their original number of points and get assigned whatever number of points chosen when a random slide is added to the pool?
    I hope someone can clarify. Thanks.

    I just checked in Captivate 5 and it looks like the scoring is associated with the Question Pool slide, not the Question slide that gets randomly inserted.
    If you're trying to achieve a result where the difficulty of the question matched the number of points awarded for getting it right, you might need to set up a number of question pools.  E.g. one pool for easy questions, another for medium difficulty, and a third for really difficult ones.  Assign 1 or 2 points as the default for the easy ones, maybe 5 for medium, and 10 points for hard ones.
    This is what I do in fact.

  • How Transaction Manager work with Resource Manager, like Connection pool?

    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!

    Xin Zhuang wrote:
    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!Hi. If you configure your WLS DataSource to use keep a connection for
    the duration of a tx, it will do that, and in any case there can be
    no deadlock however many connections operate for a given XA transaction.
    Here is the best coding form for DAOs or any other user-written code
    for using WebLogic DataSources. This is important for two reasons:
    1 - Thread-safety is maintained as long as the connection is a
    method-level object.
    2 - It is crucial to notify WebLogic that you are done with a connection
    ASAP, by your calling close() on it. We will then put it back in the
    pool, or keep it under the covers for your next request if it's in a
    transaction etc. The pool is optimized for quick get-use-close scenarios.
    public void one_of_my_main_JDBC_Methods()
    Connection con=null; // Must be a method level object for thread-safety
    // It will be closed by the end of the method.
    try {
    con = myDataSource.getConnection(); // Get the connection in the try
    // block, directly from the WebLogic
    // datasource
    // do all the JDBC within this try block. You can pass the
    // connection to subordinate methods, but not to anywhere
    // that thinks it can use the connection later.
    rs.close(); // close any result set asap
    stmt.close(); // then close any statement asap
    // When you're done with JDBC
    con.close(); // close the connection asap
    con = null; // nullify it so the finally knows it's done
    catch (Exception e) {
    // do whatever catch stuff you want. You don't
    // need a catch block if you don't want one...
    finally {
    // It is important to close a JDBC connection ASAP when it's not needed.
    // without fail, and regardless of exit path. Do everything in your
    // finally block in it's own try-catch-ignore so everything is done.
    try { if (con != null) con.close();} catch (Exception ignore){}
    return ret;
    }

  • SPA112 use with Call Manager

    We have used ATA 186 devices with our Call Manager system for use with fax machines and analog phones in a manufacturing environment.  I am hopeful that the SPA112 can be used as a lower cost alternative to the older ATAs.  
    I have searched for basic configuration information for use with Call Manager but haven't come across anything. 
    Can these devices be used with Call Manager and is there basic information available on how to configure them?
    Thanks.

    The SPA112 is essentially the same as the Linksys PAP2t adapter.
    They both use SIP protocol, and can be added to Callmanager, but I don't think the SPA112 is supported in this configuration.
    I was able to get the SPA112 to work with CallManager by adding it as an Advanced SIP device.  That uses more licenses (6 I think).
    https://supportforums.cisco.com/thread/2082101
    That details getting a Linksys PAP2 device working with CallManager 7.1
    I got SPA112's working by using the info in that link.  You have to set it all up manually, but it does work.

  • How do I do this to use OVerdrive media on deviceThe Apple device must be formatted for use with Microsoft Windows.  The iTunes setting 'Manually manage music-' must be enabled for the device before you can complete the transfer.

    I cannot make these directions work
    I downloaded media on Overdrive MEdia on my PC
    I have the overdrive media ap on my I pod touch 4g
    this media is suppossed to be compatible w/I pd touch
    Notes on Transferring OverDrive MP3 Audiobooks…
    Most MP3 capable devices should play OverDrive MP3 Audiobooks.
    If you intend to transfer OverDrive MP3 Audiobooks to an Apple® device, note the following…
    iTunes® v9.0.2 (or newer) is required.
    The Apple device must be formatted for use with Microsoft® Windows®.
    The iTunes setting 'Manually manage music…' must be enabled for the device before you can complete the transfer. Adjust this setting in iTunes as follows…
    Connect the iPod® to your computer.
    If it does not launch automatically, open iTunes v9.0.2 (or newer).
    In iTunes, locate the device in the left vertical navigation panel (under heading 'DEVICES'), and click the device.
    The 'Summary' screen is displayed. 
    Place a checkmark next to 'Manually manage music…'.
    Click the 'Apply' button.
    The iTunes 'Summary' screen refreshes, and the changes are saved.
    If desired, close iTunes.
    Note that if an Apple device is connected to your computer, you can choose to simultaneously transfer a title to the iTunes Library and the Apple device. If you wish to only transfer a title to the iTunes Library, you must first disconnect the Apple device

    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities
    Also you said " I want to add them to my iCloud, and also back to my computer.   " Note that unless  subscribe to iTunes match, only iTunes purchases are stored in iCloud.
    Also,
    You can redownload most iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Am using Firefox 5.0.1, any new tabs open with a search engine for imvu and when I go to about:config there is no entry for browser.newtab.url that I can modify

    I am using Firefox 5.0.1.4205 with Windows 7 Home Premium Service pack1. My new tabs in Firefox open with a search engine for imvu rather than google as I would prefer. I can't find an answer to my problem so far because when I try the recommended use of about:config and finding browser.newtab.url; it is not listed. Is this version of firefox to old to have that, or is it just missing? What can I do to get my new tabs to open with a Google search engine. This is on my 80 year old father's computer so he is not likely to upgrade browsers as I would on my home computer. Thank you for any help with this.

    The new tab page (about:newtab) wasn't introduced until a later version of Firefox (iirc, ''Firefox 10'') , which is why that pref can't be found.
    Sounds like your father picked up some Malware.
    Maybe this is what you're dealing with.
    http://www.shouldiremoveit.com/IMVU-Inc-Toolbar-34367-program.aspx
    Also, I see a number of Plugins listed to bee concerned about.
    Toolbar Plugin
    MindSpark Toolbar Platform Plugin Stub for 32-bit Windows
    WildTangent Games App V2 Presence Detector

  • How to use ADF Query search with EJB 3.0

    Hi,
    In ADF guide http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/web_search_bc.htm#CIHIJABA
    The steps to create query search with ADF Business Components says:
    "+From the Data Controls panel, select the data collection and expand the Named Criteria node to display a list of named view criteria.+"
    But with EJB, I'm not able to find Named Criteria node. Can we use ADF query search component with EJB? If yes, can you please show me some example, tutorial etc.?
    Thanks
    BJ

    For EJBs you'll need to implement the query model on your own.
    An example of how the model should look like is in the ADF Faces components demo.
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/query.jspx
    Code here:
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html

  • Using SharePoint OOTB search with external DB

    Hi All,
    I am using SharePoint OOTB search to search for documents inside a document library. The document library has all the data except for two cases:
    1- Value stored in SharePoint document library as ID but the actual name is in an external DB (example: Document 100 has an organization code 7200, the list of all organizations is in an external DB)
    2- A look-up that exists in another SharePoint list with IDs only (example: a document 100 can belong to project 55, 66, 77). DocProject list that describes the 1:M relation is in the SharePoint list, however the project information for project 55, 66, and
    77 are in an external DB.
    When the user tries to search for a document by project or organization name, an external database should be involved to get the correct documents that fall under the search criteria.
    Can you please advice me on how can this be implemented? What are the options that I have?
    Many thanks

    Hi Ashish,
    Thanks a lot for the prompt reply and wish you a pleasant year.
    Unfortunately this scenario is not working in our case!
    In fact we have no problem at all if we added a new field to a list and configured it as a lookup field to an existing SharePoint list and then migrated its data and started to search by lookup name instead of ID.
    Our problem still exists as we fail to repeat the same scenario with a list that exists in an external database and was shown in SharePoint using Business Data Catalog. Whenever the lookup list is an external DB list, we can not use the name instead of the
    ID in search (even after we migrate the data, mark the field as a lookup field, and run full crawler)
    We also searched the re-index feature but found that it is a feature in SharePoint 2013 while our version is SharePoint 2010.
    Kindly advice as I am afraid we are missing a step or a certain configuration that makes SharePoint behavior different with BDC lists. Here are the detailed steps that I followed:
    1- From Central Admin, Add BDC service to SahrePoint
    2- Create a .net solution (SharePoint features BDC) that uses a web service that calls an Oracle stored procedure to get the data (full list) or (single Item) and maps them to BDC.readlist and BDC.readitem
    3-Deploy the custom BDC solution to SharePoint
    4- From SharePoint designer, create external content type that uses the custom BDC solution
    5- In the created external content type, added two operations (New Read Item Operation) and (New Read list operation).
    6- Create external list from the external content type
    7- Add new column to the original list as a look up column with the property (Get Information from) set to the external list
    8- Migrate data to the newly added column using SharePoint object model
    9- Run full crawler job
    10- Try the search, when searching by ID we get results, when searching by name, we get NO results!
    Many thanks,

  • Question when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    Question
    when I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    See this. <br />
    https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit

  • When I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    Question
    When I log into Firefox, the screen scrolls down and I have to use the side-bar to go back up to type my query into the 'search' window. How can I stop that and get Firefox to start with the 'search' window accessible? With thanks, Peter

    See this. <br />
    https://support.mozilla.com/en-US/kb/Firefox+hangs#Hang_at_exit

  • Error erase Queries in Query Manager- The query is used with user-define...

    Hello Experts
    I have deleted a User Field that had a Formatted Search and now I can not remove it because it is linked according to a UF, the error message is as follows:
    "The query is used with user-defined values [Message 952-23]"
    There will be a way to resolve this issue???
    Thanks in advance

    Hi Juan,
    I have tried this very limited, but the formid, is this a number in your case?
    SELECT * from cshs t0 inner join ouqr t1 on t0.queryid = t1.intrnalkey
    where t1.qname = '[%0]'
    Running this query I can get the form id that I need to recreate, but I have a feeling you already know the form id, is this correct?
    - Is there an error when you try to recreate the form id?
    - Will it not let you recreate the same form id because the id is given by the system?
    If it is not possible to recreate the form id, please prepare a backup and log a message. Support should be able to correct the entry in table cshs.
    Hope it helps.
    Jesper

  • Do others have a some problems using Firefox together with Charter? Mine is with my search.

    I have used and enjoyed Firefox for years. I have Charter cable and my homepage is Charter.net. When I try to use the Google search on that homepage screen, the results are terrible, giving me nothing more than Google search box (its entry) and a blank white screen.
    Is there a way I can take care of this problem?
    I don't have this problem when I try using Internet Explorer, but I'd much rather use Firefox. Thanks.

    Hello,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • I cant use the "google search" button but no proble, with internet explorer. The" feeling lucky" works.

    i cant use the "google search" button with firefox 3.6.6 or even 3.5. I have no problem with searching google on internet explorer. The" Im feeling lucky" button works. The google search tab on the top right corner of firefox browser works fine. But the main google search button on the google site doesnt work. I havent changed anything. i cant do anymore google searches.
    == URL of affected sites ==
    http://www. google.com

    When click on search, the Google search result didn't update (the google search page didn't change). BUT the url bar on top did have the Google URL updated with the new search term.
    Something like
    http://www.google.com/#hl=en&q=firefox+3.6+problem+with+google+search+button&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=dd2d1939af06a5a
    So the URL is changed when I click the Google SEARCH button on the page. Just the page not changed nor updated.
    And when I click "Reload current Page", then the page is reloaded with the new google search result.

  • When I right click on a highlighted word I am prompted to search with AVG. I would prefer to search using an alternative search engine. How do I change this?

    When I right click on a highlighted word I am prompted to search with AVG. I would prefer to search using an alternative search engine. How do I change this?

    Reply: Cor-el > Excellent!! Thank You. In Tools, Add Ons, Extensions there was a Default Tab enntry which was the culprit. Am running W7 so the XP Tools, Options, Advanced , Use Hardware acceleration when available, wasn't of much help here, however I did fix a problem on another computer running XP with that same fix. Thank You very much! HD

Maybe you are looking for

  • Crystal Reports 2008 and Sharepoint Services in 64bit

    Hi, I have searched and post questions about the problems with the fact that thera are no great support for 64 bit. And still no solution. Why? Why? Why? Now to my question. I have Crystal Reports 2008 in a Windows 2008 64 bit. Yes, I have got it run

  • General optimization suggestions

    Hi I love Arch. It's fast, convenient and easy to understand. However i sometimes feel the system should be faster. So maybe i'm missing something... i'd like to hear system optimization techniques in this thread. Let me start: * compile your own ker

  • Help in design ace "waas"

    I designing a waas solution and ace interception and i found some issues i attached simple topology for the network it has 150 branch and we will implement waas in 6 branches as start the topology has 2 6500 each with 1 ACE moduel . 1.as start i know

  • Conditional exists in pure SQL.

    Hi, I'm on 10.2.0.3 and got problem like this create table big (id number , words varchar2(22)); insert into big values (1, 'aaa'); insert into big values (1, 'abc'); insert into big values (1, 'bbb'); insert into big values (1, 'ccc'); insert into b

  • Connections to other systems

    Hi,     I came to know that BD97 is also used to check the connections from R/3 to APO or other systems. Does anyone know what's the advantage of using BD97 compared to SM59 and how do we check the connections in BD97? Thanks