BC4J pooling sample

Hi, I am trying to get an application module from the Web context (without using data bindings). Searching through this forum I found the following message:
" An alternative approach that would provide tighter integration with the web container is to use the HttpContainer to acquire a SessionCookie and to then use that SessionCookie to acquire/release an AM. This approach is documented in the BC4J pooling sample that should be available here on OTN. "
Does anyone knows where I can find that document ?
Thanks in advance.

If you download the 9.0.4 JDeveloper release from:
http://www.oracle.com/technology/software/products/jdev/index.html
the sample is included in there in the ./BC4J/samples/Pooling directory.

Similar Messages

  • BC4J Hotel Sample Works on CORBA/EJB ??

    HI, JDev Folks,
    I am debugging the BC4J with CORBA and EJB. And I download the BC4J Hotel Sample from the OTN web under the Jdeveloper/Sample Codes folder. I got the error in the client file BC4JHotelSample.java at
    public ApplicationModule createRootCORBAAppModule(String sessionDefName) {
    Hashtable env = new Hashtable(10);
    javax.naming.Context ic = new InitialContext(env);
    and the error is :
    Successfully loaded properties file using: getResourceAsStream("/oracle/jbo/common/Diagnostic.properties");
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Error = javax.naming.NameNotFoundException: Nothing bound for specified name [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound]
    But if ran it under LOCAL, everythin is OK. Not under EJB/CORBA.
    Anybody happened make it works, please be advised. Thanks!
    Mike
    null

    Hi, ROBERT,
    I deployed the CORBA as guide by the Hotel Sample instruction. and I just created the JDBC and IIOP connection which both are OK by test. To be more convinced, I attached the code from deployment of CORBA for the it.
    ============================================
    *** Executing deployment profile C:\Program Files\Oracle\JDeveloper 3.2\myprojects\BC4JSample\bcdeploy\BC4JHRSBcO8.prf ***
    *** Generating archive file C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSBcO8.jar ***
    Compiling the project...done
    Validating the profile...done
    Initializing deployment...done
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    *** Archive generation completed ***
    *** Loading the CORBA classes into 8i JVM using JDBC ***
    Load Java argument list:
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw"
    "-DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin"
    -classpath
    "C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbojdbcpatch.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodomorcl.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodatum12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDe
    eloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbomt.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboejb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Or
    cle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboo8i.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbotester.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbocmp.zip;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar"
    oracle.aurora.server.tools.loadjava.LoadJavaMain
    -user
    travel/travel@localhost:1521:test
    -thin
    -verbose
    -resolve
    "C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSBcO8.jar"
    initialization complete
    identical: META-INF/MANIFEST.MF is unchanged from previously loaded file
    loading : connections.properties
    creating : connections.properties
    resolver :
    *** CORBA classes load completed ***
    *** Publishing the CORBA object in 8i JVM ***
    Publish CORBA Object argument list:
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw"
    "-DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin"
    -classpath
    "C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbojdbcpatch.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodomorcl.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodatum12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDe
    eloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbomt.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboejb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Or
    cle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboo8i.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbotester.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbocmp.zip;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar"
    oracle.aurora.namespace.shell.ShellClient
    -command
    publish /test/travel/$DefaultAppModule oracle.jbo.server.remote.corba.aurora.AuroraApplicationModule oracle.jbo.common.remote.corba.RemoteApplicationModuleHomeHelper -republish
    -user
    travel
    -password
    travel
    -service
    sess_iiop://localhost:2482:test
    *** 8i JVM CORBA publishing completed ***
    *** Deployment completed ***
    *** Executing deployment profile C:\Program Files\Oracle\JDeveloper 3.2\myprojects\BC4JSample\bcdeploy\BC4JHRS1.prf ***
    *** Generating archive file C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRS1.jar ***
    Compiling the project...done
    Validating the profile...done
    Initializing deployment...done
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    *** Archive generation completed ***
    *** Executing deployment profile C:\Program Files\Oracle\JDeveloper 3.2\myprojects\BC4JSample\bcdeploy\BC4JHRSCommonO81.prf ***
    *** Generating archive file C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSCommonO81.jar ***
    Compiling the project...done
    Validating the profile...done
    Initializing deployment...done
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    *** Archive generation completed ***
    *** Executing deployment profile C:\Program Files\Oracle\JDeveloper 3.2\myprojects\BC4JSample\bcdeploy\AppModuleServerO81.prf ***
    *** Generating archive file C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\AppModuleServerO81.jar ***
    Compiling the project...done
    Validating the profile...done
    Initializing deployment...done
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    *** Archive generation completed ***
    *** Loading archive C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSCommonO81.jar,C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRS1.jar into 8i JVM using JDBC ***
    Load Java argument list:
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw"
    "-DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin"
    -classpath
    "C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbojdbcpatch.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodomorcl.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodatum12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDe
    eloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbomt.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboejb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Or
    cle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboo8i.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbotester.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbocmp.zip;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar"
    oracle.aurora.server.tools.loadjava.LoadJavaMain
    -user
    travel/travel@localhost:1521:test
    -thin
    -verbose
    -resolve
    "C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSCommonO81.jar"
    "C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRS1.jar"
    initialization complete
    loading : META-INF/MANIFEST.MF
    creating : META-INF/MANIFEST.MF
    loading : connections.properties
    creating : connections.properties
    identical: BC4JHRS/common/bc4j.xcfg is unchanged from previously loaded file
    identical: BC4JHRS/HotelsImpl is unchanged from previously loaded file
    identical: BC4JHRS/Available_Room_Types_ViewImpl is unchanged from previously loaded file
    identical: BC4JHRS/Hotel_Facilities_ViewImpl is unchanged from previously loaded file
    identical: BC4JHRS/FaxNo is unchanged from previously loaded file
    identical: BC4JHRS/WebURL is unchanged from previously loaded file
    identical: BC4JHRS/AppModuleImpl is unchanged from previously loaded file
    identical: BC4JHRS/CitiesImpl is unchanged from previously loaded file
    identical: BC4JHRS/CountriesImpl is unchanged from previously loaded file
    identical: BC4JHRS/AvailableRoomTypesImpl is unchanged from previously loaded file
    identical: BC4JHRS/PhoneNo is unchanged from previously loaded file
    identical: BC4JHRS/Room_Availability_ViewImpl is unchanged from previously loaded file
    identical: BC4JHRS/Exchange_Rate_Updation_ViewImpl is unchanged from previously loaded file
    identical: BC4JHRS/RoomAvailabilityImpl is unchanged from previously loaded file
    identical: BC4JHRS/Hotel_Bookings_ViewImpl is unchanged from previously loaded file
    identical: BC4JHRS/HotelFacilitiesImpl is unchanged from previously loaded file
    identical: BC4JHRS/ExchangeRatesImpl is unchanged from previously loaded file
    identical: BC4JHRS/HotelBookingsImpl is unchanged from previously loaded file
    identical: BC4JHRS/Hotel_Info_ViewImpl is unchanged from previously loaded file
    loading : META-INF/MANIFEST.MF
    creating : META-INF/MANIFEST.MF
    identical: BC4JHRS/HotelBookings.xml is unchanged from previously loaded file
    identical: BC4JHRS/AvailableRoomTypes.xml is unchanged from previously loaded file
    identical: BC4JHRS/ExrConFkAssoc.xml is unchanged from previously loaded file
    identical: BC4JHRS/PhoneNo.xml is unchanged from previously loaded file
    identical: BC4JHRS/RavHotFkAssoc.xml is unchanged from previously loaded file
    identical: BC4JHRS/HotelBookingsVL.xml is unchanged from previously loaded file
    identical: BC4JHRS/ArtHotFkAssoc.xml is unchanged from previously loaded file
    identical: BC4JHRS/BC4JHRS.xml is unchanged from previously loaded file
    identical: BC4JHRS/Hotel_Info_View.xml is unchanged from previously loaded file
    identical: BC4JHRS/HtfHotFkAssoc.xml is unchanged from previously loaded file
    identical: BC4JHRS/HotelFacilitiesVL.xml is unchanged from previously loaded file
    identical: BC4JHRS/Cities.xml is unchanged from previously loaded file
    identical: BC4JHRS/FaxNo.xml is unchanged from previously loaded file
    identical: BC4JHRS/Room_Availability_View.xml is unchanged from previously loaded file
    identical: BC4JHRS/Hotel_Facilities_View.xml is unchanged from previously loaded file
    identical: BC4JHRS/ArtVL.xml is unchanged from previously loaded file
    identical: BC4JHRS/RavVL.xml is unchanged from previously loaded file
    identical: BC4JHRS/CtyConFkAssoc.xml is unchanged from previously loaded file
    identical: BC4JHRS/WebURL.xml is unchanged from previously loaded file
    loading : BC4JHRS/AppModule.xml
    creating : BC4JHRS/AppModule.xml
    identical: BC4JHRS/BC4JHRS.jpx is unchanged from previously loaded file
    identical: BC4JHRS/ExchangeRates.xml is unchanged from previously loaded file
    loading : connections.properties
    creating : connections.properties
    identical: BC4JHRS/Hotels.xml is unchanged from previously loaded file
    identical: BC4JHRS/Available_Room_Types_View.xml is unchanged from previously loaded file
    identical: BC4JHRS/HotelFacilities.xml is unchanged from previously loaded file
    identical: BC4JHRS/RoomAvailability.xml is unchanged from previously loaded file
    identical: BC4JHRS/Countries.xml is unchanged from previously loaded file
    identical: BC4JHRS/ExrConFk2Assoc.xml is unchanged from previously loaded file
    identical: BC4JHRS/HobHotFkAssoc.xml is unchanged from previously loaded file
    identical: BC4JHRS/Exchange_Rate_Updation_View.xml is unchanged from previously loaded file
    identical: BC4JHRS/Hotel_Bookings_View.xml is unchanged from previously loaded file
    resolver :
    skipping : BC4JHRS/HotelsImpl is already resolved
    skipping : BC4JHRS/Available_Room_Types_ViewImpl is already resolved
    skipping : BC4JHRS/Hotel_Facilities_ViewImpl is already resolved
    skipping : BC4JHRS/FaxNo is already resolved
    skipping : BC4JHRS/WebURL is already resolved
    skipping : BC4JHRS/AppModuleImpl is already resolved
    skipping : BC4JHRS/CitiesImpl is already resolved
    skipping : BC4JHRS/CountriesImpl is already resolved
    skipping : BC4JHRS/AvailableRoomTypesImpl is already resolved
    skipping : BC4JHRS/PhoneNo is already resolved
    skipping : BC4JHRS/Room_Availability_ViewImpl is already resolved
    skipping : BC4JHRS/Exchange_Rate_Updation_ViewImpl is already resolved
    skipping : BC4JHRS/RoomAvailabilityImpl is already resolved
    skipping : BC4JHRS/Hotel_Bookings_ViewImpl is already resolved
    skipping : BC4JHRS/HotelFacilitiesImpl is already resolved
    skipping : BC4JHRS/ExchangeRatesImpl is already resolved
    skipping : BC4JHRS/HotelBookingsImpl is already resolved
    skipping : BC4JHRS/Hotel_Info_ViewImpl is already resolved
    *** Archive load completed ***
    *** Loading the CORBA classes into 8i JVM using JDBC ***
    Load Java argument list:
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw"
    "-DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin"
    -classpath
    "C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbojdbcpatch.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodomorcl.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodatum12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDe
    eloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbomt.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboejb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Or
    cle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboo8i.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbotester.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbocmp.zip;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar"
    oracle.aurora.server.tools.loadjava.LoadJavaMain
    -user
    travel/travel@localhost:1521:test
    -thin
    -verbose
    -resolve
    "C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\AppModuleServerO81.jar"
    initialization complete
    loading : BC4JHRS/server/o8/AppModuleServerO8
    creating : BC4JHRS/server/o8/AppModuleServerO8
    loading : META-INF/MANIFEST.MF
    creating : META-INF/MANIFEST.MF
    loading : connections.properties
    creating : connections.properties
    resolver :
    resolving: BC4JHRS/server/o8/AppModuleServerO8
    *** CORBA classes load completed ***
    *** Publishing the CORBA object in 8i JVM ***
    Publish CORBA Object argument list:
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw"
    "-DPATH=C:\Program Files\Oracle\JDeveloper 3.2\bin;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin"
    -classpath
    "C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbojdbcpatch.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodomorcl.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodatum12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDe
    eloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbomt.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboejb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax-ssl-1_2.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\jasper.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjtools.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbj30ssl.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora.zip;C:\Program Files\Oracle\JDeveloper 3.2\sqlj\lib\translator.zip;C:\Program Files\Or
    cle\JDeveloper 3.2\sqlj\lib\runtime.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\mts.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboo8i.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbotester.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbocmp.zip;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar"
    oracle.aurora.namespace.shell.ShellClient
    -command
    publish /test/travel/BC4JHRS.AppModule BC4JHRS.server.o8.AppModuleServerO8 oracle.jbo.common.remote.corba.RemoteApplicationModuleHomeHelper -republish
    -user
    travel
    -password
    travel
    -service
    sess_iiop://localhost:2482:test
    *** 8i JVM CORBA publishing completed ***
    *** Deployment completed ***
    =============================================
    Then I created the library called BC4JHRSCommon8i to the created jar files to it. and attached it to the client program BC4JJavaClient.jpr. In the meantime to change the Run/Debug status to CORBA NOT LOCAL. then I rebuild and run the test program. then I got the error:
    =================================
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw.exe" -mx50m -classpath "C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremoteejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\javax_ejb.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboejb.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbomt.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbodomorcl.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\xmlparserv2.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDeveloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSCommonO8.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\AppModuleServerO8.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRS.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\AppModuleServerO81.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRS1.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSBcO8.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BC4JHRSCommonO81.jar;C:\Program Files\Oracle\JDeveloper 3.2\Program Files\Oracle\JDeveloper 3.0\myclasses\BcO8.jar;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar" BC4JJavaClient.BC4JHotelSample CORBA
    Successfully loaded properties file using: getResourceAsStream("/oracle/jbo/common/Diagnostic.properties");
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    Error = javax.naming.NamingException: oracle.jbo.client.remote.corba.aurora.AuroraInitialContext [Root exception is java.lang.ClassNotFoundException: oracle.jbo.client.remote.corba.aurora.AuroraInitialContext]
    =======================================
    I did all those step by step by the guidance. My enviornment is JDEV3.2, ORA8.1.7
    on WIN2000.
    Also I did NOT find the Sample Codes Forum in the discussion forum? Any comments about error. BY the way If I created a BC4J from scratch, I did not have the error above But I got another error when I ran the client. It is clearly linked to my BC4J CORBA. I also attached the error and the debug msg below.
    ========================================
    "C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw.exe" -mx50m -classpath "C:\Program Files\Oracle\JDeveloper 3.2\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;C:\Program Files\Oracle\JDeveloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboremote.zip;C:\Program Files\Oracle\JDeveloper 3.2\lib\jbo8iclient.zip;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\aurora_client.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjorb.jar;C:\Program Files\Oracle\JDeveloper 3.2\aurora\lib\vbjapp.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jndi.jar;C:\Program Files\Oracle\JDeveloper 3.2\lib\jboo8i.zip;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BC4JDemoCommonO82.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BC4JDemo3.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BC4JDemoBcO8.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BC4JDemoModuleServerO82.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BcO81.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BC4JDemoCommonO81.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BC4JDemoModuleServerO81.jar;C:\Program Files\Oracle\JDeveloper 3.2\myclasses\BC4JDemoCommonO8.jar;C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar" BC4JDemo.BC4J_8iCorba_Test CORBA
    In the EVN0: test
    Successfully loaded properties file using: getResourceAsStream("/oracle/jbo/common/Diagnostic.properties");
    Diagnostics: Silencing all diagnostic output (use -Djbo.debugoutput=console to see it)
    In the EVN1: javax.naming.InitialContext@16e2
    In the EVN2: test HOME = : oracle.jbo.client.remote.corba.aurora.AuroraApplicationModuleHome@480c
    In the EVN3: BC4JDemoModule
    In the EVN4: jdbc:oracle:kprb:
    In the EVN5: oracle.jbo.client.remote.ViewUsageImpl@32ad
    In the EVN51: 8
    In the EVN52: null
    In the EVN53: BC4JDemo.DeptView
    In the EVN54: SELECT Dept.DEPTNO, Dept.DNAME, Dept.LOC FROM DEPT Dept
    In the EVN55: -1
    In the EVN56: 4
    In the EVN57: DeptView
    In the EVN58: 3
    In the EVN59: 2
    In the getDetailRowSets: [Loracle.jbo.RowSet;@3d34
    In the EVN51: -1
    In the getViewObject: DeptView
    oracle.jbo.PiggybackException: JBO-28300: Piggyback read error
    void oracle.jbo.client.remote.ApplicationModuleImpl.processPiggyback(byte[])
    int oracle.jbo.client.remote.ApplicationModuleImpl.syncIterator(int, int, int, boolean, boolean)
    int oracle.jbo.client.remote.RowSetIteratorImpl.syncIterator(int, int, boolean)
    oracle.jbo.Row oracle.jbo.client.remote.RowSetIteratorImpl.first()
    oracle.jbo.Row oracle.jbo.client.remote.RowSetImpl.first()
    oracle.jbo.Row oracle.jbo.client.remote.ViewUsageImpl.first()
    void BC4JDemo.BC4J_8iCorba_Test.main(java.lang.String[])
    ## Detail 0 ##
    java.lang.ClassNotFoundException: oracle.jbo.domain.Number
    void oracle.jbo.client.remote.ApplicationModuleImpl.processPiggyback(byte[])
    int oracle.jbo.client.remote.ApplicationModuleImpl.syncIterator(int, int, int, boolean, boolean)
    int oracle.jbo.client.remote.RowSetIteratorImpl.syncIterator(int, int, boolean)
    oracle.jbo.Row oracle.jbo.client.remote.RowSetIteratorImpl.first()
    oracle.jbo.Row oracle.jbo.client.remote.RowSetImpl.first()
    oracle.jbo.Row oracle.jbo.client.remote.ViewUsageImpl.first()
    void BC4JDemo.BC4J_8iCorba_Test.main(java.lang.String[])
    In the EVN8: oracle.jbo.PiggybackException: JBO-28300: Piggyback read error
    JBO-28300: Piggyback read error
    =========================================
    All the lines withe "In the ENV*" are my debug msg, you can ingore them. But the msg come from ObjectView e.g. ObjectView deptVo=appMod.findViewObject("DeptView");
    deptVo.first();
    The mothods first(), next(), last(), ... etc are list in the view. But as soon as I called it. I got the "JBO-28300: Piggyback read error". JBO-28300 even not list in the help guidance. I did not know why this bug come from? It at least should listed in the help of JDEV3.2 doc and give me more explaintion what it goes wrong. If you met those problem before, please post here how to fix it. Thanks!
    MIke

  • No. Of Pooled Samples in QPV2

    Hi Experts,
    One of the required scenario for no. of pooled samples is:
    If No. of Containers is < 81 , No. of Pooled Samples is 1
    If No. of containers is  81 or above ,  No. of Pooled Samples is 2
    How to set this in system. I am not able to put any if statement in Formula field in QPV2 (Pooled Samples TAB)
    Thanks in Advance
    Junaid

    Whenever I've had this problem, it was due to my Hard Disk going into "energy saving mode" and needed time to rev up. Thus only the part of the EXS instrument thats loaded in RAM will play. There are two things you can try:
    1. Make sure your energy preferences are set so your hard disk NEVER goes to sleep. Note this setting does NOT work for external HD's, so if you have your samples on an external HD move them to an internal drive and see if that fixes your problem.
    2. Turn off Virtual memory preference in the options menu of the EXS player. Its my understanding that with this turned off, all samples will be loaded into RAM, and thus your HD will not be a problem.
    Hope this helps!

  • Primary and pooled samples

    Hi all,
    I posted a similar question before about the sampling procedure. But the request has been changed a bit. My client takes samples depending on the number of containers, lets call this the primary samples. The lab does not do the analysis on the primary samples, but they create pooled samples. They combine 5 primary samples to 1 pooled sample. They will do the analysis on this pooled sample. But they need labels for all the primary samples.
    An example. They receive 10 boxes, so 10 samples need to be created. The lab will create 2 pooled samples (10 / 5 = 2). So when enter results recording only the two primary samples need to be visible for the inspection lot, not all of the primary samples. How can this be done?
    Thanks for your help.

    Generally the when you create sampling drawing procedure with Primary & pooled samples both then the number of samples are created as per the "Pooled" sample defined.This is what std SAP.
    I don't understand what you mean by this...
    I think i already found the solution. I configured the sample drawing proc as follows:
    - Primary sample acc to formula TRUNC(SQRT(P2)+1)
    - Pooled sample acc to formula TRUNC(P3/5)
    The procedures is dependend on the number of containers.
    Edited by: Maarten_m4 on Aug 17, 2010 2:49 PM

  • How to compile connection pool sample java code

    I recently bought David Knox's "Effective Oracle Database 10g Security by Design", and have been working through his examples with client identifiers and how to leverage database security with anonymous connection pools.
    The database side of things I totally understand and have set up, but I now want to compile/run the java code examples, but don't know what is required to compile this.
    I'm running Oracle 10.2.0.4 (64-bit) Enterprise Edition on a Linux (RHEL 5) PC. Java version is 1.6.0_20. Relevant .bash_profile environment variables are as follows:
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
    export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
    When I try to compile, I get:
    oracle:DB10204$ java FastConnect.java
    Exception in thread "main" java.lang.NoClassDefFoundError: FastConnect/java
    Caused by: java.lang.ClassNotFoundException: FastConnect.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: FastConnect.java. Program will exit.
    The java source code of one of the examples is below. Is someone able to point me in the right direction as to how I get this to compile? Do I just have a syntax and/or environment configuration modification to do, or is there more to it than that to get this example working? Any help much appreciated.
    oracle:DB10204$   cat FastConnect.java
    package OSBD;
    import java.sql.*;
    import oracle.jdbc.pool.OracleDataSource;
    public class FastConnect
      public static void main(String[] args)
        long connectTime=0, connectionStart=0, connectionStop=0;
        long connectTime2=0, connectionStart2=0, connectionStop2=0;
        ConnMgr cm = new ConnMgr();
        // time first connection. This connection initializes pool.
        connectionStart = System.currentTimeMillis();
        Connection conn = cm.getConnection("SCOTT");
        connectionStop = System.currentTimeMillis();
        String query = "select ename, job, sal from person_view";
        try {
          // show security by querying from View
          Statement stmt = conn.createStatement();
          ResultSet rset = stmt.executeQuery(query);
          while (rset.next()) {
            System.out.println("Name:   " + rset.getString(1));
            System.out.println("Job:    " + rset.getString(2));
            System.out.println("Salary: " + rset.getString(3));
          stmt.close();
          rset.close();
          // close the connection which resets the database session
          cm.closeConnection(conn);
          // time subsequent connection as different user
          connectionStart2 = System.currentTimeMillis();
          conn = cm.getConnection("KING");
          connectionStop2 = System.currentTimeMillis();
          // ensure database can distinguish this new user
          stmt = conn.createStatement();
          rset = stmt.executeQuery(query);
          while (rset.next()) {
            System.out.println("Name:   " + rset.getString(1));
            System.out.println("Job:    " + rset.getString(2));
            System.out.println("Salary: " + rset.getString(3));
          stmt.close();
          rset.close();
          cm.closeConnection(conn);
        } catch (Exception e)    { System.out.println(e.toString()); }
        // print timing results
        connectTime = (connectionStop - connectionStart);
        System.out.println("Connection time for Pool: " + connectTime + " ms.");
        connectTime2 = (connectionStop2 - connectionStart2);
        System.out.println("Subsequent connection time: " +
                            connectTime2 + " ms.");
    }Code download is at: http://www.mhprofessional.com/getpage.php?c=oraclepress_downloads.php&cat=4222
    I'm looking at Chapter 6.

    stuartu wrote:
    When I try to compile, I get:
    oracle:DB10204$  java FastConnect.java
    Exception in thread "main" java.lang.NoClassDefFoundError: FastConnect/java
    Caused by: java.lang.ClassNotFoundException: FastConnect.java
    I will try to explain what is happening here.
    You are launching java telling it to run a class named 'java' in a package named 'FastConnect'
    and java says it cannot find that class.
    What you intended to do:
    $ # make the directory structure match the package structure
    $ mkdir OSBD
    $ # move the source file in the directory structure so it matches the package structure
    $ mv FastConnect.java OSBD/
    $ # compile OSBD/FastConnect.java to OSBD/FastConnect.class
    $ javac OSBD/FastConnect.java
    $ # launch java using the OSBD/FastConnect class
    $ java -cp . OSBD.FastConnectNote that the package 'OSBD' does not follow the recommended naming conventions
    you might consider changing that to 'osbd'.

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

  • BC4J Connection Pooling issue

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

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

  • How to achieve BC4J stateful management in a web app?

    I have a web application developed with JSP, Struts as the view / controller layer and BC4J as the model layer.
    I am not using the complete ADF framework. Just plain struts, JSP and BC4J.
    What I want to do is to have one struts action to set a
    query condition on a view object and execute the query.
    Then i release the application module. In another struts action I want to get the same application module with the
    viewobject query set.
    Pseudo for Action 1:
    try{
    Configuration.createRootApplicationModule("test.bc.AppModule", "AppModuleLocal");
    .. get view object
    .. build and perform the query on the view object.
    finally
    Configuration.releaseRootApplicationModule(am, true);
    pseudo for action2:
    try{
    Configuration.createRootApplicationModule("test.bc.AppModule", "AppModuleLocal");
    .. get view object with the query stored
    .. use the results.
    finally
    Configuration.releaseRootApplicationModule(am, true);
    I cannot make this work. If I put the am from action1 in the session object and retrieves it from the session in action2 it works. But I need to release the appmodule in action 1 since I have no guarantees that the user will run action2..
    I have read the paper of Steve Muench "Understanding Application Module Pooling Concepts and: Configuration Parameters"
    This document says:
    "ADF application modules provides the ability to snapshot and reactivate their pending state to XML (stored on the file system or in the database), and the ADF application module pooling mechanism leverages this capability to deliver a "managed state" option to web application developers that simplifies building applications like the example just given.
    As a performance optimization, when an instance of an AM is returned to the pool in "managed state" mode, the pool keeps track that the AM is referenced by that particular session. The AM instance is still in the pool and available for use, but it would prefer to be used by the same session that was using it last time because maintaining this so-called "session affinity" improves performance.
    I have set my bc4j configurations to
    releasmode = STATEFUL
    jbo.passivationstore = databse
    jbo.server.internal_connection= my jdbc connection
    But the appmodule returned in action2 is not the same as the one returned in action1.
    I am using jdev 9052 and deploying to oc4j 904 standalone.
    I guess I have to use som other commands for retrieving/ releasing the AM or set some properties on it, but I have not found any documentation for this.
    Any tips on how to achieve this bc4j session state to work in a plain struts , bc4j environment is appreciated.

    The Configuration.createRootApplicationModule() and companion releaseRootApplicationModule() API's are not for use in web applications. They are designed for use by simple command-line console programs.
    Using the BC4J application module pool programmatically in a web environment should be done like the JDeveloper 9.0.3/9.0.4 "Pooling" sample illustrates.
    In the JDev 9.0.3 or 9.0.4 version, see the sample project under ./BC4J/samples/Pooling
    Hope this helps.

  • Am i on the right track for establishing my client connection with BC4J?

    I am developing web-application with BC4J JSP project now. However, I find the auto-generated page not that useful as they are not flexible enough. Then, I decided to write coding by myself. But the first problem is - how to write the coding for client connection? To make maintenance easy, I would like to place those connection code in a class file instead of hard-coding each connection details in my JSP or Servlet page.
    Question 1: Through the examples I search in my JDeveloper (Candidate 2) directory, found a file TestClient.java in the \BC4J\samples\Caching\src\demo directory with the following codes:
    // Create an instance of the application module by name, using local mode
    String _am  = "demo.DemoModule"; // Fully-qualified application module name
    String _cf  = "DemoModuleLocal"; // Configuration name for connection info
    ApplicationModule am = Configuration.createRootApplicationModule(_am,_cf);
    // Find the Managers view object by name in the application module
    ViewObject mgrVO = am.findViewObject("Managers");
    // We're done with the AM instance, so release it
    Configuration.releaseRootApplicationModule(am,true);
    Is it for testing only or really useful for the production environment? Am I doing the right thing if i use such method to establish my web client connection? What's the pros and cons for using this method? Any other better alternatives?
    Question 2: As I know BC4J automatically takes care of connection pooling as a default manner since version 3.2. Can I still use the following statement
    session.setAttribute("user_name", user_name); //Set session attribute
    String user_name = (String) session.getAttribute(user_name); // Get session attribute
    to capture and assign client session correctly for individual clients?
    Question 3: What codes should I use to achieve 'Transaction' update, which assembles the coding as follows:
    Connection.setAutoCommit(false); //disable auto commit
    connection.commit();
    connection.rollback();
    connection.close();
    Thanks for answering!!!

    Question 1: Through the examples I search in my JDeveloper (Candidate 2) directory, found a file TestClient.java in the \BC4J\samples\Caching\src\demo directory with the following codes:
    // Create an instance of the application module by name, using local mode
    String _am  = "demo.DemoModule"; // Fully-qualified application module name
    String _cf  = "DemoModuleLocal"; // Configuration name for connection info
    ApplicationModule am = Configuration.createRootApplicationModule(_am,_cf);
    // Find the Managers view object by name in the application module
    ViewObject mgrVO = am.findViewObject("Managers");
    // We're done with the AM instance, so release it
    Configuration.releaseRootApplicationModule(am,true);
    Is it for testing only or really useful for the production environment? Am I doing the right thing if i use such method to establish my web client connection? What's the pros and cons for using this method? Any other better alternatives?The Configuration API (createRootApplicationModule, releaseRootApplicationModule) will work. However, please note
    that it is intended for java clients that will hold an ApplicationModule reference for a long duration. The BC4J web
    frameworks (represented, for example, by the ApplicationModule and ReleasePageResources tags) all use the
    SessionCookie interface to acquire/release ApplicationModule instances on a per request basis. This will allow
    better scalability. Please see the pooling sample / documentation / javadoc for more information about using these
    APIs. The pooling sample servlet is located in \BC4J\samples\Pooling\src\demo\TestPoolServlet.
    Question 2: As I know BC4J automatically takes care of connection pooling as a default manner since version 3.2. Can I still use the following statement
    session.setAttribute("user_name", user_name); //Set session attribute
    String user_name = (String) session.getAttribute(user_name); // Get session attribute
    to capture and assign client session correctly for individual clients?BC4J will not interfere with your use of the HttpSession context. How do you intend the "user_name" to be used? Do
    you intend it to represent the DB user, JAAS user, etc. If you intend it to be used as the DB user you will need to declare
    the "user_name" to BC4J. Please see:
    http://technet.oracle.com/products/jdev/howtos/bc4j/howto_dynamic_jdbc.html
    Question 3: What codes should I use to achieve 'Transaction' update, which assembles the coding as follows:
    Connection.setAutoCommit(false); //disable auto commit
    connection.commit();
    connection.rollback();
    connection.close();ApplicationModule.getTransaction().commit();
    ApplicationModule.getTransaction().rollback();
    If you are using the Configuration or SessionCookie APIs, as mentioned above, then the connection lifecycle will be
    managed for you. So, you should not need to invoke connection.close().
    Thanks for answering!!!
    Hope this helps.
    JR

  • Sampling procedure-Square root n+1

    Hi All,
    I need to calculate the sample size based on the Containers & Square  root n+1.
    How to configure the system & how to maintain the master data to get the sample size.
    User also insisted only the sample size has to be calculated, but he will enter only one composite result entry
    Regards
    Subbu

    Hi Subbu,
    you can use Physical Sample to control the sample Size.
    You must to define a Sample Drawing Procedure (QPV2) as relevant for Container Number, then assign the formula 'Square Root n1´ ( TRUNC(SQRT(P2)1) ) in the partial sample. In this scenario, I suggest you to configure the "Container number' as a mandatory field during the goods receipt once the system will need this information to calculate the sample. For a single result recording, you can define a pooled sample.
    I hope it can help you.
    Best regards,
    Robson

  • Creating a BC4J EO Based on Stored Proc w/DB assigned PK using Seq/Trigge

    BC4J Code-o-philes;
    Using Steven Muench article "Creating a BC4J Entity Object Based on Stored Procedures" (HOWTO: Basing BC4J Entity on Stored Procedure as a starting point, I would like to modify that example to use a Stored Procedure where the Primary Keys of the Department Table are assigned by a DB Sequence/Before trigger. I already have the stored procedure and sequence/trigger working fine in SQL*Plus.
    The assumption I have is that code below needs to be modified, but I'm not sure exactly what need to be done to retreive the DB assigned PK.
    Lastly, I think that JDeveloper should be doing this automatically, maybe next release?
    Bill G...
    void handleStoredProcInsert() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN hr.do_insert(?,?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    /* st.setLong(1,getDepartmentId().longValue()); */
    st.registerOutParameter(3,Types.NUMERIC);
    if (getDepartmentName() != null) {
    st.setString(1,getDepartmentName());
    else {
    st.setNull(1,Types.VARCHAR);
    if (getLocationId() != null) {
    st.setLong(2,getLocationId().longValue());
    else {
    st.setNull(2,Types.VARCHAR);
    int rows = st.executeUpdate();
    Long newId = new Long(st.getLong(3));
    populateAttributeAsChanged(DEPARTMENTID, new DBSequence(newId));
    catch (SQLException s) {
    throw new JboException(s);
    finally {
    try {
    if (st != null) st.close();
    catch (SQLException s) { /* ignore */}

    ARGHHHHHHHHHHHHHH!
    I've change the line
    st.setLong(1,getDepartmentId().longValue());
    to
    st.setLong(1,getSequenceNumber().longValue());
    And I'm still getting Error(303,20): method getSequenceNumber not found in class stproc.DepartmentsImpl.
    even though i've imported "oracle.jbo.domain.DBSequence;"
    The code below is taken from the BC4J StoredProc sample and is what I want to modify to get it working with DB/Triggers.
    BG...
    package stproc;
    import java.math.BigDecimal;
    import java.lang.Math;
    import java.sql.CallableStatement;
    import java.sql.SQLException;
    import java.sql.Types;
    import oracle.jbo.JboException;
    import oracle.jbo.Key;
    import oracle.jbo.RowInconsistentException;
    import oracle.jbo.RowIterator;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.AttributeDefImpl;
    import oracle.jbo.server.DBTransaction;
    import oracle.jbo.server.EntityDefImpl;
    import oracle.jbo.server.EntityImpl;
    import oracle.jbo.server.TransactionEvent;
    import oracle.jbo.AlreadyLockedException;
    import oracle.jbo.domain.DBSequence;
    // --- File generated by Oracle Business Components for Java.
    public class DepartmentsImpl extends EntityImpl
    protected static final int DEPARTMENTID = 0;
    protected static final int DEPARTMENTNAME = 1;
    protected static final int LOCATIONID = 2;
    private static EntityDefImpl mDefinitionObject;
    * This is the default constructor (do not remove)
    public DepartmentsImpl()
    * Retrieves the definition object for this instance class.
    public static synchronized EntityDefImpl getDefinitionObject()
    if (mDefinitionObject == null)
    mDefinitionObject = (EntityDefImpl)EntityDefImpl.findDefObject("stproc.Departments");
    return mDefinitionObject;
    * Gets the attribute value for DepartmentId, using the alias name DepartmentId
    public DBSequence getDepartmentId()
    return (DBSequence)getAttributeInternal(DEPARTMENTID);
    * Sets <code>value</code> as the attribute value for DepartmentId
    public void setDepartmentId(DBSequence value)
    setAttributeInternal(DEPARTMENTID, value);
    * Gets the attribute value for DepartmentName, using the alias name DepartmentName
    public String getDepartmentName()
    return (String)getAttributeInternal(DEPARTMENTNAME);
    * Sets <code>value</code> as the attribute value for DepartmentName
    public void setDepartmentName(String value)
    setAttributeInternal(DEPARTMENTNAME, value);
    * Gets the attribute value for LocationId, using the alias name LocationId
    public Number getLocationId()
    return (Number)getAttributeInternal(LOCATIONID);
    * Sets <code>value</code> as the attribute value for LocationId
    public void setLocationId(Number value)
    setAttributeInternal(LOCATIONID, value);
    // Generated method. Do not modify.
    protected Object getAttrInvokeAccessor(int index, AttributeDefImpl attrDef) throws Exception
    switch (index)
    case DEPARTMENTID:
    return getDepartmentId();
    case DEPARTMENTNAME:
    return getDepartmentName();
    case LOCATIONID:
    return getLocationId();
    default:
    return super.getAttrInvokeAccessor(index, attrDef);
    // Generated method. Do not modify.
    protected void setAttrInvokeAccessor(int index, Object value, AttributeDefImpl attrDef) throws Exception
    switch (index)
    case DEPARTMENTID:
    setDepartmentId((DBSequence)value);
    return;
    case DEPARTMENTNAME:
    setDepartmentName((String)value);
    return;
    case LOCATIONID:
    setLocationId((Number)value);
    return;
    default:
    super.setAttrInvokeAccessor(index, value, attrDef);
    return;
    protected void doSelect(boolean lock) {
    if (lock) {
    this.handleStoredProcLock();
    else {
    this.handleStoredProcSelect();
    public void doDML(int operation, TransactionEvent e) {
    switch (operation) {
    case DML_INSERT: {
    handleStoredProcInsert();
    break;
    case DML_UPDATE: {
    handleStoredProcUpdate();
    break;
    case DML_DELETE: {
    handleStoredProcDelete();
    break;
    void handleStoredProcSelect() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN hr.do_select(?,?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    /* st.setLong(1,getDepartmentId().longValue()); */
    st.registerOutParameter(2,Types.VARCHAR);
    st.registerOutParameter(3,Types.NUMERIC);
    int rows = st.executeUpdate();
    populateAttribute(DEPARTMENTNAME,st.getString(2),true,false);
    populateAttribute(LOCATIONID,st.getBigDecimal(3),true,false);
    catch (SQLException s) {
    throw new JboException(s);
    finally {
    try {
    if (st != null) st.close();
    catch (SQLException s) { /* ignore */}
    void handleStoredProcDelete() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN hr.do_delete(?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    /* st.setLong(1,getDepartmentId().longValue()); */ // bg mod
    st.registerOutParameter(1,Types.NUMERIC); // bg add
    int rows = st.executeUpdate();
    catch (SQLException s) {
    throw new JboException(s);
    finally {
    try {
    if (st != null) st.close();
    catch (SQLException s) { /* ignore */}
    void handleStoredProcInsert() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN hr.do_insert(?,?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    /* st.setLong(1,getDepartmentId().longValue()); */ // bg mod
    st.registerOutParameter(3,Types.NUMERIC);
    if (getDepartmentName() != null) {
    st.setString(1,getDepartmentName());
    else {
    st.setNull(1,Types.VARCHAR);
    if (getLocationId() != null) {
    st.setLong(2,getLocationId().longValue());
    else {
    st.setNull(2,Types.VARCHAR);
    int rows = st.executeUpdate();
    Long newId = new Long(st.getLong(3));
    populateAttributeAsChanged(DEPARTMENTID, new DBSequence(newId));
    catch (SQLException s) {
    throw new JboException(s);
    finally {
    try {
    if (st != null) st.close();
    catch (SQLException s) { /* ignore */}
    void handleStoredProcUpdate() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN hr.do_update(?,?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    /* st.setLong(1,getDepartmentId().longValue()); */ // bg mod
    /* dbSeqVal.getSequenceNumber().longValue() */
    st.setLong(1,getSequenceNumber().longValue());
    if (getDepartmentName() != null) {
    st.setString(2,getDepartmentName());
    else {
    st.setNull(2,Types.VARCHAR);
    if (getLocationId() != null) {
    st.setLong(3,getLocationId().longValue());
    else {
    st.setNull(3,Types.VARCHAR);
    int rows = st.executeUpdate();
    catch (SQLException s) {
    throw new JboException(s);
    finally {
    try {
    if (st != null) st.close();
    catch (SQLException s) { /* ignore */}
    void handleStoredProcLock() {
    CallableStatement st = null;
    try {
    String stmt = "BEGIN hr.do_lock(?,?,?); END;";
    DBTransaction tr = getDBTransaction();
    st = tr.createCallableStatement(stmt,1);
    /* st.setLong(1,getDepartmentId().longValue()); */ // bg mod
    st.registerOutParameter(2,Types.VARCHAR);
    st.registerOutParameter(3,Types.NUMERIC);
    int rows = st.executeUpdate();
    String newDname = st.getString(2);
    BigDecimal newLoc = st.getBigDecimal(3);
    // Compare the old values to the current values to
    // detect if row has changed.
    compareOldAttrTo(DEPARTMENTNAME,newDname);
    compareOldAttrTo(LOCATIONID,newLoc);
    catch (SQLException s) {
    if (Math.abs(s.getErrorCode())==54) {
    throw new AlreadyLockedException(s);
    else {
    throw new JboException(s);
    finally {
    try {
    if (st != null) st.close();
    catch (SQLException s) { /* ignore */}
    void compareOldAttrTo(int slot, Object newVal) {
    if ((getPostedAttribute(slot) == null && newVal != null) ||
    (getPostedAttribute(slot) != null && newVal == null) ||
    (getPostedAttribute(slot) != null && newVal != null &&
    !getPostedAttribute(slot).equals(newVal))) {
    throw new RowInconsistentException(createPrimaryKey(getDepartmentId()));
    * Creates a Key object based on given key constituents
    public static Key createPrimaryKey(DBSequence departmentId)
    return new Key(new Object[] {departmentId});
    }

  • Result recording & display of multiple tests/analysis of single sample

    Hello Friends
    Here is my scenario;
    I receive 500 kgs of material in 5 bags. I want to draw sample of 1 kg from each bag. Thus I will be having 5 samples. I will perform the required tests on each sample. For testing I am consuming @250 gms of material. Out of 5 samples, I had to conduct the retest on 2 samples. I want to do the result recording of these tests/samples. In my understanding there will be 7 result recordings which will include 2 of Retest of 2 samples. I would like to display all the values recorded ( atleast for each samples ). Also, I would like to see the individual values and not the averaged out values the recordings.
    How can I take care of constraints due to pooled sample i.e. it allows only the result recording of pooled sample and not the subsequent samples.
    I would appreciate your detailed guidance on this issue.
    Regards
    mahesh

    Hello Lenin
    Normally, we use Sampling procedure with Fixed Sample as Sampling Type withAttributive inspection non confirming units as valuation mode. Determination Rule as 10 ( Fixed Sample ). Sample drawing Procedure followed is "draw from all containers". Irrespective of our present settings, I would appreciate if you let me know the settings to be made in order to map given scenario.
    Regards
    mahesh

  • BC4J DO NOT RE-USE THE ''INACTIVE'' CONNECTIONS, DATABASE IS SATURATED

    We developed a J2EE Web application based on the BC4J Framework.
    We're using JDevelopper 9.0.3.2 (9.0.2.822 before). The web application is rolled out on Oracle
    9ias 9.0.2 patchset 3.
    The database used is oracle 9i 9.2.0.
    We used the following code to connect to the BC4J:
    public void openConnection() {
    m_appModule = null;
    while (m_appModule == null)
    try
    m_appModule =
    Configuration.createRootApplicationModule(
    m_sAppModuleName,m_sAppModuleConfigName);
    } catch (JboException e) {
    if
    (e.getErrorCode().equalsIgnoreCase(AMPoolMessageBundle.EXC_AMPOOL_COOK
    IE_ALREADY_EXISTS)){
    try {
    Thread.currentThread().sleep(5);
    } catch (InterruptedException m) {
    }else
    throw e;
    The following code closes the connection to the BC4J
    public void closeConnection() {
    Configuration.releaseRootApplicationModule(m_appModule,true);
    m_appModule = null;
    The pooling parameters are the same as the default ones in Jdevelopper.
    We noted that certain connections created by the BC4J in the database were
    turned "inactive" and were never re-used.
    After a certain time, "inactive" connections multiply and the database is
    completely saturated.
    The BC4J do not re-use the "inactive" connections but try to create new ones.
    The "inactive" connections that are never re-used are never killed.
    Our only solution is to reboot the database server or the application OC4J
    instance to suppress the "inactive" connections.
    We tried to configure the BC4J pool in Jdeveloper, but it doesn't work in 9IAS.
    Could you please clarify what the problem is? Looking forward to receiving your
    feedback on this pressing issue, regards.
    Stéphane CHEVALLET

    I'm hitting the same problem.
    have you managed to solve it ? please share your wisdom :)
    Best Regards
    Rui Madaleno

  • Result Recording without release of physical sample

    Hi,
        SAP Gurus,
        I have one query regarding result recording for some lots.
       I have created one sample drawing procedure and assigned to inspection plan.
       In SDP I have maintained primary size factor 1, Fixed number 1, Acc.to smplng scheme-PM, Insp. severity-4.
       In pooled sample  size factor 1, Fixed number 1.
      At header level Consider No. of Containers Tick, Confirmation Required Tick, Used in Task List Tick.
    I have done One GR for raw material and assigned that inspection plan to the created 01 origin 01through QA02.
    One primary and pooled sample is created in CRTD status. I have not release the sample.
    When I go to QE11 for result recording system assigns the physical sample by default and branch me direatly to the result recording screen.
    My query is that, i have acivated confirmation required tick in SDP then system should not accept the sample which is in created status and should not allow me to do result recording. But system is skiping this and allowing me to do Result recording.
    Please let me know what necessary settings i have forgot.
    Thanks in advance,
    Harriesh

    Dear Shyamal,
                   The scenario i mapped is that, I need to release the sample manually. User should not go for RR without sample release.
    It is working fine also. But for few lots it is not asking the sample release. It ir skiping the sample status stage and directly going to RR.
    Please let me know way system is behaveing like this for few lots only.
    Thanks and regards.
    Harriesh.

  • Ho to install the "BC4J Enterprise Manager Bean" in Application Server 10g

    Hi
    I'd like to monitor my BC4J Application installed on a 10g Application Server. According to the help system I can find this information on the Enterprise Manager Website of the 10g Application Server: open the OC4J (not "home" in my case), open "Administration" tab, click on link "BC4J". After entering the OC4J Admin password you should come to a page where you can monitor BC4J-Pools and so on.
    If I try this on my (custom created) OC4J I get an error message that I should install the "BC4J Enterprise Manager Bean". What is this? I installed the BC4J.EAR Application, but to no avail. However: It works well on the default OC4J "home", but unfortunately my application is on a different OC4J :(
    Can anyone give me a hint, how to install the "BC4J Enterprise Manager Bean"? Can anyone point me to some documentation on this?
    Thanks.

    BC4J Enterprise Manager Bean is the bean to manage the bc4j framework in the oc4j instance. By default, it is only pre-installed by home instance. For all other instances, you have to do it yourself.
    You can use the EM to deploy this bean to the oc4j instance you want, the ear file is located in your iAS_HOME\BC4J\oem directory.

Maybe you are looking for

  • When I open a hotmail email on my iPad, it doesn't show as opened when I go on my mac.

    I am a fairly new owner of an iPad air.  Am stumbling on a few issues, one of which is that when I open a hotmail email on my iPad, when I next go to my mac the same email displays as unopened.  It means I am having to duplicate actions with emails. 

  • Powerbook G4 & Leopard

    I have a Powerbook G4 with the following specifications: 1.25 GHz PowerPC G4 with 512 MB DDR SBRAM. My question: is this enough to run Leopard or will the computer's overall performance be slowed so much that it won't be worth the upgrade?

  • Down with your Services!

    Iam not able to Log in to Mail services. Affected Mail A/c.  Log in Screen is turning up Blank Feilds quite repeatedly! Must be something has gone quite Wrong with Yahoo Powered Mail Services. Moderator's Note. The post was edited because the email a

  • Wondering how to deal with NTFS drive

    Hi there, Mac addicted folks! I have an external USB drive with 2 partitions on it. I was used on my old windows laptop, so one partition is in FAT32 and the other in NTFS. I found out Tiger couldn't deal with NTFS, and that it could only read. And o

  • Imac intel based mini rebooting randomly

    I have a 1.66 Intel Core Duo Mini mac on 10.5.1 that is randomly rebooting. It sometimes only takes minutes for it to restart, other times it will be stable for a day or two before it randomly reboots. I have had it for about 18 months and this has r