Beginner: about Application Modules

I am learning ADF, I have developed some small apps using JSPs/Servlets before.
To get an understanding of how the framework works, and to learn 'best practice(s)', I first describe how I did things before:
When developing my JSPs/Servlets I used the DAO pattern.
For example: I have addresses and complaints in my database. I created a Address class and an AddressDAO class, plus an Complaint class and a ComplaintDAO class.
Inside the DAO's I use a ConnectionManager for getting a (pooled/non pooled) Connection, and using JDBC I access the DB.
Note the separation: there a two DAO's, each focused on a part of the total application.
I do not use Hibernate (or other). I do not buffer data.
Now my questions:
- can I compare an ADF AM to a DAO?
- is it better to create 1 Model project, having several Application Modules and VOs (each in their own package) OR create several specific Model projects?
- when I use (instantiate) an AM based on a VO and read records from DB, I see (a lot) of instances are created in the VM.
Is the AM stored in the Session? (and if so: as a singleton?)
Are the VO instances (records from DB) kept in AM?
Are these VO instances ever(automatically) released to prevent to much data in memory?
Thanks so far!
grts Stephan

Hi,
Now my questions:
- can I compare an ADF AM to a DAO?You could probably compare it with VO or EO.
- is it better to create 1 Model project, having several Application Modules and VOs (each in their own package) OR create several specific Model projects?Depends on usage. If you have multiple View projects and not every one of them uses all the models, then split them up into different model projects and use whichever is needed (adf library jars).
- when I use (instantiate) an AM based on a VO and read records from DB, I see (a lot) of instances are created in the VM.Well, a correction here. AMs are data modeled based on single/multiple VOs. And, could you make it clear on lots of instances "of what" are created in the VM?
Is the AM stored in the Session? (and if so: as a singleton?)This blog would be a worth a read : https://blogs.oracle.com/jdevotnharvest/entry/recommended_number_and_size_of_application_modules
Are the VO instances (records from DB) kept in AM?AM is a container. VO comes under them. When a particular VO in a AM is executed, the data from DB are queried and fetched to it.
Are these VO instances ever(automatically) released to prevent to much data in memory?In theory yes.
-Arun

