BC4J Question: How does AM and Connection Pooling work?

Hello everybody,
we are just trying to understand what exactly happens when a BC4J Application Module is created / when a AM is checked out of the pool with respect to Connection and Application Module Pooling. Especially we would like to understand what ConnectionStartegies, EnvInfoProvider and SessionCookies exactly do and when and how to customize them. Especially we would like to use features like virtual private databases (VPD) and proxy authentication (a feature of the Oracle OCI JDBC driver) with BC4J application modules. We found the HowTo about using JAAS and VPDs with BC4J (http://otn.oracle.com/products/jdev/howtos/bc4j/bc4jvpdjaas.html) but there are still questions, e.g. when is the afterConnect() method of an ApplicationModuleImpl called? During the instanciation of an AM or every time it's check out of the pool?
Any info on this topic would be very welcome!
Regards
Stefan

Hi,
1. Setting jbo.doconnectionpooling=false ,
connection pool still exists.
Is it correct ? When you set this parameter to false, you are saying that Connection Pool is not managed by AM, so you need to specify a JNDI Name in Application Module to use a Pool not managed by AM.
2. There is one situation to set
jbo.doconnectionpooling=true. The article said
"when you have a large number of application
module pools all needing to database connections
from the same underlying application user at the
database level. In this case, the many application
module pools can perhaps economize on the total
overall database sessions by sharing a single,
underlying database connection pool of JDBC
connections, albeit at a loss of efficiency of each
one. This choice would be favored only if total
overall database sessions is of maximum priority. "
Does it mean that if we set it to true when we
have many many AM instances and we cannot afford to
have such number of connection instance in the pool
? It's means that the JDBC connections will be shared avoid new Connection at time.
Normally i use Connection Pool not managed by Application Module.
Bye

Similar Messages

  • How does failover and load distribution work in Operations Manager resource pools?

    Hello everyone,
    I have a couple of questions in regard to failover and load distribution in resource pools.
    What is the criteria for an x-plat or network device to initiate a failover?
    How is load distributed in a resource pool - Is it round-robin, performance based or something completely different?
    In case more than two management servers are in the same pool, and a management server becomes unavailable, how is load distributed among the remaining resource pool members?
    Any help is appreciated.
    Thx,
    Claus

    Hi,
    Resource Pools are a collection of Health Services working together to manage instances assigned to the pool. 
    Workflows targeted to the instances are loaded by the Health Service in the Resource Pool that ends up managing that instance. 
    If one of the Health Services in the Resource pool were to fail, the other Health Services in the pool will pick up the work that the failed member was running. 
    And I would like to share this article with you. Hope it helps.
    http://www.systemcentercentral.com/how-does-the-failover-process-work-in-opsmgr-2012-scom-sysctr/
    Niki Han
    TechNet Community Support

  • How does nocycle in connect by work?

    hello
    there is a table t that defines parent-child relation:
    p | c |
    6 | 4 |
    5 | 4 |
    4 | 5 |
    4 | 6 |with this query:
    select level l, p, c, connect_by_iscycle cycle, connect_by_root p root_p, connect_by_root c root_c
    from t connect by nocycle prior c = p;the result for level 3 is the following:
    L | P | C | CYCLE | ROOT_P | ROOT_C
    3 | 4 | 5 | 1     | 4      | 6  
    3 | 4 | 6 | 1     | 4      | 5   my reasoning is as follows. there are 4 rows at level 1: (4,5) (4,6) (5,4) (6,4) and each row can be a starting point for CONNECT BY paths down to level 3
    (a) (4,5) -> (5,4) -> (4,5)
    (b) (4,5) -> (5,4) -> (4,6)
    (c) (4,6) -> (6,4) -> (4,5)
    (d) (4,6) -> (6,4) -> (4,6)
    (e) (5,4) -> (4,5) -> (5,4)
    (f) (5,4) -> (4,6) -> (6,4)
    (g) (6,4) -> (4,5) -> (5,4)
    (h) (6,4) -> (4,6) -> (6,4)for me (a),(d),(e),(h) are loops, which leaves (b),(c),(f) and (g) as non loops.
    my question is: why are (f) and (g) excluded from the result? I suppose I make a mistake in reasoning, but exactly at which point?
    thank you
    create table t (p number, c number);
    insert into t values(4,5);
    insert into t values(4,6);
    insert into t values(5,4);
    insert into t values(6,4);

    Hi,
    As always, start with the Oracle documentation. The SQL language manual
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/pseudocolumns001.htm#i1009313
    says "The CONNECT_BY_ISCYCLE pseudocolumn returns 1 if the current row has a child which is also its ancestor. Otherwise it returns 0."
    In this example, CONNECT_BY_ISCYCLE=1 when the current row (let's call it X) is connected to another row (Y) according to the conditions in the CONNECT BY clause, but the c column of Y has already appeared as c in the path leading to X.
    When trying to understand CONNECT BY queries, I find it helpful to display the results of SYS_CONNECT_BY_PATH. For example, the following query
    SELECT  SUBSTR ( SYS_CONNECT_BY_PATH ( '('  || p || ',' || c || ')'
                                 , ' -> '
                , 5
                )          AS path
    ,     CONNECT_BY_ISCYCLE       AS iscycle
    FROM     t
    CONNECT BY NOCYCLE     PRIOR c     = p
    ;given your sample data, produces this output:
    PATH                                   ISCYCLE
    (4,5)                                        0
    (4,5) -> (5,4)                               1
    (4,5) -> (5,4) -> (4,6)                      1
    (4,6)                                        0
    (4,6) -> (6,4)                               1
    (4,6) -> (6,4) -> (4,5)                      1
    (5,4)                                        0
    (5,4) -> (4,5)                               1
    (5,4) -> (4,6)                               1
    (6,4)                                        0
    (6,4) -> (4,5)                               1
    (6,4) -> (4,6)                               1If you find it helpful to add other columns (p, c, LEVEL, or the CONNECT_BY_ROOTs) then add them. I feel it's easy enough to find all those things from the display above.
    I wonder if you're thinking the rows in t as vertices. Don't: you'll understand CONNECT BY queries much better if you think of your rows as edges. Think of the individual c values as vertices.
    943276 wrote:
    Thanks Solomon. From what you say I understand that connect_by_iscycle value = 1 is inherited at all lower levels.No. Remember what the manual says: CONNECT_BY_ISCYCLE means that a node has a child which has already appeared in the path as its ancestor. That node may have other children that either do not hove children (and therefore can't have children that are their own ancestors), or have children whose children are not their own ancestors.
    If you add these rows to your sample data:
    INSERT INTO t (p, c) VALUES ( 5, 11);
    INSERT INTO t (p, c) VALUES ( 5, 12);
    INSERT INTO t (p, c) VALUES (12, 13);then the output will have 28 rows, including these 6:
    PATH                                             ISCYCLE
    (4,6)                                                  0
    (4,6) -> (6,4)                                         1
    (4,6) -> (6,4) -> (4,5)                                1
    (4,6) -> (6,4) -> (4,5) -> (5,12)                      0
    (4,6) -> (6,4) -> (4,5) -> (5,12) -> (12,13)           0
    (4,6) -> (6,4) -> (4,5) -> (5,11)                      0Notice that the last 3 rows of this output have iscycle=0, even though they are descended from two rows that have iscycle=1.
    But I really don't get the results. Let me rewrite points (a)-(h). as I understand it, they form the following possible paths:
    4 -> 5 -> 4 [loop detected] -> 6  in result set
    4 -> 5 -> 4 [loop detected] -> 5 
    4 -> 6 -> 4 [loop detected] -> 5  in result set
    4 -> 6 -> 4 [loop detected] -> 6
    5 -> 4 -> 5 [loop detected] -> 4
    5 -> 4 -> 6 -> 4 [loop detected]  not in result set
    6 -> 4 -> 5 -> 4 [loop detected]  not in result set
    6 -> 4 -> 6 [loop detected] -> 4 Why those paths are allowed
    4          6 4-->5-->4-->6                 1          3
    4          5 4-->6-->4-->5                 1          3even in those paths the loop is detected earlier than in paths not present in result set?What query is producing those results?

  • How does idx and sub files work?

    How can I get idx and sub files to work on quicktime and apple tv? I have a mp4 movie with those subtitle files and wonder how they work.
    Message was edited by: elangsru

    Go to ine.com and sign up for a free membership. They offer free streaming of the CCNA R/S and CCNA Voice videos. You can also use Google to find many resources to read on.

  • How does VLAN and Data circuits work?

    I'm new to VOIP and wanted to know if there's any free training documents to read? Thanks

    Go to ine.com and sign up for a free membership. They offer free streaming of the CCNA R/S and CCNA Voice videos. You can also use Google to find many resources to read on.

  • Question: How does the "KEY-COMMIT" trigger work?

    Hello All,
    What is the “KEY-COMMIT” Trigger for the BLK_UPDATE data block for? When is the Trigger being activated? Where can I find the information regarding the "KEY-COMMIT" Trigger (FYI, I have looked at the ORACLE Form online document and the help in the Forms 6i Builder, but so far I found nothing)?
    Any information regarding to the "KEY-COMMIT" Trigger would be greatly appreciated!
    Thanks in advance,
    Jinlan
    --

    From my other post, I got the following information from Andreas Weiden and just want to share with you all here:
    "If you want the code inside your KEY-COMMIT-trigger executed, you will have to do a DO_KEY('COMMIT_FORM'); instead"
    This information really clarifies the def and use of the "KEY-COMMIT" trigger. Great thanks to Andreas for sharing.

  • How does the DAQmx read.vi work in producer/consumer mode

    Dear all,
    I have one question: how does the DAQmx read.vi work in producer/consumer mode ? 
    I mean if i set the acquisition samples quantity is 5000,(see the enclosed picture), how does the DAQmx read.vi acquire the samples ?
    5000 samples one time ?
    And how does the write. vi work ? Also 5000 samples one time ?
    Look forward to your reply.
    Thank you.
    Attachments:
    producer consumer mode.png ‏28 KB

    It will read 5000 samples per channel.
    The Write Measurement File just writes whatever you give it.  It you send it 5000 data points, it will write the 5000 data points.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to use JDBC Connection Pools in a standalone application?

    Hi, there,
    I have a question about how to use JDBC Connection Pools in an application. I know well about connection pool itself, but I am not quite sure how to keep the pool management object alive all the time to avoid being destroyed by garbage collection.
    for example, at the website: http://www.developer.com/java/other/article.php/626291, there is a simple connection pool implementation. there are three classes:JDBCConnection, the application's gateway to the database; JDBCConnectionImpl, the real class/object to provide connection; and JDBCPool, the management class to manage connection pool composed by JDBCConnectionImpl. JDBCPool is designed by Singleton pattern to make sure only one instance. supposing there is only one client to use connection for many times, I guess it's ok because this client first needs instantiate JDBCPool and JDBCConnectionImpl and then will hold the reference to JDBCPool all the time. but how about many clients want to use this JDBCPool? supposing client1 finishes using JDBCPool and quits, then JDBCPool will be destroyed by garbage collection since there is no reference to it, also all the connections of JDBCConnectionImpl in this pool will be destroyed too. that means the next client needs recreate pool and connections! so my question is that if there is a way to keep pool management instance alive all the time to provide connection to any client at any time. I guess maybe I can set the pool management class as daemon thread to solve this problem, but I am not quite sure. besides, there is some other problems about daemon thread, for example, how to make sure there is only one daemon instance? how to quit it gracefully? because once the whole application quits, the daemon thread also quits by force. in that case, all the connections in the pool won't get chance to close.
    I know there is another solution by JNDI if we develop servlet application. Tomcat provides an easy way to setup JNDI database pooling source that is available to JSP and Servlet. but how about a standalone application? I mean there is no JNDI service provider. it seems a good solution to combine Commons DBCP with JNID or Apache's Naming (http://jakarta.apache.org/commons/dbcp/index.html). but still, I don't know how to keep pool management instance alive all the time. once we create a JNDI enviroment or naming, if it will save in the memory automatically all the time? or we must implement it as a daemon thread?
    any hint will be great apprieciated!
    Sam

    To my knoledge the pool management instance stays alive as long as the pool is alive. What you have to figure out is how to keep a reference to it if you need to later access it.

  • How to create a connection pooling in Netbeans 6.0 using the oracle driver

    hi all,
    I am using Netbeans 6.0. Apache Tomcat 6.0.14 server, oracle 9i.
    I tried to create a connection pooling using tomcat web server.
    I have included the following code in context.xml and web.xml.
    CONTEXT.XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/network1">
    <Resource name="jdbc/myoracle"
    auth="Container"
    type="javax.sql.DataSource"
    username="scott"
    password="tiger"
    factory="BasicDataSourceFactory"
    driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:odbc:thin:@127.0.0.1:1521:mydb"
    maxActive="20"
    maxIdle="10"
    maxwait="-1"/>
    </Context>
    WEB.XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/myoracle</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    After that i have included the following JDBC driver's jar files in the $Catalina_Home/lib folder.
    classes 111.jar,
    classes 111_g.jar
    classes12.jar
    classes 12_g.jar
    classes12dms.jar
    classes12dms_g.jar
    nls_charset11.jar
    nls_charset12.jar
    ocrs12.jar
    ojdbc14.jar
    ojdbc14_g.jar
    Then i stop the tomcat web server and start it again.
    In jsp page i have included the following code:
    Context ctx=new InitialContext();
    Context envctx=(Context)ctx.lookup("java:comp:env");
    DataSource ds=(DataSource)envctx.lookup("jdbc/myoracle");
    Connection con=ds.getConnection(); ----->(In this line an error occured that Connection class cannot be found.)
    please help me how to create a connection pooling and rectify the error in conneciton.
    Thanks in advance

    Please refer
    http://www.netbeans.org/kb/60/web/customer-book.html

  • How to configure informix connection pool in sun-one appserver 7

    Hello,
    Anybody knows , How to configure informix connection pool properties in sun-one appserver 7?
    Thanks in advance.

    Actually,it couldn't get some advice in here.But now,I known how to configure it,I expended 2 days to search and test it.Follow :
    jdbc class:com.informix.jdbcx.IfxDataSource
    serverName=(INFORMIXSERVER)
    portNumber=1526(default)
    IfxIFXHOST=(host ip)
    databaseName=(your dbname)
    user=(your username)
    password=(your pwd)
    attention:configure right transaction and userthreads in your informix sever
    Hope helpful to someone!

  • I live in the country and there is no High speed available, How does Firefox for desk top work with Dial up ???

    I live in the country and there is no High speed available, How does Firefox for desk top work with Dial up ??? I have a great dell computer, Dimention 8400. Before I install firefox I want to know for no waste of time for either party..

    Unless you enabled Find My iPad on it before it was stolen then there isn't any way to locate it. If you did enable it then you could try locating it either via http://icloud.com on a computer or Find My iPhone on another device - but that will only work if it's connected to a network and the device hasn't already been wiped and/or Find My iPad disabled on it.
    If it was stolen then you should report it to the police. You should also change your iTunes account password, your email account passwords, and any passwords that you'd stored on websites/emails/notes etc.
    If it was never registered to your account then it won't appear on your support profile : https://supportprofile.apple.com/
    The only other ways to find it that I know of (apart from on the actual device) are via the packaging, the backup on a computer's iTunes : http://support.apple.com/kb/HT4061

  • [Fwd: Re: rdbms realm and connection pool]

    Hi,
    One reason why I would like to use the connection pool for the RDBMS
    realm is because there is the retry machanism built into the connection
    pool. With this retry, I don't need to re-start WebLogic if the DB
    server is somehow re-started. With the current implementation, all the
    connections maintained by the realm will become invalid if the DB server
    has been restarted independently.
    -------- Original Message --------
    Subject: Re: rdbms realm and connection pool
    Date: Wed, 27 Sep 2000 09:32:47 +0100
    From: "Terry" <[email protected]>
    Reply-To: "Terry" <[email protected]>
    Organization: BEA SYSTEMS Inc
    Newsgroups: weblogic.developer.interest.security
    References: <[email protected]>
    I believe not- the realm restricts access to connection pools to those
    who
    are allowed it, so if the realm needs the connection pool to start up,
    and
    you can't open the connection pool without the realm then you have a bit
    of
    a no-chicken and no-egg situation, which is I believe one of the reasons
    why
    there is no use of connection pools, ejbs, jndi, servlets etc. in the
    realm
    (along with other reasons, like why would it be provided with a servlet)
    The delegate pool acts somewhat similarly to a connection pool, and can
    even
    use the same database, so I'm not sure what the advantage would be
    Terry
    Nirmala devi <[email protected]> wrote in message
    news:[email protected]..
    >
    I think the rdbms realm uses different connection as it need to be setbefore
    the connection pool for Database.Is there any that i can point my rdbmsrealm to use
    the connection pool for Database instead
    Thanks in advance
    Nirmala

    I believe not- the realm restricts access to connection pools to those who
    are allowed it, so if the realm needs the connection pool to start up, and
    you can't open the connection pool without the realm then you have a bit of
    a no-chicken and no-egg situation, which is I believe one of the reasons why
    there is no use of connection pools, ejbs, jndi, servlets etc. in the realm
    (along with other reasons, like why would it be provided with a servlet)
    The delegate pool acts somewhat similarly to a connection pool, and can even
    use the same database, so I'm not sure what the advantage would be
    Terry
    Nirmala devi <[email protected]> wrote in message
    news:[email protected]..
    >
    I think the rdbms realm uses different connection as it need to be setbefore
    the connection pool for Database.Is there any that i can point my rdbmsrealm to use
    the connection pool for Database instead
    Thanks in advance
    Nirmala

  • How does mix and match works in ECC6.0?

    How does mix and match works in ECC 6.0?
    Can some shared on this topic?
    Thanks in advance

    It;s a term used in Retail for combination of sales item eg buy 3 get 1 any other  @ xx price.

  • How to implement a connection pooling in servlet

    hi all,
    how to implement a connection pooling in servlet.i want to know how to implement it in tomcat in a struts based environment.
    any input to the topic is appreciated.
    Thanks
    Sudha

    Take a look at JNDI
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

  • Difference between Datasource and Connection Pool

    Hi,
    What is the major difference between Datasource and Connection Pool.
    Both the Datasource with JNDI and Connectio Pool will serve the pool of connections. Then what is the difference.
    regards,
    Raj

    A datasource is not implicitly a connection pool. You can configure that in the datasource properties. A connection pool is also not implicitly a datasource. You can create your own connection pool using the java.sql interfaces. A datasource just gives the ability to acquire the connections and access the database through JNDI. A connection pool just gives the ability to reuse a set of connections which are created/closed/controlled by the connection pool logic.

Maybe you are looking for

  • Gr/ir clearing account difference

    i what cases gr/ir clearing account from migo can be differ from  gr/ir clearing account from miro. suppose at the time of migo gr/ ir clearing account credited with 100 rs then at the time of miro can it be  debited with 80 or 120? i f it can then p

  • How do I add an image file to a library?

    Hi, My project requires files (normally in the form of JPEGs and PDFs) to be added to a library. The file paths are passed into the plug-in via sockets. In QuarkXPress we do this by using a hidden document, which is not visible or accessible by the u

  • My iphone 4s has freeze how can i do, my iphone 4s has freeze how can i do ?

    Good morning this is Osei from kuwait my iphone 4s has jamed almost a hour how can i get it back regards osei

  • Selection screen event in tbale maintainance generator

    Hi experts,      I had created Table maintainance for Ztable..Now req is i have to some of the delete the entries of table based on input values of user.Now table maintainance displayin all the entries of database table.but before entries to be delet

  • How to create sales order using BAPI.

    Hi all, I am trying to create sales order using standard BAPI "BAPI_SALESORDER_CREATEFROMDAT2". But, even I had entered all mandatory fields, I am unable to create sales order sucessfully. I had gone through the documentaion of this BAPI and entered