ApplicationModule

We are building a ADF application with BC4J-Struts-JSP
We don´t know how to get the our application module instance inside the Action.
could you help us?
thanks in advance
fred

Hi,
This can happen if
- the method is not public
- the return type of your method and/or one or more of the parameters are not serializable
basically, if you want to export a method, the parameters and the return type should be either :
- basic types (void, int, long, char...)
- serializable objects (java.lang.String, oracle.jbo.ViewObject, Row, oracle.jbo.domain.Number, oracle.jbo.domain.Date, java.util.ArrayList)
- arrays of the previous (though if i remember well, there was an issue in jdev323 preventing the use of basic type arrays, it is corrected in jdev 9i)
If your method returns or has a parameter of a non-serializable type, say, java.lang.Thread, it won't be candidate for export.
I also have noticed that if you have overloaded methods (differing only by their parameter list), you'll have to export them manually by adding them to the generated interface (until this issue is corrected)
Hope this helps
Remi

Similar Messages

  • JBO-33001: Configuration file /oracle/apps/crmCommon/activities/activityManagementService/applicationModule/common/bc4j.xcfg is not found in the classpath.

    I am trying to consume a base model which is available in the Customer.jws (AppCmmnCompActivitiesPublicModelActivityManagement) to my Mobile UI project available in Sales.jws (SalesMobilePublicUi). We have added proper Databindings.cpx entry for accessing the applicationModule present in the model.
    On deploying the sales mobile app, I get the following ConfigException:
    JBO-33001: Configuration file /oracle/apps/crmCommon/activities/activityManagementService/applicationModule/common/bc4j.xcfg is not found in the classpath.
    The bc4j.xcfg mentioned in the above path actually contains the entry. On checking about this issue, I found out that the prominent solution would be model project should be added as Dependencies to the UI project. But the UI is in different workspace (Sales.jws) and so the list of dependencies shown are those of this workspace only, whereas the model is present in Customer.jws and it does not come under the dependencies list.
    How can this issue be resolved? Please let me know any pointers on solving this issue.

    Build an adfLibrary from the model in the Customers.jws and add this adfLibrary to the other ui project. This will get you the dependency.
    Timo

  • How can I get an exist applicationModule reference in a servlet?

    JDev 9.0.3.5
    Purpose: to get an exist ADF applicationModule reference in a servlet, so can keep data operations in the same db transaction.
    here is the servlet side code, seems not work.
    ApplicationModuleRef appModRef = SessionUtils.getAmRefFromRequest(request, APPLICATION_ID, "demo.HelloAMLocal");
    return appModRef.useApplicationModule(false);
    package demo;
    import java.util.*;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.JboException;
    import oracle.jbo.common.ampool.ApplicationModuleRef;
    import oracle.jbo.common.ampool.SessionCookie;
    import oracle.jbo.http.HttpContainer;
    import oracle.jbo.http.HttpSessionCookieFactory;
    import oracle.jbo.http.HttpUtil;
    public class SessionUtils {
    public static ApplicationModuleRef getAmRefFromRequest(HttpServletRequest inRequest,
    String inAppId,
    String inConfigName) {
    initialize(inRequest, inAppId, inConfigName);
    HttpContainer container = HttpContainer.getInstanceFromSession(inRequest.getSession());
    ApplicationModuleRef amRef = (ApplicationModuleRef)container.getSessionCookie(inAppId);
    if (amRef == null) {
    //throw new JboException(Res.format(Res.COOKIE_NOT_FOUND, inAppId));
    throw new JboException("Cookie not found when get am ref.");
    return amRef;
    public static void initialize(HttpServletRequest request,
    String appId,
    String configName) {
    int index = configName.lastIndexOf('.');
    String configPackage = configName.substring(0, index);
    String configSection = configName.substring(index + 1);
    // This instantiates an HttpContainer, and attaches the request app mod cookie to the
    // container.
    SessionCookie cookie = findSessionCookie(request,
    request.getSession(true),
    appId,
    configPackage,
    configSection);
    ApplicationModule am = cookie.useApplicationModule(); //no lock
    Locale locale = HttpUtil.determineLocale(request);
    // setup the Application Module's Locale based on the incoming request information
    if(locale != null)
    am.getSession().setLocale(locale);
    // keep id for passivation purposes. This inserts a record into the PS_TXN table.
    cookie.reservePassivationId();
    } // initialize
    protected static SessionCookie findSessionCookie(HttpServletRequest request
    , HttpSession session
    , String applicationId
    , String configPackage
    , String configName) {
    // Load the pool creation properties with the name of our custom
    // application pool class.
    Properties cookieProps = new Properties();
    cookieProps.put(HttpSessionCookieFactory.HTTP_SERVLET_REQUEST, request);
    // Specify property values to be used by the application pool. Please note
    // that these property values could also have been specified in the
    // application configuration file.
    Properties poolProps = new Properties();
    // This action instantiates an HttpContainer.
    SessionCookie cookie = HttpContainer.findSessionCookie(session
    , applicationId
    , configName // poolName
    , configPackage
    , configName
    , poolProps
    , cookieProps);
    return cookie;
    }

    Example VI
    Balaji PK (CLA)
    Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    Seperate variables.vi ‏8 KB

  • Calling ApplicationModule from a servlet (Standalone WL)

    Hi,
    I have to use a servlet call into my Oracle Fusion application (ADF Faces 11g)
    Into the servlet I have to access the DB so I am calling the ApplicationModule as following:
    String amDef = "hod.tasdeeq.workspace.service.TasdeeqServiceAM";
    String config = "TasdeeqServiceAMLocal";
    ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
    ViewObject vo = am.findViewObject("CertifiedDocPDFVO");
    It is working well using the embedded WL (Debug and Run).
    After deploying the application to the standalone WL I have an exception when calling the servlet.
    Seems a connection pool exception...
    Any idea?
    Thank you
    Jamil
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:205)
         at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:164)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:589)
         at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:322)
         at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:100)
         at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:66)
         at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:52)
         at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:129)
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:935)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1103)
         at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6275)
         at oracle.jbo.server.DBTransactionImpl2.connect(DBTransactionImpl2.java:131)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:213)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:561)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8470)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4389)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2385)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2201)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3085)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:460)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:431)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:426)
         at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1398)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1366)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1338)
         at hod.tasdeeq.servlet.pdfServlet.doGet(pdfServlet.java:37) <---------------------------------------------------Servlet Call

    Solution:
    TasdeeqServiceAMLocal is not defined on the WLS
    Need to use the Datasource application module defined on the server
    String amDef = "hod.tasdeeq.workspace.service.TasdeeqServiceAM";
    String config = "JNDI";<----------------------------
    ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
    ViewObject vo = am.findViewObject("CertifiedDocPDFVO");
    Jamil

  • ADF error at 10.1.3.1 Invalid class: oracle.jbo.ApplicationModule

    Hi,
    I need some help. I'm a novice jdeveloper user, but I have managed to build a small appilcation for a client, with use of ADF. When I try to run it at the applications server, it can't find the page, and have this error in the application.log:
    07/01/23 09:15:58.698 rtvview: Servlet error
    oracle.classloader.util.AnnotatedLinkageError: Class oracle/jbo/ApplicationModule violates loader constraints
    Invalid class: oracle.jbo.ApplicationModule
    Loader: adf.oracle.domain:10.1.3.1
    Code-Source: /t02dat/iast_r3/midtier/BC4J/lib/adfm.jar
    Configuration: <code-source> in /t02dat/iast_r3/midtier/j2ee/home/config/server.xml
    Dependent class: oracle.jbo.uicli.mom.JUApplicationDefImpl
    Loader: adf.oracle.domain:10.1.3.1
    Code-Source: /t02dat/iast_r3/midtier/BC4J/lib/adfm.jar
    Configuration: <code-source> in /t02dat/iast_r3/midtier/j2ee/home/config/server.xml
    Does anyone have an idea?
    Versions:
    Jdeveloper 10.1.3.1
    Application Server 10.1.3.1.0
    Thanks
    Jorn
    It worked when I tried to deploy the application thru jdeveloper server connection. Does anyone know why it's working now?
    Message was edited by:
    user527535

    I've managed to eliminate the JBO-35007 errors through the use of the Refresh and RefreshCondition tags. The problem I have now is that I do most of my testing in Firefox (latest release) and it seems to be caching pages even though I have caching turned off. For instance we have different menu options based on a user's privileges. If I log out and log in as someone else who has different privileges the previous user's options are still displayed. If I click on them it then refreshes the page and the new user's options are displayed. This is also fixed by manually refreshing the page. I do not encounter this problem at all with IE, only firefox. Any thoughts here?

  • How to create a ApplicationModule in runtime??

    Hi!!!
    I tried to create an ApplicationModule with variable id and definition like that:
    <%@page import="package.User" %>
    <%
    User u= (User) session.getApplication("user");
    %>
    <jbo:ApplicationModule id="<%=u.getAppModId()%>" definition="<%=u.getAppModDef()%>" releasemode="Stateful" />
    this cause an exception, I think because the id and definition values not are statics.
    I must create diferent types of ApplicationModules depending of the user.
    How can i do for create diferent AppMod whit the user data???
    Thanxs!!!!

    all the tag libraries and classes are included that
    not is the problem because when i use:Then if not willing to provide the information, I would direct you to ask the question from whomever you got the tags from. A guess is that the tag does not take run time expressions, and thus can not work the way you want. Having no knowledge of the library, and you refusing to tell me the info, I will let you ask those responsible if that is true.
    <jbo:ApplicationModule id="AppMod"
    definition="ProyView.AppMod" releasemode="Stateful" />
    all works OK.
    Ty!

  • BC4J ApplicationModule - best practice in Stateful web application?

    When writing a stateful web application that uses BC4J framework as the model, what is considered best practice in using the Application Module. Is it okay to store an AM instance in a HttpSession, or should we opt for the features explained in the BC4J Pooling samples, which uses the SessionCookie interface?
    Tips/Tricks/Pitfalls information welcome
    Thx,

    When writing a stateful web application that uses BC4J framework as the model, what is considered best practice in
    using the Application Module. Is it okay to store an AM instance in a HttpSession, or should we opt for the features
    explained in the BC4J Pooling samples, which uses the SessionCookie interface? Best practice is to store the SessionCookie (an ApplicationModule handle) as demonstrated in the pooling sample.
    This will allow many advantages including scalable state management support, timeout support, and
    failover / clustering support.
    Caching the ApplicationModule directly can be dangerous because:
    1. The AM is not serializable which could result in serialization exceptions if the servlet container were distributable.
    2. The AM does not responsd to timeout which could result in memory leaks if the AM is not explicitly returned to the
    pool at the end of each request.
    3. For stateful applications the memory consumed by each AM could be significant. Even if the AM were correctly
    released to the pool upon session timeout it would still have consumed that memory up to that point. Using the
    SessionCookie along with state managed release allows for scalable state management.
    Tips/Tricks/Pitfalls information welcome
    Thx,

  • How to get a HttpServletRequest instance from ApplicationModule ?

    All methods that I use as data actions are located in ApplModuleImpl.java. I need to get an IP address of an user using one of those methods. The problem is that I have to get an instance of HttpServletRequest (which have a getRemoteAddr() method) but I don't know how to do it from Application Module.
    Any ideas ?

    I approached a similar problem by extending the PageController and the ApplicationModule classes for the application (in the ViewController and Model projects respectively). Rather than tie the AppModule directly to the HTTP request object, I extended the PageController subclass to process the request object for specific information needed from it and communicate to the ApplicationModule as needed.
    In the extended PageController subclass, you'll have to import javax.servlet.http.HttpServletRequest and use
    HttpServletRequest request = (HttpServletRequest) context.getEnvironment().getRequest(); to get reference to the request object.
    I extended the ApplicationModule with setter methods to pass information into it from the specific PageController subclasses; the approach keeps the model layer more independent of the web-browser layer (it's not dependent on an HttpServletRequest object), and still allows the AppModule to be used with different UI technologies.
    We also needed to get the custom PageController methods invoked at the right points.
    Edited by: rpalazola on Sep 16, 2008 11:37 AM
    Edited by: rpalazola on Sep 16, 2008 11:44 AM

  • How to use ApplicationModule custom methods in JSP?

    I have an ApplicationModule for which I have defined several custom methods (in the ApplicationModuleImpl class). I wish to invoke these methods from a JSP. I'm having trouble getting a scriptable reference to the application module object in the JSP. I can get data from the view objects using the jbo:xxx data tags, but I can't get any sort of reference to the application module object that would allow me to invoke the methods. I have tried editing the application module to expose the methods as client methods, but still can't get a reference to them.
    My main questions:
    1. Is there a way to invoke the custom methods somewhere between the jbo:ApplicationModule tag and the jbo:ReleasePageResources tag?
    2. Is there a way to declare and use the application module without using the jbo:ApplicationModule tag? Would I ever benefit from doing this?

    Alan, here's how to call a custom method String getSomeInfo() that I've created on my application module, MyModule in this example. Also, in this example the id parameter in the ApplicationModule tag is "am" (<jbo:ApplicationModule id="am"...):
    First, edit your application module. In the app module editor, go to the Client Methods tab and move getSomeInfo into the selected list.
    Next, edit your JSP to call your custom method.
    <% MyModule myAm = (MyModule)am.useApplicationModule(); String someInfo = myAm.getSomeInfo(); %>
    You also have to add the correct import statements to the page tag in your JSP:
    <%@ page contentType="text/html;charset=windows-1252" import="oracle.jbo.*, MyModule.common.*"%>
    Hope this helps
    Blaise

  • Migration to 11.1.2.2 problem, ApplicationModule not found.

    Hi Guys,
    After migrating our existing oracle ADF application from version 11.1.1.3 to the new version 11.1.2.2 we faced the below error on several screens. It seems that for different reasons we are loosing the application module without even having any error in the error log, then afterward whatever we do (ex: query a view that exist in the app module or call a function that exist in the app module or …….) we receive the below error.
    Note that for migration we opened and compiled the code on the version 11.1.1.4 then we went directly to the version 11.1.2.2, this is the certified way from oracle (check the link below)
    [http://www.oracle.com/technetwork/developer-tools/jdev/jdev11gr2-cert-405181.html#Migration]
    So I guess the question is:
    1) did anyone out there face this issue???
    2) Is our migration path wrong???
    3) Does anyone migrated successfully so far????
    Thanks guys,
    Alain.
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Object MasterTablesAppModule of type ApplicationModule is not found.
    oracle.jbo.NoObjException: JBO-25003: Object MasterTablesAppModule of type ApplicationModule is not found.
         at oracle.jbo.server.ApplicationModuleImpl.findViewObject(ApplicationModuleImpl.java:3367)
         at oracle.jbo.server.EntityImpl.fetchExprValueSupplierOverrideRow(EntityImpl.java:611)
         at oracle.jbo.server.EntityImpl$ViewRowRef.getViewRow(EntityImpl.java:13284)
         at oracle.jbo.server.EntityImpl.getExprValueOverrideViewRow(EntityImpl.java:588)
         at oracle.jbo.server.JboMandatoryAttributesValidator.validate(JboMandatoryAttributesValidator.java:102)
         at oracle.jbo.server.EntityDefImpl.validate(EntityDefImpl.java:3095)
         at oracle.jbo.server.EntityCache.validate(EntityCache.java:3613)
         at oracle.jbo.server.EntityImpl.validateEntity(EntityImpl.java:2376)
         at oracle.jbo.server.EntityImpl.validate(EntityImpl.java:2466)
         at oracle.jbo.server.DBTransactionImpl.validate(DBTransactionImpl.java:4541)
         at oracle.adf.model.bc4j.DCJboDataControl.validate(DCJboDataControl.java:1595)
         at oracle.adf.model.binding.DCBindingContainer.validateReferredDataControls(DCBindingContainer.java:4413)
         at oracle.adf.model.binding.DCBindingContainer.validateInputValues(DCBindingContainer.java:4332)
         at oracle.adf.model.binding.DCBindingContainer.validate(DCBindingContainer.java:4264)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.validateModelUpdates(PageLifecycleImpl.java:300)
         at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.validateModelUpdates(FacesPageLifecycle.java:70)
         at oracle.adf.controller.v2.lifecycle.Lifecycle$6.execute(Lifecycle.java:202)
         at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:197)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$600(ADFPhaseListener.java:23)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$3.after(ADFPhaseListener.java:323)
         at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
         at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:444)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Thanks,
    Alain.

    Hi,
    if the application module runs in the tester then you can exclude the business service as the source of the problem. In this case have a look in the DataBindings.cpx file and the view controller project dependencies. E.g. if you added the ADF BC reference as a ADF library, check this library. If you have a project dependency, check this and compile the ADF model sources.
    If this doesn't help, the best recommendation is to work with customer support on how to reproduce this issue
    Frank

  • ApplicationModule get configuration used bc4j.xcfg

    Is there a way to find the bc4j.xcfg file (or its content) used from an applicationModule instance ?
    In bc4j.xcfg file, I put some additionnal attributes values used as application parameters that I use during runtime, but I have to load them !
    Today, I have add in the constructor of the AM the class path to find the bc4j.xcfg file, but I think there is a better way... I hope !
    Thanks
    Rafael.

    John,
    In the DataBindings.cpx i can't find any reference to a datacontrol...
    This is my bindings:
    <?xml version="1.0" encoding="UTF-8" ?>
    <Application xmlns="http://xmlns.oracle.com/adfm/application"
                 version="11.1.1.56.60" id="DataBindings" SeparateXMLFiles="false"
                 Package="be.usermanagementProv.portlets" ClientType="Generic">
      <definitionFactories>
        <factory nameSpace="http://xmlns.oracle.com/adf/controller/binding"
                 className="oracle.adf.controller.internal.binding.TaskFlowBindingDefFactoryImpl"/>
        <dtfactory className="oracle.adf.controller.internal.dtrt.binding.BindingDTObjectFactory"/>
      </definitionFactories>
      <pageMap>
        <page path="/UserManagement/view.jspx"
              usageId="be_usermanagementProv_portlets_viewPageDef"/>
      </pageMap>
      <pageDefinitionUsages>
        <page id="be_usermanagementProv_portlets_viewPageDef"
              path="UserManagement.viewPageDef"/>
      </pageDefinitionUsages>
    </Application>In the datacontrol section when i right click the DC the "edit definition" is grayed out. Probably because the DC comes from the library and is not created in the application.

  • Deploying ApplicationModule as Session Bean

    I am trying to deploy an ApplicationModule as a EJB Session Bean.
    How should I set up the InitialContext if I am testing this using the embedded OC4J in JDeveloper? Should I be using JboContext.PLATFORM_EJB (this is giving me a ClassNotFoundException for AuroraEJBInitialContext) or JboContext.PLATFORM_EJB_IAS? What other fields do I have to set in the environment I pass in when I create the InitialContext?

    Use JboContext.PLATFORM_EJB_IAS.
    env.put(JboContext.INITIAL_CONTEXT_FACTORY,
    JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM,
    JboContext.PLATFORM_EJB_IAS);
    env.put(JboContext.SECURITY_PRINCIPAL, "admin");
    env.put(JboContext.SECURITY_CREDENTIALS, "welcome");
    env.put(JboContext.HOST_NAME, "localhost");
    env.put(JboContext.CONNECTION_PORT, "23891");
    env.put(JboContext.APPLICATION_PATH,
    "application_name");
    Alternatively you can use the Configuration api and use the embedded configuration which reads all these properties from the bc4j.xcfg and creates the appmodule for you. There's a code template (type bc4jclient followed by ctrl-enter) that shows it's usage.
    Dhiraj

  • 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.

  • How can I get a reference to ApplicationModule in a servlet

    I know that I can easily get the reference to my ApplicationModule in any JSP using the tags but I need to use a servlet instead of a JSP.
    Would you please let me know how I can a reference to my ApplicationModule in my Servlet? Every function that I am trying to use has been depricated.
    I appreciate any help.

    The following code will instantiate a module for you...
    public static ApplicationModule getGenericApplicationModule(String sAppModule, String sConnection)
    throws Exception {
    if (am != null)
    return am;
    sName = sAppModule;
    sConn = sConnection;
    Hashtable env = new Hashtable(2);
    env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
    env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
    Context ic = new InitialContext(env);
    ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(sName);
    am = home.create();
    am.getTransaction().connect(sConn);
    return am;
    Problem in a servlet environment is that this is not pooled so you want to use the pool manager like this...
    public static EDMSMgrImpl getPooledApplicationModule(String sPoolName) throws BaseBc4jException
    ApplicationPool aPool = getApplicationPool(sPoolName);
    try
    return (EDMSMgrImpl)aPool.checkout();
    catch (Exception e)
    String message = "Exception checking out pool: "+sPoolName+" : "+e.getMessage();
    LogBroker.getInstance().severe(_instance,message ,e);
    throw new BaseBc4jException(message, e);
    protected static ApplicationPool getApplicationPool(String sPoolName) throws BaseBc4jException
    ApplicationPool aPool = PoolMgr.getInstance().getPool(sPoolName);
    if (aPool == null)
    try
    createPools();
    aPool = PoolMgr.getInstance().getPool(sPoolName);
    catch(IOException ioe)
    String message = "IOException thrown in EDMSAppModuleHelper.createPools" + ioe.getMessage();
    LogBroker.getInstance().severe(_instance,message, ioe);
    throw new BaseBc4jException(message, ioe);
    if (aPool == null)
    String message = "got a null result when getting pool: "+sPoolName;
    BaseBc4jException e = new BaseBc4jException(message);
    LogBroker.getInstance().severe(_instance, message, e);
    throw e;
    return aPool;
    Where a pool is created like this...
    sPoolName = poolElem.getAttribute(POOL_NAME_ATTRIBUTE);
    sAppModule = poolElem.getAttribute(APP_MODULE_ATTRIBUTE);
    sConnection = poolElem.getAttribute(CONNECTION_ATTRIBUTE);
    stateFull = poolElem.getAttribute(STATEFULL_ATTRIBUTE);
    sClass = getPoolClass(poolElem);
    if(PoolMgr.getInstance().getPool(sPoolName) == null) {
    Hashtable info = new Hashtable();
    info.put(JboContext.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
    info.put(JboContext.DEPLOY_PLATFORM, "LOCAL");
    info.put("IsStateLessRuntime", stateFull);
    PoolMgr.getInstance().createPool(sPoolName, sClass, sAppModule , sConnection, info);

  • Undoing changes in ApplicationModule

    Hello,
    I want to set restore points for the changes in ApplicationModules. E.g. I've got a main screen and second dialog that runs in the same binding context as the main screen. Before I open the second dialog I want to set a restore point so that I am able to undo all changes that were made in the second dialog (but only if it is necessary).
    To achieve this I use AppModule.passivateStateForUndo() to create the restore point and AppModule.activateStateForUndo() for the restoring. At the first clance this works es expected. But now I found several errors.
    I use Master-Detail relation to set Country/District for a Person. After calling activateStateForUndo() this relation is broken. I haven't found out what is wrong but as soon as you try to change the District (which is Detail) the country (which is Master) changes to the first value. But this is only a minor error compared to the other I've found.
    The main screen consists of several panels (where only one at a time is shown). For the sake of perforkmance I don't initial all at the startup but only when they should get visible. When a panel should be initialized after a activateStateForUndo() I'll get a JBO-27122 Exception. It seems that some bind variables that are used for initialization have a wrong value.
    I've already found http://radio.weblogs.com/0118231/stories/2005/09/06/whyDoesActivestateforundoPerformARollback.html. But somehow I don't see a link between the rollback and the JBO-27122 Exception.
    Had anybody the same problem like me? Or at least a good hint?
    regards
    Jörg

    Can I reproduce a bug that we should fix, then, with a ReadOnly VO with passivation enabled, and a call to passivateStateForUndo/activateStateForUndo?

  • How to create ApplicationModule inside Thread!

    I would like to create an ApplicationModule object inside Thread! When I create an ApplicationModule anywhere else in class it works fine with no problem.
    But when I put ApplicationModule am = Configuration.createRootApplicationModule("",""); inside Thread (...in Run() method ) It throws the error:
    oracle.jbo.JboException: JBO-33001: Cannot find the configuration file /package/model/common/bc4j.xcfg in the classpath at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:358)
         at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:281)
         at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:482)
         at oracle.jbo.common.ampool.ContextPoolManager.findPool(ContextPoolManager.java:165)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1457)
         at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1435)
         at hrm.edc.model.pripravaPodatkov.ZajemPodatkov.run(ZajemPodatkov.java:56)
         at java.lang.Thread.run(Thread.java:534)
    If Anyone have a solution please help!
    Thanks!

    Cannot find the configuration file /package/model/common/bc4j.xcfg in the classpath
    In the client/view project set a dependency to the BC4J project.

Maybe you are looking for

  • HELP! File Upload Servlet and Internet Explorer

    Hello people. I hope this is an easy problem to solve... I have a servlet upload program that works using Mozilla browser (www.mozilla.org), but for some reason it doesn't work using Microsoft IE. The servlet is also using the servlet upload API from

  • New Laptop / iPod.

    I recently purchased a copy of Windows 7 and have loaded it onto my old Dell Laptop. I oriogonally had a 32GB iPod touch, but it was stolen and now have a new 64GB Model. My question is, I had hundreds of Apps / songs that I had purchased from the iT

  • Ever used the Designer Table API (TAPI) with object type in the DB?

    Hi all, We are trying to generate the Oracle Designer table API of a table that has a column defined by an object type. It works without problems if that column always has a value (is instantiated in object term). The problem is when we update a row

  • How can i understand all the functions provided in the measurement studio for visual c++?

    Hoew do i choose the AppWizard wich ensure i have the correct header files, libraries...? What is th eMFC ClassWizard use for? How can i more understand all the functions provided in this software?

  • Call normal report or xml report in OAF Page

    Hi, I'm in need to learn OAF in short time. So i need to know how to call a report or xml report in OAF page. Please explain me how to do this or give any good website URL. thanks in advance, SAN