Similar Messages

  • Important conceptual question about Application Module, Maximum Pool Size

    Hello everyone,
    We have a critical question about the Application Module default settings (taking the DB connections from a DataSource)
    I know that on the Web it is generally suggested that each request must end with either a commit or rollback when executing PL/SQL blocks "directly" on the DB without the framework BC/ViewObject/Entity service intervention.
    Now, for some reasons, we started to develop our applications with thinking that each Web Session would reference exactly one DB session (opened by any instance taken from the AM pool) for the whole duration of the session, so that the changes made by each Web session to its DB session would never interfere with the changes made by "other" Web Sessions to "other" DB sessions .
    In other words, because of that convincement we often implemented sort of "transactions" that open and close (with either commit or rollback) each DB session not in/after a single HTTP request, but during many HTTP Requests.
    As a concrete example think of this scenario:
    1. the user presses the "Insert" button. An HTTP request is fired. The action listener is executed and ends up with inserting rows in a table via a PL SQL block (not via the ViewObjects API).
    2. no commit or rollback after the above PL/SQL block is done yet.
    3. finally the user presses a "Commit" or "Rollback" button, firing the call to the appropriate AM methos.
    Those three requests consist of what I called "transaction".
    From the documentation it's clear that there is no guarantee that the couple AM istance + DB session is the same during all the requests.
    This means that, during step 2, it's possible that another user might reference the same "pending" AM/DbSession for his needs and "steal" somehow the work done via PL/SQL after step 1. (This happens because sessions taken by the pool are always rolled back by default.)
    Now my question is:
    Suppose we set the "Maximum Pool Size" parameter to very a great number (always inferior to the maximum number of concurrent users):
    Is there any guarantee that all the requests will be isolated in that case?
    I hope the problem is clear.
    Let me know if you want more details.

    Thanks for the answers.
    If I am right, from all your answers about resource avaiability, this means that even supposing the framework is able to always give us the same AM instance back from the AM pool (by following the session-affinity criterias), there is, however, no "connection affinity" with the connections from the DataSource. This means that the "same AM instance" might take the "a new DB connection", if necessary, from the connection pool of the DataSource. If that happens, that could give us the same problems as taking "a new AM instance" (that is, not following session-affinity) from the beginning, since each time an a new connection is taken (either via a new AM instance or via the same AM instance plus a new DB connection), the corresponding DB session is rolle back by default, clearing all the pending transactions we might have performed before with direct PL/SQL calls bypassing the AM services during the life cycle of our application, so that the new HTTP request will have a clean DB session to start to work with.

  • About application module

    Hi,
    I want to call executeWithParams method in one of application modules view object..
    what is the syntax?

    ADFBC problem with bind variables

  • About application module pooling

    Hi all,
    I'm developing an application with JDev9i and I' trying to enable am pooling. I setup the jbo.recycletreshold=0 property and I put a log statement in the constructor of my Entity Object.
    I execute a query and display its result (in a paged form 10 by 10) in a jsp.
    every time I call the jsp (even when I click on the next page) I see the creation of all the entity objects. I logged applicationmodule.hashCode() and it's always the same.
    Which steps should I follow to enable am pooling with entity object pooling? I'm trying to read the pdf docs but I still haven't found what I'm looking for. Can anyone explain me what I'm doing wrong and where to find the documentation I need?
    Thanks,
    Giovanni

    Hi,
    The issue is that changing where clause parameters does not itself cause a ViewObject to re-execute its query. So,
    analyzing your code sample above:
    ApplicationModule am = cookie.useApplicationModule(true);
    Acquire an ApplicationModule instance for the session.
    ViewObject vo = am.findViewObject("DoctorView");
    vo.setWhereClause("ID_DOC = :1");
    vo.setWhereClauseParams(new Object[]{new oracle.jbo.domain.Number(1160)});
    // tag0
    Find the target ViewObject and set its where clause. Do not execute the query. VO State:
    Not executed
    RowSet for ID_DOC 1160 is not fetched
    Not iterated
    RangeSize = default
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1160
    int firstIndex=0;
    int maxSize=vo.getRowCount();
    Acquire the VO's rowCount. This will force the VO to execute itself if it has not already been executed. If the VO has
    already been executed then this will not force the VO to re-execute itself. VO State:
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Not iterated
    RangeSize = default
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1160
    int rangeSize=1;
    vo.setRangeStart(0);
    vo.setRangeSize(rangeSize);
    Row[] rows=vo.getAllRowsInRange();
    Row row = rows[0];
    Setup the VO range size. VO State:
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Iterated to rowIndex 0
    RangeSize = 1
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1160
    if (row != null)
    System.out.println("IdDoc: " + row.getAttribute("IdDoc"));
    // release the application module statefully
    cookie.releaseApplicationModule(true, true);
    Release the ApplicationModule statefully. Note here that the rangeSize, the whereClause, the whereClause parameters,
    the current row, and the ViewObject's row cache will all be maintained by the ApplicationPool. VO State:
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Iterated to rowIndex 0
    RangeSize = 1
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1160
    // acquire an application module instance. use the same cookie.
    // this is equivalent to a second HTTP request originating from the same
    // session which released the cookie statefully.
    am = cookie.useApplicationModule(true);
    At this point, assuming that the AM was not recycled for use by another session (true for this SimpleTest), the same
    AM instance that was released will be returned. VO state (same as upon release):
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Iterated to rowIndex 0
    RangeSize = 1
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1160
    vo = am.findViewObject("DoctorView");
    vo.setWhereClause("ID_DOC = :1");
    vo.setWhereClauseParams(new Object[]{new oracle.jbo.domain.Number(1159)});
    // tag1
    Set the VO where clause. This is where the issue occurs. As mentioned above modifying the where clause
    parameters do not force the VO query to be re-executed. So, the VO remains in an executed, iterated state with a
    row cache corresponding to ID_DOC 1159. VO State:
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Iterated to rowIndex 0
    RangeSize = 1
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1159
    //vo.executeQuery();
    //row = vo.first();
    vo.setRangeStart(0);
    vo.setRangeSize(rangeSize);
    rows=vo.getAllRowsInRange();
    row = rows[0];
    // tag2
    Setup and populate the range. If the VO is already in an executed state then all of these operations will be performed
    against the cached RowSet (again, ID_DOC 1159). So, these will not force the VO to re-execute itself. VO State:
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Iterated to rowIndex 0
    RangeSize = 1
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1159
    if (row != null)
    System.out.println("IdDoc: " + row.getAttribute("IdDoc"));
    // release the application module statefully
    cookie.releaseApplicationModule(true, true);
    It sounds as if you would like the VO to be re-execute itself at :tag1above, placing it in the following state at :tag2:
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Iterated to rowIndex 0
    RangeSize = 1
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1160
    The most efficient way to achieve this is to force a query re-execution when the where clause parameters change.
    For example execute the following at tag0 (I assume this is the portion that simulates the servlet (model/controller) logic
    and/or at tag1 (I assume that this is the portion that simulates the JSP (view) logic which I also assume would not
    normally be responsible for setting the where clause parameter and modifying the range, correct?).
    Object[] oldWhereClauseParams = vo.getWhereClauseParams();
    // this block was copied from above tag0
    ViewObject vo = am.findViewObject("DoctorView");
    vo.setWhereClause("ID_DOC = :1");
    vo.setWhereClauseParams(new Object[]{new oracle.jbo.domain.Number(<new where clause parameter>)});
    Object[] newWhereClauseParams = vo.getWhereClauseParams();
    boolean whereClauseParamsSame =
    (newWhereClauseParams.length == oldWhereClauseParams.length);
    if (whereClauseParamsSame)
    for (int i=0; i < newWhereClauseParams.length; i++)
    if (!oldWhereClauseParams.equals(newWhereClauseParams[i]))
    whereClauseParamsSame = false;
    break;
    // force a query re-execution if the where clause paramters have changed.
    if (!whereClauseParamsSame)
    vo.executeQuery();
    which would yield the following VO state at tag2:
    Executed
    RowSet for ID_DOC 1160 is fully fetched
    Iterated to rowIndex 0
    RangeSize = 1
    User defined where clause = "ID_DOC = :1"
    Where clause parameter 0 = 1160
    Hope this helps.
    JR

  • About application module client class

    I wonder what a class such as appModuleClient.java is used for?

    Hi,
    this is used to expose interfaces of the methods exposed by the ApplicationModule to the application client. So this class basically contains signatures of all methods that you select as client methods in teh AM
    Frank

  • Rename Application Module Woes

    I've written a series of web pages (maybe 10 or so) with about 30+ entities, associations, views, and view associations. I'd like to organize these in some fashion as this is only "part1" of a 4 part endeavor.
    I grouped entities and associations together into one package, then views and view links into another package. I was thinking of placing each part's entities and views/view links into their own packages.
    Then, I wanted to RENAME the application module from the standard AppModule to PFAppModule.
    Issue#1: When I did this and attempted to run the application, I received an error that the configuration AppModuleLocal could not be found. I then edited the application modules's configuration, renaming it from PFAppModuleLocal to AppModuleLocal.
    Issue#2: Well, if I drag any items from the Data Control Palette onto the screens, I get a new entry PFAppModuleDataControl. So I have two data control entries in DataBindings.cpx. Is this an issue?
    Issue#3: Even if I rename the DATA_CONTROL_PALETTE to it's original name: AppModuleDataControl, when I drag and drop objects from it, I get another new "data control name" in DataBindings.cpx called AppModuleDataControl1. Is this an issue?
    I guess I thought renaming a module would "propogate" the changes to the appropriate places.
    Am I simply wasting time?
    I'd like to create some more appmodule's now for each subsystem of the web application. Is this the right approach considering an application module is considered "task specific"?
    Any help/assistance/advice will be greatly appreciated.
    Thanks.

    The application module handles the session. You can read more about application modules and transactions in the online documentation, under
    User guides
    Developing business components
    Understanding transactions
    Blaise

  • Question about multiple application modules.

    Hello,
    Suppose I have 2 database schema’s. For both schemas I have 1 application module. All view objects are in the same project.
    For each application module I have an application definition.
    Is it possible to link between these two applications? Because sometimes these database schema’s link to each other and you would like to jump from one application directly to the other.
    For example you have orders locates in 1 DB schema and customers in another DB schema.
    You would want to jump from the order directly to the customer details in the second schema.
    Is this possible? Or do I need to make nested application modules etc?
    I can find very little info about this; the JHS def guide does not offer much information about multiple application modules etc.
    -Anton

    Anton,
    Yes, you can jump aroundd as you like.
    You just can't use view links between VO's based on different db schema tables.
    Nesting AM's doesn't help there, the DB connection of the top-level AM will be used.
    Why don't you create synomyms for the tables in the other schema?
    Steven Davelaar,
    JHeadstart Team.

  • Question about the Application Module in bc4j

    Hi all,
    I've been playing with JDeveloper9i for a little ovar a week only and have been trying to get access to a BC4J View Object in order to execute a runtime specific query on it, by passing 2 user input values to the object, and setting the WHERE clause by a call to the setWhereClause() method on the View Object. The only way i could come across to get hold of the View Object was to create an Application Object (in this case its called Bc4jModule) and then to use a call to a custom method in the Application Module Implementation which i created and set to be a Client Method.
    The code is as follows:
    In the Application Module (Bc4jModuleImpl)
    public int authenticateUser(String strLogin, String strP_Word)
    getUsersView().setWhereClause(" LOGIN='" + strLogin + "' AND P_WORD='" + strP_Word + "'");
    System.out.println(getUsersView().getWhereClause());
    getUsersView().executeQuery();
    return getUsersView().getRowCount();
    In the JClient panel (JButton action):
    Bc4jModule app = (Bc4jModule)panelBinding.getApplicationModule();
    int n = app.authenticateUser(txtUser.getText(), txtPassword.getText());
    System.out.println("Number of rows queried = " + n);
    I would like to know if this is the best way of doing a custom query on the Entity Object or is there some other way that i'm missing?

    The best way would be to:
    [list=1]
    [*]Design a view object in JDeveloper which has bind variables for the parameters you need to pass in at runtime. For example, your WHERE clause for your view object would look like:
    LOGIN = :0 and P_WORD = :1[*]Add an instance of that view object definition to your application module
    [*]Write your custom AppModule method like this:
    public boolean authenticateUser(String strLogin, String strP_Word)
      getUsersView().setWhereClauseParams(new Object[]{strLogin,strP_Word});
      getUsersView().executeQuery();
      return getUsersView().first() != null;
    }[list]

  • Question about shared application modules

    Hello,
    I read the part in the developer guide but I still have some questions.
    1) The dev guide states that shared app modules use a different configuration.
    I assume this is the <appmod>Shared configuration?
    2) Where is this defined? Can this be changed?
    3) I understand there are two type of ‘scopes’ session and application. I’m using application for static lists, but I do not understand what the session scope is for? Is there any reason to use this scope over a normal application module?
    4) We have a system which uses VPD in an ‘odd’ way. We use it to set the current working year. Because the data is bound to years. Is it possible to use a session scoped shared module for this? And when I changed the current year (Context being set via the app module) to refresh all the session scoped shared module’s views?
    -Anton

    Anton,
    Yes, you can jump aroundd as you like.
    You just can't use view links between VO's based on different db schema tables.
    Nesting AM's doesn't help there, the DB connection of the top-level AM will be used.
    Why don't you create synomyms for the tables in the other schema?
    Steven Davelaar,
    JHeadstart Team.

  • How do multiple developers share the same application module

    Is there a suggested method for multiple developers to share the same application module? We have 2 developers that will have EOs in the same directory and would like to know how they can share an application module but do development on different pieces of a project.
    Thanks,
    Paula

    Try using CVS or any other source control system. Still there are some points to think about before doing big projects, because there are many files which are updated by JDEV without knowledge by the developer. This causes many conflicts using a version control system like CVS.
    If you developers both are working on the server part of the application, I suggest using multiple application modules. See this blogs:
    http://radio.weblogs.com/0118231/stories/2005/05/27/howGranularShouldMyApplicationModulesBe.html
    http://radio.weblogs.com/0118231/stories/2005/07/19/nestedApplicationModules.html
    On the client side it depends on which technology you are using (struts, swing, jsf, ...).

  • MBean Attribute (Does not apply to application modules)

    Can any one tell what this mean ?
    MBean Attribute (Does not apply to application modules) :
    is this means that it wont help for datasources for any J2EE application ????
    Inactive Connection Timeout     
    The number of inactive seconds on a reserved connection before WebLogic Server reclaims the connection and releases it back into the connection pool.
    You can use the Inactive Connection Timeout feature to reclaim leaked connections - connections that were not explicitly closed by the application. Note that this feature is not intended to be used in place of properly closing connections.
    When set to 0, the feature is disabled.
    MBean Attribute (Does not apply to application modules) :
    JDBCConnectionPoolParamsBean.InactiveConnectionTimeoutSeconds
    Minimum value: 0
    Maximum value: 2147483647

    Yes!, they do not apply for any applications they are management interfaces, internal to weblogic.
    Below is the brief information about it:
    A managed bean (MBean) is a Java bean that provides a Java Management Extensions (JMX) interface. JMX is the J2EE solution for monitoring and managing resources on a network.
    BEA WebLogic Server provides a set of MBeans that you can use to configure, monitor, and manage WebLogic Server resources through JMX. This reference document organizes WebLogic Server MBeans into the following categories:
    MBeanServer Services, which serve as your entry point into navigating the MBean hierarchies. Some of these MBeans contain attributes and operations for managing changes to WebLogic Server configuration MBeans.
    Configuration MBeans, which expose attributes and operations for configuring WebLogic Server resources.
    Runtime MBeans, which provide information about the runtime state of its resources.
    New MBeans, which have been added in the current release of WebLogic Server. These new MBeans are also listed in other categories in this document (for example, new runtime MBeans are also listed under the Runtime MBeans category).
    Deprecated MBeans, which are deprecated in the current release of WebLogic Server.

  • HOWTO: Using a BC4J Application Module in an Stateless EJB Session Bean

    HOWTO: Using a BC4J Application Module in an Stateless EJB Session Bean
    by Steve Muench
    Overview
    BC4J provides automatic facilities for deploying any application module as a stateful EJB session bean. If you want to leverage the features of your BC4J application module from a stateless EJB session bean, it's not automatic but it is straightforward to implement. This howto article explains the details.
    For our example, we will create a stateless EJB session bean that uses a container-managed transaction. To keep things simple, let's assume the session bean has a single public method on its remote interface named createDepartment() with the following signature:
    public void createDepartment(int id, String name, String loc) throws AppException
    AppException is an example of an application-specific exception that our method will throw if any problems arise during its execution.The goal of this article is to illustrate how to use the BC4J application module named com.example.hr.HRApp as part of the implementation of this createDepartment method on our stateless enterprise bean. Let's assume that the HRApp application module has a view object member named Departments, based on the com.example.hr.DeptView view object, based on the familiar DEPT table and related to the com.example.hr.Dept entity object so our view can be updateable.
    Creating the Stateless Session Bean
    We can start by using the JDeveloper Enterprise Bean wizard to create a new stateless session bean called StatelessSampleEJB implemented by:[list][*]com.example.StatelessSampleEJBBean (Bean class)[*]com.example.StatelessSampleEJBHome (Home interface)[*]com.example.StatelessSampleEJB (Remote interface)[list]
    We then use the EJB Class Editor to add the createDepartment method to the remote interface of StatelessSampleEJB with the signature above. We edit the remote interface to make sure that it also reflects that the createDepartment method thows the AppException like this:
    package com.example;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface StatelessSampleEJB extends EJBObject {
      void createDepartment(int id, String name, String loc)
      throws RemoteException,AppException;
    }Before we start adding BC4J into the picture for our implementation, our StatelessSampleEJBBean class looks like this:
    package com.example;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class StatelessSampleEJBBean implements SessionBean {
      public void ejbCreate(){}
      public void ejbActivate(){}
      public void ejbPassivate(){}
      public void ejbRemove(){}
      public void setSessionContext(SessionContext ctx){
      public void createDepartment(int id, String name, String loc) 
      throws AppException {
        // TODO: Implement method here
    }We can double-click on the ejb-jar.xml file in our project to see the XML deployment descriptor for the bean we just created:
    <ejb-jar>
       <enterprise-beans>
          <session>
             <description>Session Bean ( Stateless )</description>
             <display-name>StatelessSampleEJB</display-name>
             <ejb-name>StatelessSampleEJB</ejb-name>
             <home>com.example.StatelessSampleEJBHome</home>
             <remote>com.example.StatelessSampleEJB</remote>
             <ejb-class>com.example.StatelessSampleEJBBean</ejb-class>
             <session-type>Stateless</session-type>
             <transaction-type>Container</transaction-type>
          </session>
       </enterprise-beans>
    </ejb-jar>We need to add the extra <assembly-descriptor> section in this file to indicate that the createDepartment method will require a transaction. After this edit, the ejb-jar.xml file looks like this:
    <ejb-jar>
       <enterprise-beans>
          <session>
             <description>Session Bean ( Stateless )</description>
             <display-name>StatelessSampleEJB</display-name>
             <ejb-name>StatelessSampleEJB</ejb-name>
             <home>com.example.StatelessSampleEJBHome</home>
             <remote>com.example.StatelessSampleEJB</remote>
             <ejb-class>com.example.StatelessSampleEJBBean</ejb-class>
             <session-type>Stateless</session-type>
             <transaction-type>Container</transaction-type>
          </session>
       </enterprise-beans>
       <assembly-descriptor>
          <container-transaction>
             <method>
                <ejb-name>StatelessSampleEJB</ejb-name>
                <method-name>createDepartment</method-name>
                <method-params>
                   <method-param>int</method-param>
                   <method-param>java.lang.String</method-param>
                   <method-param>java.lang.String</method-param>
                </method-params>
             </method>
             <trans-attribute>Required</trans-attribute>
          </container-transaction>
       </assembly-descriptor>
    </ejb-jar>
    Aggregating a BC4J Application Module
    With the EJB aspects of our bean setup, we can proceed to implementing the BC4J application module aggregation.
    The first thing we do is add private variables to hold the EJB SessionContext and the instance of the aggregated BC4J ApplicationModule, like this:
    // Place to hold onto the aggregated appmodule instance
    transient private ApplicationModule _am  = null;
    // Remember the SessionContext that the EJB container provides us
    private           SessionContext    _ctx = null;and we modify the default, empty implementation of the setSessionContext() method to remember the session context like this:
    public void setSessionContext(SessionContext ctx){ _ctx = ctx; }We add additional constants that hold the names of the J2EE datasource that we want BC4J to use, as well as the fully-qualified name of the BC4J application module that we'll be aggregating:
    // JNDI resource name for the J2EE datasource to use
    private static final String DATASOURCE = "jdbc/OracleCoreDS";
    // Fully-qualified BC4J application module name to aggregate
    private static final String APPMODNAME = "com.example.hr.HRApp";We expand the now-empty ejbCreate() and ejbRemove() methods to create and destory the aggregated instance of the BC4J application module that we'll use for the lifetime of the stateless session bean. When we're done, ejbCreate() it looks like this:
    public void ejbCreate() throws CreateException {
      try {
        // Setup a hashtable of environment parameters for JNDI initial context
        Hashtable env = new Hashtable();
        env.put(JboContext.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
        // NOTE: we want to use the BC4J app module in local mode as a simple Java class!
        env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
        env.put(PropertyConstants.INTERNAL_CONNECTION_PARAMS,DATASOURCE);
        // Create an initial context, using this hashtable of environment params
        InitialContext ic = new InitialContext(env);
        // Lookup a home interface for the application module
        ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(APPMODNAME);
        // Using the home, create the instance of the appmodule we'll use
        _am = home.create();
        // Register the BC4J factory to handle EJB container-managed transactions
        registerContainerManagedTransactionHandlerFactory();
      catch(Exception ex) {
         ex.printStackTrace();
        throw new CreateException(ex.getMessage());
    }and ejbRemove() looks like this:
    public void ejbRemove() {
      try {
        // Cleanup any appmodule resources before getting shutdown
        _am.remove();
      catch(JboException ex) { /* Ignore */ }
    }The helper method named reigsterContainerManagedTransactionHandlerFactory() looks like this:
    private void registerContainerManagedTransactionHandlerFactory() {
      SessionImpl session = (SessionImpl)_am.getSession();
      session.setTransactionHandlerFactory(
        new TransactionHandlerFactory() {
          public TransactionHandler  createTransactionHandler() {
            return new ContainerManagedTxnHandlerImpl();
          public JTATransactionHandler createJTATransactionHandler() {
            return new ContainerManagedTxnHandlerImpl();
    }The last detail is to use the BC4J appmodule to implement the createDepartment() method. It ends up looking like this:
    public void createDepartment(int id, String name, String loc)
    throws AppException {
      try {
        // Connect the AM to the datasource we want to use for the duration
        // of this single method call.
        _am.getTransaction().connectToDataSource(null,DATASOURCE,false);
        // Use the "Departments" view object member of this AM
        ViewObject departments = _am.findViewObject("Departments");
        // Create a new row in this view object.
        Row newDept = departments.createRow();
        // Populate the attributes from the parameter arguments.
        newDept.setAttribute("Deptno", new Number(id));
        newDept.setAttribute("Dname", name);
        newDept.setAttribute("Loc", loc);
        // Add the new row to the view object's default rowset
        departments.insertRow(newDept);
        // Post all changes in the AM, but we don't commit them. The EJB
        // container managed transaction handles the commit.
        _am.getTransaction().postChanges();
      catch(JboException ex) {
        // To be good EJB Container-Managed Transaction "citizens" we have
        // to mark the transaction as needing a rollback if there are problems
        _ctx.setRollbackOnly();
        throw new AppException("Error creating dept "+ id +"\n"+ex.getMessage());
      finally {
        try {
          // Disconnect the AM from the datasource we're using
          _am.getTransaction().disconnect();
        catch(Exception ex) { /* Ignore */ }
    Building a Test Client
    With the EJB-Tier work done, we can build a sample client program to test this new stateless EJB Session Bean by selecting the bean in the Oracle9i JDeveloper IDE and choosing "Create Sample Java Client" from the right-mouse menu.
    When the "Sample EJB Client Details" dialog appears, we take the defaults of connecting to embedded OC4J container. Clicking the (OK) button generates the following test class:
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import com.example.StatelessSampleEJB;
    import com.example.StatelessSampleEJBHome;
    public class SampleStatelessSampleEJBClient {
      public static void main(String [] args) {
        SampleStatelessSampleEJBClient sampleStatelessSampleEJBClient =
           new SampleStatelessSampleEJBClient();
        try {
          Hashtable env = new Hashtable();
          env.put(Context.INITIAL_CONTEXT_FACTORY,
                  "com.evermind.server.rmi.RMIInitialContextFactory");
          env.put(Context.SECURITY_PRINCIPAL, "admin");
          env.put(Context.SECURITY_CREDENTIALS, "welcome");
          env.put(Context.PROVIDER_URL,
                  "ormi://localhost:23891/current-workspace-app");
          Context ctx = new InitialContext(env);
          StatelessSampleEJBHome statelessSampleEJBHome =
               (StatelessSampleEJBHome)ctx.lookup("StatelessSampleEJB");
          StatelessSampleEJB statelessSampleEJB;
          // Use one of the create() methods below to create a new instance
          // statelessSampleEJB = statelessSampleEJBHome.create();
          // Call any of the Remote methods below to access the EJB
          // statelessSampleEJB.createDepartment( int id, java.lang.String name, java.lang.String loc );
        catch(Throwable ex) {
          ex.printStackTrace();
    }We uncomment the call to the create() method and add a few calls to the createDepartment() method so that the body of the test program now looks like this:
    // Use one of the create() methods below to create a new instance
    statelessSampleEJB = statelessSampleEJBHome.create();
    // Call any of the Remote methods below to access the EJB
    statelessSampleEJB.createDepartment( 13, "Test1","Loc1");
    System.out.println("Created department 13");
    statelessSampleEJB.createDepartment( 14, "Test2","Loc2");
    System.out.println("Created department 14");
    try {
      // Try setting a department id that is too large!
      statelessSampleEJB.createDepartment( 23456, "Test3","Loc3");
    catch (AppException ax) {
      System.err.println("AppException: "+ax.getMessage());
    }Before we can successfully run our SampleStatelessSampleEJBClient we need to first run the EJB bean that the client will try to connect to. Since Oracle9i JDeveloper supports local running and debugging of the EJB-Tier without doing through a full J2EE deployment step, to accomplish this prerequisite step we just need to right-mouse on the StatelessSampleEJB node in the System Navigator and select "Run". This starts up the embedded OC4J instance and runs the EJB right out of the current out path.Finally, we can run the SampleStatelessSampleEJBClient, and see the output of the test program in the JDeveloper log window:
    Created department 13
    Created department 14
    AppException: Error creating dept 23456
    JBO-27010: Attribute set with value 23456 for Deptno in Dept has invalid precision/scale
    Troubleshooting
    One error that might arise while running the example is that the database connection information in your data-sources.xml for the jdbc/OracleCoreDS datasource does not correspond to the database you are trying to test against. If this happens, then double-check the file .\jdev\system\oc4j-config\data-sources.xml under the JDeveloper installation home directory to make sure that the url value provided is what you expect. For example, to work against a local Oracle database running on your current machine, listening on port 1521, with SID of ORCL, you would edit this file to have an entry like this for jdbc/OracleCoreDS :
    <data-source
        class="com.evermind.sql.DriverManagerDataSource"
        name="OracleDS"
        location="jdbc/OracleCoreDS"
        xa-location="jdbc/xa/OracleXADS"
        ejb-location="jdbc/OracleDS"
        connection-driver="oracle.jdbc.driver.OracleDriver"
        username="scott"
        password="tiger"
        url="jdbc:oracle:thin:@localhost:1521:ORCL"
        inactivity-timeout="30"
    />This is the data-sources.xml file that gets used by the embedded OC4J instance running in JDeveloper.
    Conclusion
    Hopefully this article has illustrated that it is straightforward to utilize the full power of BC4J in local mode as part of your EJB Stateless Session Beans using container-managed transaction. This example illustrated a single createDepartment method in the enterprise bean, but by replicating the application module interaction code that we've illustrated in createDepartment, any number of methods in your stateless session bean can use the aggregated application module instance created in the ejbCreate() method.
    Code Listing
    The full code listing for the SampleStatelessEJB bean implementation class looks like this:
    * StatelessSampleEJB
    * Illustrates how to use an aggregated BC4J application module
    * in local mode as part of the implementation of a stateless
    * EJB session bean using container-managed transaction.
    * HISTORY
    * smuench/dmutreja 14-FEB-2002 Created
    package com.example;
    import oracle.jbo.*;
    import oracle.jbo.server.*;
    import javax.ejb.*;
    import oracle.jbo.domain.Number;
    import oracle.jbo.common.PropertyConstants;
    import java.util.Hashtable;
    import javax.naming.InitialContext;
    import oracle.jbo.server.ejb.ContainerManagedTxnHandlerImpl;
    public class StatelessSampleEJBBean implements SessionBean {
      // JNDI resource name for the J2EE datasource to use
      private static final String DATASOURCE = "jdbc/OracleCoreDS";
      // Fully-qualified BC4J application module name to aggregate
      private static final String APPMODNAME = "com.example.hr.HRApp";
      // Place to hold onto the aggregated appmodule instance
      transient private ApplicationModule _am  = null;
      // Remember the SessionContext that the EJB container provides us
      private           SessionContext    _ctx = null;
      public void ejbCreate() throws CreateException {
        try {
          // Setup a hashtable of environment parameters for JNDI initial context
          Hashtable env = new Hashtable();
          env.put(JboContext.INITIAL_CONTEXT_FACTORY,JboContext.JBO_CONTEXT_FACTORY);
          env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
          env.put(PropertyConstants.INTERNAL_CONNECTION_PARAMS,DATASOURCE);
          // Create an initial context, using this hashtable of environment params
          InitialContext ic = new InitialContext(env);
          // Lookup a home interface for the application module
          ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(APPMODNAME);
          // Using the home, create the instance of the appmodule we'll use
          _am = home.create();
          // Register the BC4J factory to handle EJB container-managed transactions
          registerContainerManagedTransactionHandlerFactory();
        catch(Exception ex) {
           ex.printStackTrace();
          throw new CreateException(ex.getMessage());
      public void ejbActivate(){}
      public void ejbPassivate(){}
      public void ejbRemove(){}
      public void setSessionContext(SessionContext ctx){ _ctx = ctx; }
      public void createDepartment(int id, String name, String loc)
      throws AppException {
        try {
          // Connect the AM to the datasource we want to use for the duration
          // of this single method call.
          _am.getTransaction().connectToDataSource(null,DATASOURCE,false);
          // Use the "Departments" view object member of this AM
          ViewObject departments = _am.findViewObject("Departments");
          // Create a new row in this view object.
          Row newDept = departments.createRow();
          // Populate the attributes from the parameter arguments.
          newDept.setAttribute("Deptno", new Number(id));
          newDept.setAttribute("Dname", name);
          newDept.setAttribute("Loc", loc);
          // Add the new row to the view object's default rowset
          departments.insertRow(newDept);
          // Post all changes in the AM, but we don't commit them. The EJB
          // container managed transaction handles the commit.
          _am.getTransaction().postChanges();
        catch(JboException ex) {
          // To be good EJB Container-Managed Transaction "citizens" we have
          // to mark the transaction as needing a rollback if there are problems
          _ctx.setRollbackOnly();
          throw new AppException("Error creating dept "+ id +\n"+ex.getMessage());
        finally {
          try {
            // Disconnect the AM from the datasource we're using
            _am.getTransaction().disconnect();
          catch(Exception ex) { /* Ignore */ }
      private void registerContainerManagedTransactionHandlerFactory() {
        SessionImpl session = (SessionImpl)_am.getSession();
        session.setTransactionHandlerFactory(
          new TransactionHandlerFactory() {
            public TransactionHandler createTransactionHandler() {
              return new ContainerManagedTxnHandlerImpl();
            public JTATransactionHandler createJTATransactionHandler() {
              return new ContainerManagedTxnHandlerImpl();

    Hi Steve, It4s me again;
    About the question I made, I tried with a single assembly-descriptor tag and a single container-transaction tag in the deployment descriptor of the session bean and these were the results.
    java.lang.NullPointerException
         void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
         java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         void __Proxy1.modificaEnvoltura(java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.String)
         void SamplemdeController.envolturaControlEJBClient.main(java.lang.String[])
    Then I tried with multiple assembly-descriptor tags each with a single container-transaction tag and the results were:
    java.lang.NullPointerException
         void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
         java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         void __Proxy1.modificaEnvoltura(java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.String)
         void SamplemdeController.envolturaControlEJBClient.main(java.lang.String[])
    Finally I tried with a single assembly-descriptor and multiple container tags and the results were:
    java.lang.NullPointerException
         void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
         java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         java.lang.Object com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
         void __Proxy1.modificaEnvoltura(java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.Integer, java.lang.String)
         void SamplemdeController.envolturaControlEJBClient.main(java.lang.String[])
    How can I make my Stateless Session bean work out?

  • Best Practice - Bounded Task Flows, Regions and Nested Application Modules

    Using JDev 11.1.1.3; understand that it's generally considered good practice to just have 1 root application module servicing model content / services for each page. In our application, we've used a number of bounded task flows and page fragments deployed as af:region's into pages as either a) views targeted in page-flow navigation, b) tab panel content inside a regular jspx, or c) af:popup / af:dialog content. As it stands, we've not engaged nesting of the application modules for this embedded region content, so these regions are no doubt instantiating new AM's if/when invoked. Should the AM's servicing these embedded regions be deployed nested within the root AM's, and then if so, does this change the way that the jsff / fragment content is actually developed (currently as per any other jspx using the DataControl pallete). Or are the best-practice directives talking about a page as being the design-time / declarative composition of content rather than the run-time aggregation of page + fragments ... in which case the fact that our embedded fragments are not using nested AM's is unlikely to concern.
    Thanks,

    Probably a better question for the ADF EMG: http://groups.google.com/group/adf-methodology?hl=en
    CM.

  • Best practice for application module  for scalability

    if i compare application module with forms 6i runtime session.(correct me if i wrong)
    In forms 6i, we create for single form for purchase entry. in which we select table like po , po_item, item_master, customer master
    also single form for sales entry. in which we select table like sales , sales_item, item_master, customer master, po , po_item
    So my question is. in jdeveloper , we planning to make separate jsp page and applicaiton module for purchase entry,
    separare jsp page and application module for sales.
    is it ok.
    or
    what is the best practice in this senario.?? ( or in scalability senario)
    if i made one single application module for whole application (let say 300 entity's(tables)) will performance of my app server degrade.

    You might want to read the chapter about AM Granularity in the ADF Developer Guide:
    http://download.oracle.com/docs/html/B25947_01/bcservices009.htm#sm0229

  • Invalid arguments in call for an Application Module

    We are writing a web-app which has two packages in our BC4J project, each with an Application Module. One of these app modules contains business components for objects owned by the user ILOGNET and the other for objects owned by the user EAGLE. We are allowing users to logon and connect to the database as themselves by specifying username and password dynamically as attributes of each instance of both application modules.
    The problem we are having is that for a particular JSP sometimes when we deploy, we get an "invalid arguments in call" error. Other times, it doesn't seem to be a problem. The user I am testing with has Oracle roles that have privileges to view all the necessary objects. I'm just not sure why it seems to be temperamental like this. Does anyone have any ideas ? The code for the problem JSP is shown below.
    Thanks for any help :
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <link rel="stylesheet" type="text/css" href="../style/style.css">
    <TITLE>
    Commenting Subject Administration Portlet
    </TITLE>
    <script language="JavaScript">
    var g_valid = false;
    function get_validate()
    var el_subject = document.getElementById("id_subject");
    el_subject.value = pro_trim(el_subject.value);
    if (el_subject.value == "")
    alert("Subject is a required field");
    g_valid = false;
    else
    g_valid = true;
    function pro_trim(p_in)
    var s_remaining = p_in;
    while (s_remaining.charAt(s_remaining.length - 1) == ' ')
    s_remaining = s_remaining.substring(0, s_remaining.length - 1);
    while (s_remaining.charAt(0) == ' ')
    s_remaining = s_remaining.substring(1, s_remaining.length);
    return s_remaining;
    </script>
    </HEAD>
    <body class="portlet">
    <jbo:ApplicationModule id="am_subjectAdmin" configname="eagle.EagleModule.EagleModuleLocal" releasemode="Stateful" username="<%=request.getRemoteUser()%>" password='<%=(String)session.getValue("PASSWORD")%>' />
    <jbo:DataSource id="ds_enditems" orderbyclause="eiacodxa" rangesize="4" appid="am_subjectAdmin" viewobject="EIACSELECTView" />
    <table class="portlet" width="100%" cellpadding=10 cellspacing=0>
              <tr class="portlet-title">
              <td>
    Commenting Subject Administration Portlet
              </td>
              </tr>
              <tr class="portlet-body" height="100%">
              <td>
    <table width="100%" align="center">
    <tr>
    <td height="50"></td>
    </tr>
    <tr>
    <td>
    <form name="frm_subject" action="cls_comment_subject" method="post" onSubmit="get_validate();return g_valid;">
    <table>
    <tr>
    <td width="150">End Item :</td>
    <td align="left">
    <jbo:InputSelect datasource="ds_enditems" dataitem="Eiacodxa" displaydatasource="ds_enditems" displaydataitem="Eiacodxa" displayvaluedataitem="Eiacodxa" ></jbo:InputSelect>
    </td>
    <td align="right">Subject Type :</td>
    <td align="left">
    <select name="type">
    <option value="C">Comment
    <option value="R">Response
    </select>
    </td>
    <td width="250"></td>
    </tr>
    <tr>
    <td width="150">Subject Title :</td>
    <td colspan="3">
    <input id="id_subject" type="text" name="subject" size="100" maxlength="255">
    </td>
    </tr>
    <tr>
    <td colspan="4" align="right">
    <input type="Submit" value="Submit Subject">
    <input type="Reset" value=" Clear ">
    </td>
    </tr>
    <tr>
    <td height="250">
    </td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </HTML><jbo:ReleasePageResources />
    Regards,
    Joe Mellors

    I'd forgotten all about this until now when it just happened again. Seems strange that it works fine a lot of the time. It only seems to happen with one of the two Application Module's in the project.
    Here is the call stack. I'd appreciate any help.
    Thanks,
    Joe
    JBO-30003: The application pool (eagle.EagleModule.EagleModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:193)
         at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:116)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
         at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:208)
         at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:63)
         at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:53)
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:615)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:815)
         at oracle.jbo.server.NullDBTransactionImpl.initTxn(NullDBTransactionImpl.java:489)
         at oracle.jbo.server.NullDBTransactionImpl.connect(NullDBTransactionImpl.java:367)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:201)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.connect(ApplicationPoolImpl.java:2304)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1096)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
         at oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doStartTag(ApplicationModuleTag.java:181)
         at org.apache.jsp.mp_0005fdt$jsp._jspService(mp_0005fdt$jsp.java:83)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:531)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    ## Detail 0 ##
    java.sql.SQLException: invalid arguments in call
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:185)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:227)
         at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:973)
         at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:197)
         at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:353)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:457)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:332)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:162)
         at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:116)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:290)
         at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:208)
         at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:63)
         at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:53)
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:615)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:815)
         at oracle.jbo.server.NullDBTransactionImpl.initTxn(NullDBTransactionImpl.java:489)
         at oracle.jbo.server.NullDBTransactionImpl.connect(NullDBTransactionImpl.java:367)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:201)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.connect(ApplicationPoolImpl.java:2304)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1096)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:1669)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:289)
         at oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doStartTag(ApplicationModuleTag.java:181)
         at org.apache.jsp.mp_0005fdt$jsp._jspService(mp_0005fdt$jsp.java:83)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:531)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)

Maybe you are looking for