BC4J ApplicationModule Pooling and persitent package variables

Scenario:
HttpRequest
starts=> - use SessionCookie API to get an Application Module
- call pck.set_id (packaged procedure which sets i++ )
- call pck.get_id (packaged function returning value of i)
finish=> release application Module (***)
What I've seen:
(***) When release statelessly
Two browser sessions (could) get the same Application Module, in which case the 'i' value is incremented 'by' both browser sessions.
(***) When release statefully
Two browser sessions get their 'own' Application Module and manipulate their own 'i' value (even) between consequitive HTTP Requests.
If both situations are explained and viewed correctly, does BC4J application module pooling guarantee that whenever I want to use an AM statefully I get persistent package variable state reproduced in that AM???
If I understand correctly this doesn't mean I get the 'same' AM instance each time, but the BC4J Application Module pooling makes sure that whichever AM I get has state reproduced?
Thx for explaining/affirming?
-J.

Scenario:
HttpRequest
starts=> - use SessionCookie API to get an Application Module
- call pck.set_id (packaged procedure which sets i++ )
- call pck.get_id (packaged function returning value of i)
finish=> release application Module (***)
What I've seen:
(***) When release statelessly
Two browser sessions (could) get the same Application Module, in which case the 'i' value is incremented 'by' both
browser sessions.
(***) When release statefully
Two browser sessions get their 'own' Application Module and manipulate their own 'i' value (even) between
consequitive HTTP Requests.
If both situations are explained and viewed correctly, does BC4J application module pooling guarantee that whenever
I want to use an AM statefully I get persistent package variable state reproduced in that AM???In scenario2 above the reason that two different ApplicationModule instances are returned for each
respective session is that the pool has not yet hit its recycle threshold. Once this threshold is hit then the pool will
begin "recycling" the state managed instances and you will observe the same behaviour as in scenario 1.
If I understand correctly this doesn't mean I get the 'same' AM instance each time, but the BC4J Application Module
pooling makes sure that whichever AM I get has state reproduced?This is true for the state that BC4J is aware of (i.e. iterator state, pending transactional changes, etc).
However, BC4J cannot reproduce user state, like the PL/SQL session state that you have defined above. In order
to maintain "user" state it is necessary to:
1. passivate/activate the user state when BC4J passivates/activates its own state. BC4J currently provides a hook for
this via ApplicationModuleImpl.passivateState(Document, Element) and ApplicationModuleImpl.activateState(Element).
2. reset user state when BC4J recycles an ApplicationModule. 9.0.2 does not define a great mechanism for
resetting user state. However, the upcoming maintenance release will provide an ApplicationModuleImpl.reset
hook to clean up session state properly when an ApplicationModule is recycled.
Hope this helps.

Similar Messages

  • Help needed for loss of package variables!

    Seem to have an annoying problem which may just be a misundertanding about libraries.
    I have two forms. Initially form 1 created initialised two package variables (of type ora_java.jobject) using the ora_java.new_global_ref function and these persisted across multiple user interactions and existed when form 2 was called (as new form / sharing libraries. Form 2 could call form 1 and the package variables still had values OK.
    These package variables were placed in library which only contained this package and was attached to both forms.
    I needed more functionality on form 2 so I created a menu module which had to run some code from form 2. I put most of the code (actually imported as it's mostly java classes) into the same library as the package containing the variables and attached the expanded pll to both forms and the menu module. Now when I run form 1 values for the package variables exist for the life of form 1 and form 2, but when I try to reference them after the initial display of form 2 they have disappeared!
    Also if form 1 is called again then it behaves differently in that references to the variable are lost after the form is first displayed.
    All forms and menus have shared libraries.
    I have spent some time playing with different variables and it's the same regardless of the variable type.
    Must be something to do with the library I think but don't know what - please help before I tear all my hair out!

    Ian,
    Ensure you have set the SHARE_LIBRARY_DATA parameter in your CALL_FORM statement.
    Also deleting the .fmx files, disconnecting from the database and re-building the form usually helps when everything else fails and you have not made any other changes you can think of that may have caused it to break.
    Also check that the forms are pointing to the right version of your .pll. Removing the attached library, adding it back and recompiling should do the trick.
    Hope this helps, before you lose your hair!

  • Forms 10 and PL/SQL: Using a server package variable

    Hi,
    I have a variable created at package level in the server,
    When I try to assign its value to a Forms item, I get an error.
    "Unable to access distant package variable".
    What should I do to access this variable?
    Many thanks

    Hello,
    Add to the package a procedure to set this variable, and also a function that returns the variable content.
    Francois

  • Package variable g_security_group_id must be set and Collections

    we have an app that works fine under an individual user schema/workspace. I exported/imported the app into a new workspace/schema and all is well except for the page that is using a collection. when I call this page, it is throwing a 404 error. when I look in the apache error log I see:
    mod_plsql: ORA-20001 Execute ORA-20001: Package variable g_security_group_id must be set.\nORA-06512: at "APEX_030200.F", line 279\nORA-06512: at line 33
    Is there some security setting that needs to be set for the schema/workspace where the app was imported into? This appears to be only a collection issue as the new pages in the imported app work fine except for this one. Any ideas about fixing this g_security_group_id or is there a workaround?
    Thanks.

    Another follow up from me. Mine started with a HTTP 404, so in SQL*Plus:
    exec dbms_epg.set_dad_attribute('APEX','error-style','DebugStyle');I refreshed the page and "ORA-20001: Package variable g_security_group_id must be set" appeared with all the debug info.
    It turned out to be a varchar definition in a package function that was too small for the text I was assigning to it.
    Fixed that, then
    exec dbms_epg.delete_dad_attribute('APEX','error-style');to turn debug off.

  • Packaged variables and triggers

    I am creating a trigger taht will update the values of packaged variables.
    I need some help getting the variables to work correctly...here's the code and issues:
    -------------PACKAGE SPECIFICATION------
    CREATE OR REPLACE PACKAGE discount_pkg
    IS
    pv_disc_num  NUMBER;
    pv_disc_txt  VARCHAR2(50);
    END;
    ------------DECLARE VARIABLES-----------
    BEGIN
    discount_pkg.pv_disc_num:=5;
    discount_pkg.pv_disc_txt:='N';
    end;
    --------------TRIGGER 9:5----------------
    CREATE OR REPLACE TRIGGER bb_discount_trg
    AFTER UPDATE OF orderplaced ON bb_basket
    FOR EACH ROW
    BEGIN
    IF :NEW.orderplaced=1 THEN
    IF discount_pkg.pv_disc_num=5 THEN
      discount_pkg.pv_disc_txt:='y';
    END IF;
    END IF;
    END;
    /And the resulting test reveals the following errors:
    SQL> update bb_basket
      2  set orderplaced=1
      3  where idbasket=13;
    1 row updated.
    SQL> print pv_disc_num;
    SP2-0552: Bind variable "PV_DISC_NUM" not declared.
    SQL> print discount_pkg.pv_disc_num;
    SP2-0552: Bind variable "DISCOUNT_PKG" not declared.Any idea why this is happening?

    SQL> print pv_disc_num;
    Print statement can only be used to display the value of environment variable. In your case, you are trying to display the value of a variable in a package. To display a value of a variable in a package, you need to retrieve it using pl/sql block. Try this:
    begin
    dbms_output.put_line(discount_pkg.pv_disc_num);
    end;
    if you want to use the PRINT syntax, you need to declare an environment variable to store the value:
    SQL>variable pv_disc_num NUMBER
    SQL>begin
    :pv_disc_num := discount_pkg.pv_disc_num;
    end;
    SQL> print pv_disc_num

  • ApplicationModule Pool for BC4J

    Hi all.
    I'm traying to implement an appmod pool for a BC4J based on frames application in order to obtain a better performance, because of the consum of memory of the application modules. I've contacted with support and metalink but they cannot give me an answer.
    Memory waste for every application module becomes 3-4 Mbytes, and it doesn't seem to be acceptable. Even before connect to database, it waste 20 Mbytes of memory.
    The problem is that I don't know where and when I must implement the pool. I know that there is one Pool Manager for every Java VM, and the behaviour of the related classes, but not when and where they must be used.
    Could anybody help me?

    Hi Anders,
    I was wondering if you'd managed to find a resolution to this issue? We're worried about exactly the same thing occurring when we deploy a BC4J application we're working on to OC4J. The BC4J docs claim that the BC4J connection pooling can be disabled, but I don't know if the deployed application is automatically smart enough to rely on OC4J's pool.
    Please let us know of any progress you made (or lack thereof :-/). Thanks!

  • Connection pooling and auditing on an oracle database

    Integration of a weblogic application with an oracle backend,
    Connection pooling, and auditing ,2 conflicting requirements ?
    Problem statement :
    We are in the process of maintaining a legacy client server application where
    the client is
    written in PowerBuilder and the backend is using an Oracle database.
    Almost all business logic is implemented in stored procedures on the database.
    When working in client/server mode ,1 PowerBuilder User has a one-to-one relation
    with
    a connection(session) on the oracle database.
    It is a requirement that the database administrator must see the real user connected
    to the database
    and NOT some kind of superuser, therefore in the PowerBuilder app each user connects
    to the database
    with his own username.(Each user is configured on the database via a seperate
    powerbuilder security app).
    For the PowerBuilder app all is fine and this app can maintain conversional state(setting
    and
    reading of global variables in oracle packages).
    The management is pushing for web-based application where we will be using bea
    weblogic appserver(J2EE based).
    We have build an business app which is web-based and accessing the same oracle
    backend app as
    the PowerBuilder app is doing.
    The first version of this web-based app is using a custom build connector(based
    on JCA standard and
    derived from a template provided by the weblogic integration installation).
    This custom build connector is essentially a combination of a custom realm in
    weblogic terms
    and a degraded connection pool , where each web session(browser) has a one-to-one
    relation
    with the back end database.
    The reason that this custom connector is combining the security functionality
    and the pooling
    functionality , is because each user must be authenticated against the oracle
    database(security requirement)
    and NOT against a LDAP server, and we are using a statefull backend(oracle packages)
    which would make it
    difficult to reuse connections.
    A problem that surfaced while doing heavy loadtesting with the custom connector,
    is that sometimes connections are closed and new ones made in the midst of a transaction.
    If you imagine a scenario where a session bean creates a business entity ,and
    the session bean
    calls 1 entity bean for the header and 1 entity bean for the detail, then the
    header and detail
    must be created in the same transaction AND with the same connection(there is
    a parent-child relationship
    between header and detail enforced on the back end database via Primary and Foreing
    Keys).
    We have not yet found why weblogic is closing the connection!
    A second problem that we are experincing with the custom connector, is the use
    of CMP(container managed persistence)
    within entity beans.
    The J2EE developers state that the use of CMP decreases the develoment time and
    thus also maintenance costs.
    We have not yet found a way to integrate a custom connector with the CMP persistence
    scheme !
    In order to solve our loadtesting and CMP persistence problems i was asked to
    come up with a solution
    which should not use a custom connector,but use standard connection pools from
    weblogic.
    To resolve the authentication problem on weblogic i could make a custom realm
    which connects to the
    backend database with the username and password, and if the connection is ok ,
    i could consider this
    user as authenticated in weblogic.
    That still leaves me with the problem of auditing and pooling.
    If i were to use a standard connection pool,then all transaction made in the oracle
    database
    would be done by a pool user or super user, a solution which will be rejected
    by our local security officer,
    because you can not see which real user made a transaction in the database.
    I could still use the connection pool and in the application , advise the application
    developers
    to set an oracle package variable with the real user, then on arrival of the request
    in the database,
    the logic could use this package variable to set the transaction user.
    There are still problems with this approach :
    - The administrator of the database can still not see who is connected , he will
    only see the superuser connection.
    - This scheme can not be used when you want to use CMP persistence , since it
    is weblogic who will generate the code
    to access the database.
    I thought i had a solution when oracle provided us with a connection pool known
    as OracleOCIConnectionPool
    where there is a connection made by a superuser, but where sessions are multiplexed
    over this physical pipe with the real user.
    I can not seem to properly integrate this OCI connectionpool into weblogic.
    When using this pool , and we are coming into a bean (session or entity bean)
    weblogic is wrapping
    this pool with it's own internal Datasource and giving me back a connection of
    the superuser, but not one for the real user,
    thus setting me with my back to the wall again.
    I would appreciate if anyone had experienced the same problem to share a possible
    solution with us
    in order to satisfy all requirements(security,auditing,CMP).
    Many Thanks
    Blyau Gino
    [email protected]

    Hi Blyau,
    As Joe has already provided some technical advice,
    I'll try to say something on engineering process level.
    While migrating an application from one technology to
    other, like client-server to n-tier in you case, customers and
    stakeholders want to push into the new system as many old
    requirements as possible. This approach is AKA "we must
    have ALL of the features of the old system". Mostly it happens
    because they don't know what they want. Ad little understanding
    of abilities of the new technology, and you will get a requirement
    like the one you have in you hands.
    I think "DBA must see real user" is one of those. For this
    type of requirements it can make sense to try to drop it,
    or to understand its nature and suggest alternatives. In this
    particular case it can be a system that logs user names,
    login and logout times.
    Blind copying of old features into an incompatible new architecture
    may endanger the whole project and can result in its failure.
    Hope this helps.
    Regards,
    Slava Imeshev
    "Blyau Gino" <[email protected]> wrote in message
    news:[email protected]...
    >
    Integration of a weblogic application with an oracle backend,
    Connection pooling, and auditing ,2 conflicting requirements ?
    Problem statement :
    We are in the process of maintaining a legacy client server applicationwhere
    the client is
    written in PowerBuilder and the backend is using an Oracle database.
    Almost all business logic is implemented in stored procedures on thedatabase.
    When working in client/server mode ,1 PowerBuilder User has a one-to-onerelation
    with
    a connection(session) on the oracle database.
    It is a requirement that the database administrator must see the real userconnected
    to the database
    and NOT some kind of superuser, therefore in the PowerBuilder app eachuser connects
    to the database
    with his own username.(Each user is configured on the database via aseperate
    powerbuilder security app).
    For the PowerBuilder app all is fine and this app can maintainconversional state(setting
    and
    reading of global variables in oracle packages).
    The management is pushing for web-based application where we will be usingbea
    weblogic appserver(J2EE based).
    We have build an business app which is web-based and accessing the sameoracle
    backend app as
    the PowerBuilder app is doing.
    The first version of this web-based app is using a custom buildconnector(based
    on JCA standard and
    derived from a template provided by the weblogic integrationinstallation).
    This custom build connector is essentially a combination of a custom realmin
    weblogic terms
    and a degraded connection pool , where each web session(browser) has aone-to-one
    relation
    with the back end database.
    The reason that this custom connector is combining the securityfunctionality
    and the pooling
    functionality , is because each user must be authenticated against theoracle
    database(security requirement)
    and NOT against a LDAP server, and we are using a statefull backend(oraclepackages)
    which would make it
    difficult to reuse connections.
    A problem that surfaced while doing heavy loadtesting with the customconnector,
    >
    is that sometimes connections are closed and new ones made in the midst ofa transaction.
    If you imagine a scenario where a session bean creates a business entity,and
    the session bean
    calls 1 entity bean for the header and 1 entity bean for the detail, thenthe
    header and detail
    must be created in the same transaction AND with the same connection(thereis
    a parent-child relationship
    between header and detail enforced on the back end database via Primaryand Foreing
    Keys).
    We have not yet found why weblogic is closing the connection!
    A second problem that we are experincing with the custom connector, is theuse
    of CMP(container managed persistence)
    within entity beans.
    The J2EE developers state that the use of CMP decreases the develomenttime and
    thus also maintenance costs.
    We have not yet found a way to integrate a custom connector with the CMPpersistence
    scheme !
    In order to solve our loadtesting and CMP persistence problems i was askedto
    come up with a solution
    which should not use a custom connector,but use standard connection poolsfrom
    weblogic.
    To resolve the authentication problem on weblogic i could make a customrealm
    which connects to the
    backend database with the username and password, and if the connection isok ,
    i could consider this
    user as authenticated in weblogic.
    That still leaves me with the problem of auditing and pooling.
    If i were to use a standard connection pool,then all transaction made inthe oracle
    database
    would be done by a pool user or super user, a solution which will berejected
    by our local security officer,
    because you can not see which real user made a transaction in thedatabase.
    I could still use the connection pool and in the application , advise theapplication
    developers
    to set an oracle package variable with the real user, then on arrival ofthe request
    in the database,
    the logic could use this package variable to set the transaction user.
    There are still problems with this approach :
    - The administrator of the database can still not see who is connected ,he will
    only see the superuser connection.
    - This scheme can not be used when you want to use CMP persistence , sinceit
    is weblogic who will generate the code
    to access the database.
    I thought i had a solution when oracle provided us with a connection poolknown
    as OracleOCIConnectionPool
    where there is a connection made by a superuser, but where sessions aremultiplexed
    over this physical pipe with the real user.
    I can not seem to properly integrate this OCI connectionpool intoweblogic.
    When using this pool , and we are coming into a bean (session or entitybean)
    weblogic is wrapping
    this pool with it's own internal Datasource and giving me back aconnection of
    the superuser, but not one for the real user,
    thus setting me with my back to the wall again.
    I would appreciate if anyone had experienced the same problem to share apossible
    solution with us
    in order to satisfy all requirements(security,auditing,CMP).
    Many Thanks
    Blyau Gino
    [email protected]

  • Which BC4J / JDBC pooling configurations are global for a JVM?

    There are several documents and postings saying that some of the BC4J / JDBC Pooling properties are unique for the JVM.
    So if i have 3 WAR files with 3 different settings in bc4j.xcfg (transaction factory, pooling settings) some of the settings are ignored after the first AM Pool is instanciated. This could be the reason for some "unreproducable" problems we have.
    So please provide us a list, which properties additional to the ones below are global per JVM and which are really used from the bc4j.xcfg.
    1. Getting the Connection object out of ApplicationModule says about the TransactionFactory
    Please not that this property is a static BC4J property. Meaning that the value of this property when the first ApplicationModule is created is the value which will be used. If you have multiple ApplicationPool(s) then it is necessary to define the property in all configurations, dynamically, or as a system property.
    2. http://www.oracle.com/technology/products/jdev/tips/muench/ampooling/index.html says about jbo.ampool.monitorsleepinterval
    Since there is only a single application monitor pool monitor per Java VM, the value that will effectively be used for the AM pool monitor polling interval will be the value found in the AM configuration read by the first AM pool that gets created. To make sure this value is set in a predictable way, it is best practice for all application modules to use the same Pool Polling Interval value.
    and
    3. Since the tuning parameters for all ADF database connection pools - regardless of <JDBCURL,Username> value - will be set based on the parameters found in the configuration for the first AM pool that is created. To insure the most predictable behavior, it is best practice to leave the values of the parameters in the Connnection Pooling section of the Pooling and Scalability tab at their default values - so that no entry for them is written into the bc4j.xcfg file - and to instead set the desired values for the database connection pooling tuning parameters as Java System Parameters in your J2EE container.
    Sounds like this means the parameters: jbo.initpoolsize, jbo.maxpoolsize, jbo.poolmonitorsleepinterval, jbo.poolmaxavailablesize, jbo.poolminavailablesize, jbo.poolmaxinactiveage ?
    4. And http://oracle-web.petersons.com/bc4jdoc/bc_aappmodpooling.htm tells There is one connection pool manager for each business logic tier's Java VM. Connections remain in the pool until the Java VM stops running.
    Thanks, Markus

    Just another funny observation regarding BC4J parameter settings in 9.0.5.2:
    Setting jbo.ampool.sessioncookiefactoryclass in the jboserver.properties is ignored. Setting in bc4j.xcfg works.
    rgds, Markus

  • Problems with JSP-ApplicationModule pooling in runtime

    Hello!
    I have an urgent Problem with the ApplicationModule Pooling in Runtime. The Application uses JSP with BC4J and is deployed on Tomcat 3.1 and MS IIS 4.0 (The Client want to use this MS-Product). We use JDev 3.1.1.2 for development.
    Now my Problem:
    A user start the IE4 and log on to the application and it works fine. They log off and log in again a second time and then the user gets a NullPointerException at the point when the Application wants to checkout a new instance from the ApplicationModule Pool. The next time he logs on it works fine again and the next time not and so on. Every second time the user logs on he gets a NullPointerException.
    But there are three AdminUsers and with these users are no Problems.
    Can anyone help me or has someone the same problems?
    Greetings
    Thorsten

    There are a number of pooling problems fixed in JDeveloper 3.2. You can also step into the pooling code by using remote debugging to figure out why you are encountering this problem.

  • BC4J Connection Pooling issue

    On a jsp page I am doing the following:
    ApplicationModule returnAppMod = Configuration.createRootApplicationModule(appModName, configName);
    <use some ViewObjects>
    Configuration.releaseRootApplicationModule(p_am,false);
    It seems that everytime i call createRootApplicationModule(String, String);
    A new connection is created in the DB. I set the max pool size in the configuration file to 10. When i hit my page the 11th time i get the follow error.
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.pool.ResourcePoolException, msg=JBO-28102: A request was timed out while waiting for a resource to be returned to the resource pool, InvoiceModuleLocal.
         void oracle.jbo.JboException.<init>(java.lang.Throwable)
              JboException.java:344
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModuleFromConfig(java.lang.String, oracle.jbo.common.ampool.EnvInfoProvider)
              Configuration.java:1144
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String, oracle.jbo.common.ampool.EnvInfoProvider)
              Configuration.java:1094
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String)
              Configuration.java:1073
         oracle.jbo.ApplicationModule fsweb.util.AppCon.createAppMod(java.lang.String, java.lang.String)
              AppCon.java:23
         void fsweb.ei.model.EIStandardStatementModel.initModel()
              EIStandardStatementModel.java:582
         void fsweb.ei.model.EIStandardStatementModel.setStandardAcctNum(java.lang.String)
              EIStandardStatementModel.java:171
         void _resources._reports._openbalances._EIStandardStatement._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              EIStandardStatement.jsp:66
         void com.orionserver.http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              OrionHttpJspPage.java:56
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
              JspPageTable.java:317
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:465
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:379
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind.server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    ## Detail 0 ##
    oracle.jbo.pool.ResourcePoolException: JBO-28102: A request was timed out while waiting for a resource to be returned to the resource pool, InvoiceModuleLocal.
         java.lang.Object oracle.jbo.pool.ResourcePool.allocateResource()
              ResourcePool.java:709
         int oracle.jbo.common.ampool.ApplicationPoolImpl.findAvailableInstance(oracle.jbo.common.ampool.SessionCookie, oracle.jbo.common.ampool.ApplicationPoolImpl$SessionCookieInfo)
              ApplicationPoolImpl.java:669
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(oracle.jbo.common.ampool.SessionCookie)
              ApplicationPoolImpl.java:1335
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(oracle.jbo.common.ampool.SessionCookie, boolean)
              ApplicationPoolImpl.java:2062
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(boolean, long)
              SessionCookieImpl.java:398
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(boolean)
              SessionCookieImpl.java:369
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule()
              SessionCookieImpl.java:364
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModuleFromConfig(java.lang.String, oracle.jbo.common.ampool.EnvInfoProvider)
              Configuration.java:1135
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String, oracle.jbo.common.ampool.EnvInfoProvider)
              Configuration.java:1094
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String)
              Configuration.java:1073
         oracle.jbo.ApplicationModule fsweb.util.AppCon.createAppMod(java.lang.String, java.lang.String)
              AppCon.java:23
         void fsweb.ei.model.EIStandardStatementModel.initModel()
              EIStandardStatementModel.java:582
         void fsweb.ei.model.EIStandardStatementModel.setStandardAcctNum(java.lang.String)
              EIStandardStatementModel.java:171
         void _resources._reports._openbalances._EIStandardStatement._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              EIStandardStatement.jsp:66
         void com.orionserver.http.OrionHttpJspPage.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              OrionHttpJspPage.java:56
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
              JspPageTable.java:317
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:465
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JspServlet.java:379
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind.server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484It is as if the connections are not getting released backed to the pool and once the max is reached createAppMod times out waiting for a connection.

    Hi,
    Actually your request is timing out waiting on an ApplicationModule to be created in the ApplicationPool. Please verify
    that you are properly releasing the correct ApplicationModule -- the code snippet that you posted above:
    ApplicationModule returnAppMod = Configuration.createRootApplicationModule(appModName, configName);
    <use some ViewObjects>
    Configuration.releaseRootApplicationModule(p_am,false);
    indicates that you have assigned a reference to returnAppMod but then release the ApplicationModule referenced by
    p_am. Is this correct? You could also use the BC4J diagnostic output and/or the pool statistics (see the Pooling sample)
    to determine if ApplicationModule(s) are being release properly.
    Hope this helps.
    JR

  • Module Pool and Smart Form

    Can anybody Provide me good step by step procedure for module pool and smart for programming with screenshot.
    my email Id is [email protected]

    Hi,
    A module pool is a collection of screens, flow logic, menu bars and ABAP code that you use to build an application. Typically the transaction code that calls the application will refer to the module pool and the initial screen number.
    -->What are the requirements a dialog program must fulfill ?
    • A dialog program must fulfill the following requirements
    . a user friendly user interface
    . format and consistency checks for the data entered by the user
    . easy correction of input errors
    . access to data by storing it in the database.
    What are the basic components of dialog program ?
    • Screens (Dynpros)
    Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of a screen and its flow logic and controls exactly one dialog step.
    • ABAP/4 module pool
    Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules.
    What is a dynpro ? What are its components ?
    • A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly
    one dialog step.
    - The different components of the dynpro are:
    Flow logic: Calls of the ABAP/4 modules for a screen
    Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen
    Screen attributes: Number of the screen, number of the subsequent screen, and others
    Field attributes: Definition of the attributes of the individual fields on a screen
    What is screen flow logic? What are the selections in it? Explain PAI and PBO?
    Ans - Screen flow logic contains the procedural part of a screen. The screen flow logic is like an ABAP program in that it serves as a container for processing blocks. There are four event blocks, each of which is introduced with the screen keyword PROCESS:
    PROCESS BEFORE OUTPUT.
    PROCESS AFTER INPUT.
    PROCESS ON HELP-REQUEST.
    PROCESS ON VALUE-REQUEST.
    Selections are performed in PAI.
    PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.
    PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI.
    processing, the system either calls the next screen or carries on processing at the point from which the screen was called.
    PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered when the user requests field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.
    step by step process of dialog programing:
    Firstly, you can go to Tcode SE80 and here create a package.
    On that package name right click and select program.
    Then choose program type modulepool program.
    Similarly, you can create screen and then select layout and drag and drop labels and pushbuttons as per your requirements.. Then double click on th push buttons.You will see property window and there we will find FCTCODE and there type the names e.g suppose you want to
    display then typy on the fctcode Display or any name as you wish.
    After that save and activate it. and then close the window.
    And then go back to the intial screen .
    And then click Flow logic button and then uncomment the statement
    module status_1000 PBO block and then doible click on status_1000
    save and activate and then go back and then PAI block uncomment the statement module status_1000 and the dobule click on status_1000.
    step by step process of creating smartforms:
    1.        What is Smartforms?
    Smartforms is a tool to create and maintain forms for mass printing in SAP Systems. Just like sapscripts, for Smart
    forms print program is used to create the output internal table which in turn is thrown to the smart form where the
    field values are displayed. The output medium for Smartforms support printer, fax, e-mail, or the Internet.
    Transaction Code: SMARTFORMS
    To print a form the program for the data retrieval and a Smartform that contains the entire form logic is required. As
    these two are separate one should adapt the Smartform if changes to the form logic are necessary. The application
    program passes the data via a function module interface to the Smartform. When activating the Smartform the system
    automatically generates the function module.
    The architecture of the smart form is given below:
    Creating Forms Using SAP Smart Forms
    When creating a form one must:
    1.      Retrieve the application data
    2.      Describe the form
    3.      Pass the application data to the form
    Example: Create Smartform for printing Purchase order.
    Retrieving the application data (Purchase Order information):
    Write an ABAP program (Print Program) to retrieve data or include a retrieval routine into the application. This
    code consists of statements that select data from databases according to certain selection criteria. Store the
    retrieved data in internal tables, structures or variables and transfer it to the form in one step.
    SAP has already provided with the Print Program (/SMB40/FM06P) for Purchase Order. Based on the business
    requirement, this Print Program can be copied and modified to get the required data and transfer to Smartform.
    Describing the Form:
    The user defines the form using a Smartform. Use the tools of the form builder as listed below:
    1.        Use the form painter to position the windows, graphics and addresses on a page.
    2.        Use the PC editor to write the texts.
    3.        Use the table painter to format the tables.
    The flow control is used to print the pages and elements.
    Form Logic (Introduction)
    In the form builder one can describe a Smartform by a set of nodes. To do this, one can build up a tree structure on
    the left side of the user interface.
    The node global settings and its three successors form attributes, form interface and global definitions always exists
    for any newly created forms.
    To describe the form logic, create the hierarchy under the node pages and windows.
    The following rules apply to control the flow of the form output.
    1.        The nodes in the tree structure are processed from top to bottom.
    2.        For each node there is a tab, this can be used to link the node to a condition. If the condition is true, the
    system processes the node. If not, it skips the node and all its successors.
    3.        One should define a next page for each page.
    The SAP form builder of the smart form consists of:
    1.        Form painter for creating the layout of the form
    2.        PC Editor for entering texts and fields into output areas
    3.        Navigation tree for maintaining the form logic
    4.        Table painter for creating templates and tables
    To define the text formats, one can use the Smart Styles.
    Style builder:
    On the left of the style builder screen consists of the predetermined nodes (header data, folder for paragraph
    formats, and folder for character formats).
    On the right one can see the maintenance screen with its tab pages. At the bottom the preview of the selected font
    can be viewed.
    Create Purchase Order Smartform
    Create a Smartform, copy the existing SAP provided purchase order Smartform to ZSFM_PURCHASEORDER for
    customizing as per business requirement.
    1. Form Settings under Global Settings node, set the parameters in Output Option:
    Page Format: Letter
    Character per Inch: 20
    Line per Inch: 6
    Style: ZSTM_SMB40_SF
    Output Format: Standard Output
    2.        Form Interface
    We can add parameters in the Import Parameters and tables in Tables tab of the form interface for the application
    data to be available for the Smartform to print.
    3. In Global definition we can define the all the global variables which can be used in Smartforms. Initialization
    can be used for initializing the variables and even for retrieving the data.
    Creating pages:
    Each form consists of one or more pages. The first page in the tree structure is the start page and the
    processing of the form starts with this page itself.
    1.        Open the context menu for existing page node and choose create®page
    2.        Enter a unique name (FIRST) for the node and a description (Page)
    3.        Determine the format (1, 2, 3...)and the mode of the page counter (Increase counter) on the general
    attributes tab
    4.        Determine the print attributes (Portrait Format) of the page on the output options
    5.        Determine a background graphic for the entire page on the background tab (Not used in PO).
    Creating windows:
    The size and position of the window can be graphically set in the form painter. There are main windows and
    secondary windows. The difference between these two is that the output in a main window can cover several
    pages.
    1.        Open the context menu for an existing page node and choose®window
    2.        Enter a name for the node (NAMEFORM) and a description (Title Window).
    3.        On the general attributes indicate type of window. NAMEFORM is secondary window.
    In similar fashion all the other windows are created and positioned as per the form design. Only one MAIN
    window is created, it is used for line items which can cover several pages.
    Positioning texts on the form
    The texts are displayed in the form using text nodes. The only exceptions are addresses.
    The predecessor node of the text node determines its use:
    Predecessor node        Used to
    Secondary window        Position text on one or more pages
    Main window        Display text in relation to other nodes in the main window, it may cover several pages
    Template         Displays texts for table cells of a static table
    Table        Display table contents
    There are three text types:
    1.        Text element : to enter new text in the PC editor
    2.        Text module : to include a text module
    3.        Include text : to include an existing SAPscript text
    Entering texts in PC editor: (TITLE)
    ·        To create a text node call the context menu for that node in the tree structure that should receive the
    text, then choose->text
    ·        Enter a unique name (TITLE) for the node and the node description (TITLE)
    ·        On the general attributes tab choose text element as text type
    ·        In the text node box choose whether the text should be started with a new paragraph or only in a new
    line
    ·        Enter the text in the PC editor. Text could be a program element like &Title& or ‘Purchase Order’. &Title&
    is a variable for which the value is assigned in Program line before the text.
    Including text modules: (TERMSCONDITION)
    Text module of the text node is used to refer to an existing text module in the system. The text modules can be
    used in two ways:
    ·        To create a text node, call the context menu for that node in the tree structure that shall contain the text
    and choose create->text under the window TERMSCONDITION.
    ·        Enter a unique name for the node (TERMSCONDITION) and a description (Terms and Condition)
    ·        On the general attributes tab select the text type text module
    ·        Enter the name of the text module in the text name field (&G_TERMS_TEXT&). &G_TERMS_TEXT& is
    used to determine the Text name dynamically in the program lines preceding the text module node.
    ·        Program Lines: GETTERMSCONDITION
    Concatenate 'ZTMM_PO_TERMS_' ZXEKKO-BUKRS
                                      INTO G_TERMS_TEXT.
    Including SAPscript texts: (HD_TXT_F01 – Order Header Text)
    The text type include text node to refer to a SAPscript text, which already exists in the system. To identify the
    text the text name, object, id and the language is needed.
    ·        To create the text node, call the context menu for that node in the tree structure that shall receive the
    text and choose create -> text under the main window.
    ·        Enter a unique name (HD_TXT_F01) for the node and the node description (Order Header Text).
    ·        On the general attributes tab choose include text as text type
    ·        Text Name - &ZEKKO-EBELN&, Text Object – EKKO, Text ID – F01, Language - &SY-LANGU&. Also check
    mark – No error if no text exists.
    Tip: Since the size of text is not known, its better to have the text in MAIN window, so that it can run to more
    than one page if required.
    Inserting addresses: (SENDER): 
    Address node is used to insert an address into the form. This guarantees that the address is formatted
    according to the postal rules of the sender country.
    ·        To create an address node , call the context menu for that node in the tree structure that one wants to
    contain the text and choose create->Address
    ·        Enter a name for the node (COMPANY_CODE_ADDRESS)  and a description (Company Code Address)
    ·        Determine the address type (Organization Address) on the general attributes tab
    ·        For organizational addresses - specify the address number, for any other - specify the person number
    and the address number. In this case we get the company code address into variable &ADDNR&, so we need
    program lines (SENDER) preceding the address text.
    ·        In the box additional addresses, attributes to specify how to display the address are maintained.
    Printing graphics: (LOGO):
    Tcode SE78 is used to import graphics into the SAP system. The transaction imports the graphics and stores it
    in the BDS (business transaction server) and then it can be displayed in the form.
    ·        To create the graphic node , call the context menu for that node in the tree structure and choose create-
    >graphic
    ·        Enter a name (LOGO) for the node and the description (Logo Graphic)
    ·        On the general attributes determine whether a colored or a black and white
    ·        On General Attributes use the fields object - GRPAHIC, id – BMAP and name - &G_LOGO& to identify the
    graphic. &G_LOGO& is variable and therefore we can print company code specific logo. Program line preceding
    the graphic is required.
    ·        Program line COMP_LOGO is used to assign the value to G_LOGO. Concatenate 'ZCOMPANY_LOGO_'
    ZXEKKO-BUKRS INTO G_LOGO. So, the name of graphic for example will be ZCOMPANY_LOGO_0202 for
    company code 0202.
    Displaying a static table (Window – INFO, Template - TEM_INFO) 
    Use node type template to display a table whose layout and size is determined before the runtime of the print
    program.
    To create a template, define a table layout to determine the cell structure for each line. The cells are used to
    display the cell structure for each line. The cells are used to display the contents of the successor nodes of the
    template node. 
    ·        Create Template under the INFO window node. Create > Template.
    The template layout is used to determine the following,
    1.        The number of lines and cells
    2.        The height of each cell
    3.        The width of each cell
    4.        The alignment of the table in the window
    5.        Whether and where to display separator lines or frames
    Use the table control on the template tab to define the layout of the lines. Each line of the template must have
    a definition.
    Use the pattern box to select the desired table pattern.
    Displaying contents in cells: (TLE_CONTACT)
    The template node defines the table layout. The successor nodes of the template         determine the data to be
    displayed in the table cells.
    In General Attributes choose Text type – Text Element. In editor, type ‘DTE         Contact’.
    In Output Options, define the output structure LINE – 5 and Column – 1.
    Similarly all other information for each cell can be filed using the text module and         address module.
    Displaying Dynamic Table (ITEM_TABLE)
    ·        Create TABLE under the MAIN window node. In DATA Tab, loop through the data internal table.
    L_XEKPO is the item table which has all the line item details.
    Define the line types based on the positioning of the text in main window. For         example: TABLE_HEADER1
    is used for positioning Header texts in the table.
    ·        Table is divided into three parts: Header, Main Area and Footer.
    ·        Header is used for printing the Header Title of the table and it at the start of the table on every page.
    ·         Main Area is used to print the line item details of the PO. Create a line (ITEM_DETAIL) of the line type
    TABLE_HEADER1. It will dynamically generate number cells based on the line type defined in the table layout.
    Name all the cells as per the usage. For each cell create the text node to display the information. For example:
    Cell VAL_MATERIAL, Text node MATNR is created which has text element - -matnr.
    ·        Footer is used for printing the information after Main Area data is printed. This can be used for Total
    printing or any other information which needs to be printed after all line items are printed. Create line
    TLE_CONTR_STP for Contractual Stipulation of the line type – LINE which has only one column. Create the
    text element to print the information.
    Special Requirement: Printing the Acknowledgement text if the order value is greater then USD 50,000.00 on
    the second copy only.
    ·        This requirement needs the modification in the print program and the Smartform.
    ·        Modification in Print Program to trigger the second copy if the order value is greater then 50K. Its
    advisable to copy the standard print program to custom Z program (Z_SMB40_FM06P), and changes should
    be made to Z program. Number of copies is passed from NAST to ls_composer_param-tdcopies in Smartforms.
    The value ls_composer_param-tdcopies is modified in the print program to 2 if the order value is greater then
    50K.
    ·        The printing of Acknowledgement Text only on second copy is achieved using the COPIES WINDOW in
    Smartforms. Define Window ACKN_COPY of the type COPIES WINDOW and Output to – Only Copies – Copies
    Differ. Also set the condition in the Condition Tab of the window – SFSY-JOBPAGES = 1, so that it only print
    on the first page of the copy.
    ·        If user selects to print 2 copies and the order value is more then 50k, program needs to print 2 sets
    meaning 4 copies. So number of copies is taken care of in Print program but again the printing of
    Acknowledgement Text should be only the Even number copy meaning Copy# 2 and 4. This achieved by using
    the program lines to determine the even copy.  SFSY-COPYCOUNT will tell us the current copy number being
    printed.
    regards,
    vineela.
    Edited by: Radha Vineela Aepuru on Mar 13, 2008 11:12 AM

  • Connection Pooling and JSP Custom Tag Library - is code (inside) the best way/correc?

    Hi, can anyone advise as to whether my tag library code (based
    on Apache Jakarta Project) will actually achieve connection
    pooling functionality across my entire JSP based application? I
    am slightly concerned that my OracleConnectionCacheImpl object
    may exist multiple times, hence rendering my conection pooling
    attempt useless.
    package com.solved.tag.dbtags.connection;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    import javax.servlet.jsp.JspTagException;
    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import oracle.jdbc.pool.OracleConnectionCacheImpl;
    * <p>JSP tag connection, used to get a
    * java.sql.Connection object.</p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>connection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.ConnectionTag&lt;/t
    agclass>
    * &lt;bodycontent>JSP&lt;/bodycontent>
    &lt;teiclass>com.solved.tag.dbtags.connection.ConnectionTEI&lt;/t
    eiclass>
    * &lt;info>Opens a connection based on a jndiName.&lt;/info>
    * &lt;attribute>
    * &lt;name>id&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    public class ConnectionTag extends TagSupport {
    static private OracleConnectionCacheImpl cache = null;
    public int doStartTag() throws JspTagException {
    try {
    Connection conn = null;
    if (cache == null) {
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup
    ("jdbc/pool/OracleCache");
    cache = (OracleConnectionCacheImpl)ds;
    catch (NamingException ne) {
    throw new JspTagException(ne.toString());
    conn = cache.getConnection();
    pageContext.setAttribute(getId(),conn);
    catch (SQLException e) {
    throw new JspTagException(e.toString());
    return EVAL_BODY_INCLUDE;
    package com.solved.tag.dbtags.connection;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    * <p>JSP tag closeconnection, used to close the
    * specified java.sql.Connection.<p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>closeConnection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.CloseConnectionTag&
    lt;/tagclass>
    * &lt;bodycontent>empty&lt;/bodycontent>
    * &lt;info>Close the specified connection. The "conn"
    attribute is the name of a
    * connection object in the page context.&lt;/info>
    * &lt;attribute>
    * &lt;name>conn&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    * @see ConnectionTag
    public class CloseConnectionTag extends TagSupport {
    private String _connId = null;
    * The "conn" attribute is the name of a
    * page context object containing a
    * java.sql.Connection.
    * @param connectionId
    * attribute name of the java.sql.Connection to
    close.
    * @see ConnectionTag
    public void setConn(String connectionId) {
    _connId = connectionId;
    public int doStartTag() {
    try {
    Connection conn = (Connection)pageContext.getAttribute
    (_connId);
    conn.close();
    } catch (SQLException e) {
    // failing to close a connection is not fatal
    e.printStackTrace();
    return EVAL_BODY_INCLUDE;
    public void release() {
    _connId = null;
    package com.solved.tag.dbtags.connection;
    import javax.servlet.jsp.tagext.TagData;
    import javax.servlet.jsp.tagext.TagExtraInfo;
    import javax.servlet.jsp.tagext.VariableInfo;
    * TagExtraInfo for the connection tag. This
    * TagExtraInfo specifies that the ConnectionTag
    * assigns a java.sql.Connection object to the
    * "id" attribute at the end tag.
    * @author Matt Shannon
    * @see ConnectionTag
    public class ConnectionTEI extends TagExtraInfo {
    public final VariableInfo[] getVariableInfo(TagData data)
    return new VariableInfo[]
    new VariableInfo(
    data.getAttributeString("id"),
    "java.sql.Connection",
    true,
    VariableInfo.AT_END
    data-sources.xml:
    <?xml version="1.0"?>
    <!DOCTYPE data-sources PUBLIC "Orion data-
    sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
    <data-source
    class="oracle.jdbc.pool.OracleConnectionCacheImpl"
    name="jdbc/pool/OracleCache"
    location="jdbc/pool/OracleCache"
    url="jdbc:oracle:thin:@oracle1:1521:pdev"
    >
    <property name="maxLimit" value="15" />
    <property name="cacheScheme" value="2" />
    <property name="user" value="console" />
    <property name="password" value="console" />
    <description>
    This DataSource is using an Oracle-native DataSource Class so as
    to allow Oracle Specific extensions.
    A getConnection() call on this DataSource will return
    oracle.jdbc.driver.OracleConnection.
    The connection returned is a logical connection.
    The caching scheme in place is Fixed Wait. Refer below to
    possible values.
    Dynamic 1
    Fixed Wait 2
    Fixed Return Null 3
    </description>
    </data-source>
    </data-sources>
    many thanks,
    Matt.

    Hi. Show me your pool definition.
    Joe
    Ramamurthy wrote:
    I am using the jsp custom tag library from BEA called sqltags.tld which came with Weblogic 5.1. Currently I am using Weblogic6.1 sp2 on Solaris.
    I have created a Connection Pool for Sybase database using the driver com.sybase.jdbc.SybDriver.
    When I created jsp page to connect to the connection pool using sqltags custom tag library, I am getting the error
    "javax.servlet.jsp.JspException: Failed to write body content
    at weblogic.taglib.sql.ConnectionTag.doAfterBody(ConnectionTag.java:43)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:1014)"
    After this message, whenever I try to access the same jsp page I am getting the message
    "javax.servlet.jsp.JspException: Failed to load JDBC driver: weblogic.jdbc.pool.D
    river
    at weblogic.taglib.sql.ConnectionTag.doStartTag(ConnectionTag.java:34)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:205)".
    Can you please help me the reason why this problem is happening and how to fix this ?
    This problem doexn't happen consistently. This occurs once in a while.
    I tried to increase Login delay Seconds parameter in the Connection Pool to 15 sec. It didn't help me much.
    Thanks for your help !!!
    Ram

  • Unit Testing and APEX Global Variables

    We've recently started to unit test our database level PL/SQL business logic.
    As such we have a need to be able to simulate or provide output from PL/SQL APEX components in order to facilitate testing of these components.
    Some of the most obvious portions that need simulation are:
    1. The existence of a session
    2. The current application ID
    3. The current page ID.
    We currently handle requirement #1 by using apex_040100.wwv_flow_session.create_new
    We handle 2 and 3 using the apex_application.g_flow_id and g_flow_step_id global variables.
    I'm just wondering, how safe is it for us to use wwv_flow_session.create_new to simulate the creation of a session at testing time for those things which need a session?
    I've also noticed that there are apex_application.get_application_id and apex_application.get_page_id functions whose output is not tied to the global variables (at least in our current version).
    Is it safe for us to expect that we can set these global variables for use in testing or is apex moving to get_application_id and get_page_id functions away from global variables?
    Will there be corresponding set_application_id and set_page_id functions in the future?
    Sorry for the question bomb. Thanks for any help.

    My first question would be why do you need to establish a session to test your PL/SQL?
    wwv_flow_session is a package internal to APEX, and you should probably leave it be.
    The get_application_id procedure you refer to is in apex_application_install, which is used for scripting installation of applications - not get/set of page ID like you're describing.
    If you're uncomfortable using apex_application.g_flow_id, you can use v('APP_ID') or preferably pass the app_id/page_id as parameters to your procedures.
    Your question seems to have a few unknowns, so that's the best I can describe.
    Scott

  • How to get values from a stored package variable of type record ?

    Sir,
    In my JClient form, I need to get values from a database stored package variable of type record. And the values are retained in the JClient form for the whole session. The values are copied only once when the form is started.
    What is the best way to do that ?
    Thanks
    Stephen

    Stephen,
    not sure what your model is, but if it is Business Components, I think I would expose the properties as a client method on the application module. This way all JClient panels and frames will have access to it. You could use a HashMap to store the data in teh app module.
    If JDBC supports the record type, then you should be able to call it via a prepared SQL statement. If not, you may consider writing a PLSQL accessor to your stored procedure that returns something that can be handled.
    Steve Muench provides the following examples on his blog page
    http://otn.oracle.com/products/jdev/tips/muench/stprocnondbblock/PassUserEnteredValuesToStoredProc.zip
    http://otn.oracle.com/products/jdev/tips/muench/multilevelstproc/MultilevelStoredProcExample.zip
    Frank

  • Error trying to run SSIS Package via SQL Server Agent: DTExec: Could not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object

    Situation:
    SSIS Package designed in SQL Server 2012 - SQL Server Data Tools
    Windows 7 - 64 bit.
    The package (32 bit) extracts data from a SQL Server db to an Excel Output file, via an OLE DB connection.
    It uses 3 package variables:
    *) SQLCommand (String) to specify the SQL Statement to be executed by the package
    Property path: \Package.Variables[User::ExcelOutputFile].Properties[Value]
    Value: f:\Output Data.xls
    *) EXCELOutputFIle (String) to specify path and filename of the Excel output file
    Property path: \Package.Variables[User::SQLCommand].Properties[Value]
    Value: select * from CartOrder
    *) VarObjectDataSet (Object) to hold the data returned by SQL Server)
    Property path: \Package.Variables[User::VarObjectDataSet].Properties[Value]
    Value: System.Object
    It consists out of 2 components:
    *) Execute SQL Task: executes the SQL Statement passed on via a package variable. The resultng rows are stored in the package variable VarObjectDataSet
    *) Script Task: creates the physical output file and iterates VarObjectDataSet to populate the Excel file.
    Outcome and issue:The package runs perfectly fine both in SQL Server Data Tools itself and in DTEXECUI.
    However, whenever I run it via SQL Server Agent (with 32 bit runtime option set), it returns the errror message below.
    This package contains 3 package variables but the error stating that a package variable can not be set, pops up for the VarObjectDataSet only.  This makes me wonder if it is uberhaupt possible to set the value of a package variable
    of type Object.
    Can anybody help me on this please ?
    Message
    Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  6:40:20 PM  DTExec: Could
    not set \Package.Variables[User::VarObjectDataSet].Properties[Value] value to System.Object.  Started:  6:40:20 PM  Finished: 6:40:21 PM  Elapsed:  0.281 seconds.  The package execution failed.  The step failed.
    Thank you very much in advance
    Jurgen

    Hi Visakh,
    thank you for your reply.
    So, judging by your reply, not all package variables used inside a package need to be set a value for when run in DTEXEC ?
    I already tried that but my package ended up in error (something to do with "... invocation ...." and that error is anything but clearly documented. Judging by the error message itself, it looks like it could be just about anything. that is why I asked my
    first question about the object type package variable.
    Now, I will remove it from the 'set values' list and try another go cracking the unclear error-message " ... invocation ...". Does an error message about " ... invocation ..." ring any bells, now that we are talking about it here ?
    Thx in advance
    Jurgen
    Yes exactly
    You need to set values only forthem which needs to be controlled from outside the package
    Any variable which gets its value through expression set inside package or through a query inside execute sql task/script task can be ignored from DTExec
    Ok I've seen the invocation error mostly inside script task. This may be because some error inside script written in script task. If it appeared after you removed the variable then it may because some reference of variable existing within script task.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • HELLP!! NEED TO KNOW HOW TO USE TWO IPODS ON ONE COMP!ASAP

    i have an ipod nano and an itunes account. Now my mom has a nano and we need to know if you can register them on the same account and how or any other tips for using two ipods on one comp! PLEASE HELP ASAP! ZACH

  • List is not empty but ListIterator is not working?

    Hello all, I am adding items to a List<String[]> object. The thing is when I check the object for null, it shows that the object is not null. But when I try using ListIterator, it shows that the List has no elements. what could be going wrong? Here i

  • Search in calendar returns nothing

    Spotlight in Finder is working fine, but ... · Search in Calendar is not working: Nothing returned. · Search in Mail is not working: Nothing returned. This might be the same error - what to do ? / FL

  • Create a screen by  teh help of pnp  ldb

    hi  expert ,                        i   have   a file ( new hire file ) New Hire file:  This interface program will be scheduled to run in the background and all the mandatory fields will be defaulted as shown below. End date will be defaulted with s

  • I'm trying to open a website saved on a private server with a VPN

    I created a Website on a private server. Usually you can also get to it with a VPN, but that doesn't work with my iPad. SO what am I doing wrong?