Howto use Scroller with SkinnableContainer?

Hi, I just installed the Flash Builder Beta 2 and the code which worked in the previous Beta 1 version cannot be compiled now:
<s:Scroller>
     <s:SkinnableContainer>
     .... (some content here)
     </s:SkinnableContainer>
</s:Scroller>
The Flash Studio developers probably changed the Scroller implementation, so now can Scroller contain only Group or DataGroup?
Knows anybody how to use the Scroller with the SkinnableContainer???
Thanks
Fipil

Thank you for the reply Jonathon. I am using a ViewObject which
consist of several tables. I haven't tried the DB trigger
approach but just using the BC4 approach in overriding the
create method.
Here is the parent class create as a part of the
FasNameImpl.java file which does the job correctly.
public void create(AttributeList attributeList) {
super.create(attributeList);
SequenceImpl l_seq = new SequenceImpl
("SEQ_CUSTOMER_ID",getDBTransaction());
Integer l_next = (Integer)l_seq.getData();
setCustomerId(new Number(l_next.intValue()));
This is when I triedpassing the value to the child table. But I
can't figure it out. I think the link is working fine if I had a
ViewLink deployed but it doesn't look like it's doing the job
for ViewObject.
I am trying to call the childclass.method
(FasCustomer.setCustomerId(l_next);
But I am getting error.
Thanks a lot for your suggestions,
Kamran
703 696 1121

Similar Messages

  • HOWTO: Use BC4J With or Without DB Triggers

    This HowTo describes how to use BC4J, database sequences and triggers
    and what are the ramifications.
    INTRODUCTION
    BC4J has the ability to work with database sequences in order to obtain a
    unique value when inserting records. BC4J also has the ability to
    work either with a 'before insert' trigger which automatically creates
    a new unique value for the primary key or without a trigger. When not using
    a database trigger, BC4J also has the ability to obtain the sequence value
    and set the primary key value.
    Before discussing the ramifications of using one approach or the other, let's
    show examples of how to use both approaches:
    BC4J & sequences WITH a database trigger
    and
    BC4J & sequences WITHOUT a database trigger
    HOWTO DEMONSTRATION STEPS
    To illustrate both scenarios a simple database setup script is provided which
    creates two tables:
    CUSTOMER_NT which DOES NOT have a before insert trigger and
    CUSTOMER_WT which DOES have a trigger.
    Database Install Script:
    <code>
    drop trigger customer_insert_trigger;
    drop table customer_wt;
    drop table customer_nt;
    drop sequence customer_wt_seq;
    drop sequence customer_nt_seq;
    create sequence customer_wt_seq start with 1;
    create sequence customer_nt_seq start with 101;
    create table customer_wt(
    id number,
    name varchar2(30),
    constraint
    customer_wt_pk
    primary key (id)
    create table customer_nt(
    id number,
    name varchar2(30),
    constraint
    customer_nt_pk
    primary key (id)
    prompt Inserting data...
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Mickey');
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Goofy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Daffy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Porky');
    commit
    prompt Creating trigger
    create trigger customer_insert_trigger
    before insert on customer_wt for each row
    begin
    select customer_wt_seq.nextval into :new.id from dual ;
    end;
    </code>
    The next step is to create the DEFAULT Entity Objects and View Objects using
    the Business Components Wizard.
    USING BC4J WITH A DATABASE TRIGGER
    Let's modify the entity object CustomerWt so it can use the database trigger.
    Edit the entity object CustomerWt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox. This allows you to insert without a value for the primary key
    - Check 'Refresh after Insert'. This obtains the value from the database generated by the trigger.
    - Check 'Updateable While New'. Id is only updateable when inserting.
    Click finish to complete the wizard. Save all and recompile the project.
    Now let's test our work.
    In the navigator right-click the application module and select 'Test..'. This will launch
    BC4J's built in tester. Connect to the application.
    In the tester double-click the CustomerWtView view object to run a test edit form.
    After the edit form renders, navigate through the existing records using the navigate
    buttons on the edit form. Now let's insert a record to execute the trigger.
    click on the '+' button to insert a record. Enter a value in the 'Name' field and commit the change.
    Observe that a new value has automatically been inserted into the Id field.
    That's it! You have successfully used BC4J and a database trigger.
    Now let's try it without a trigger..
    USING BC4J WITHOUT A DATABASE TRIGGER
    Now edit the entity object CustomerNT so it doesn't need a database trigger.
    Similar to before, edit the entity object CustomerNt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox.
    - Check 'Updateable While New'.
    An additional step is also required. The Create method will have to be modified to extract
    the value of the sequence.
    In the Edit EntityObject Wizard click the Java tab and select Create method and click Finish.
    The create method is generated in your Java fil e. In the Workspace view of the Navigator,
    expand the CustomerNt entity object in the navigator. Double-click
    CustomerNtImpl.java to open it in the Source Editor. In the Structure pane, double-click
    create(AttributeList). Modify the Create method so it looks like this:
    <code>
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl s = new SequenceImpl("customer_nt_seq", getDBTransaction());
    Integer next = (Integer)s.getData();
    setId(new Number(next.intValue())); }
    </code>
    Save and compile the project.
    Now test the ViewObject CustomerNtView using the tester as before.
    In the edit form of CustomerNTView click on the '+' to insert a record. Observe that
    just as before a new value has automatically been inserted in the ID field!
    TO USE A DB TRIGGER OR NOT TO USE A DB TRIGGER.
    Using a Database trigger sometimes preferable if you have non BC4J applications
    also sharing the database. In this case it is still safest to just let the database
    update it's own primary keys.
    If you don't have any other non-BC4J applications sharing the database, then not using
    a database trigger is perfectly acceptable and can have slightly better performance.
    The important thing to remember is that the option is yours to use either approach!
    null

    Thank you for the reply Jonathon. I am using a ViewObject which
    consist of several tables. I haven't tried the DB trigger
    approach but just using the BC4 approach in overriding the
    create method.
    Here is the parent class create as a part of the
    FasNameImpl.java file which does the job correctly.
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl l_seq = new SequenceImpl
    ("SEQ_CUSTOMER_ID",getDBTransaction());
    Integer l_next = (Integer)l_seq.getData();
    setCustomerId(new Number(l_next.intValue()));
    This is when I triedpassing the value to the child table. But I
    can't figure it out. I think the link is working fine if I had a
    ViewLink deployed but it doesn't look like it's doing the job
    for ViewObject.
    I am trying to call the childclass.method
    (FasCustomer.setCustomerId(l_next);
    But I am getting error.
    Thanks a lot for your suggestions,
    Kamran
    703 696 1121

  • Howto use java with html

    Hi,
    I have got following project :
    an axis webcam displays an image thanks to http protocol
    at the right of my image, I have to create a panel with some java controls.
    I would like some hints on howto do this?
    Do I need a to setup a web server or is it possible to do this using a single html file loaded in my browser ?
    Best Regards
    Steph

    At best you can load an applet in a html page (the other possibility is to use servlets and JSP's to do server side processing, which is most likely not what you want to do).
    But what do you want to do with these "java controls"?

  • Howto use jsp with where-clause restriction for viewObject

    hello there,
    i am currently trying to figure out how to pass parameters via url to the jsp,
    so that the corresponding viewobjects where clause can be extended and i only get the select-results that i want. i am familiar with doing this in a stright java-environment but don't know how to implement it in a jsp-client.
    does anyone know something about this or can name me a ressource i can read about that.
    Thanx
    Selim Keser

    thank you, but i have only 19 days left for
    my diploma and nobody in this company can help me with this issue.
    what i need is an example or something like a reciept about what to do
    to achieve the following:
    I want to type in an url like:
    localhost:8080/myapp/browse.jsp?customerid=123
    so that i can extend the where-clause in my ViewObject
    and only see the rows of customer 123 in my jsp.
    it is a bit hard for a newbie to figure out how to pass down the parameters way down to the ViewObject. I am shure that this is easy to do once one understands the how it works. This is my first "Web-Experience" and I am running out of time.
    Thanx
    Selim Keser

  • Why can I no longer scroll with the mouse when using Pages?

    A few days ago, I realized that I am unable to scroll within a Pages document with the mouse.  The scroll bar is not there.  The scroll feature works fine, and after trying to figure this out myself with no success, I thought I'd ask here.  I have Pages '09 and I'm using OS X 10.9.5.

    Thanks.  That's not the problem.  Scrolling works in everything else except Pages.  I used to be able to scroll just by using my finger up or down on the mouse.  Now, I can't do that.  I tried setting the scroll bars to "Always", but then I have to physically click on the scroll bar and move it up and down.  Not like it's that much hassle, lol, but I got used to just scrolling with my finger on the mouse.

  • When using Safari I am unable to scroll with the trackpad when on a PDF browser plugin page.

    I can't scroll with the trackpad when I have a PDF open in Safari, I have to go use the scrollbar. Is there a way to fix this?

    Back up all data before making any changes. Please take each of the following steps until the problem is resolved.
    Step 1
    If Adobe Reader or Acrobat is installed, and the problem is just that you can't print PDF's displayed in Safari, you may be able to print by moving the cursor to the the bottom edge of the page, somewhere near the middle. A black toolbar may appear under the cursor. Click the printer icon.
    Step 2
    There should be a setting in its preferences of the Adobe application such as Display PDF in Browser. I don't use those applications myself, so I can't be more precise. Deselect that setting, if it's selected.
    Step 3
    If you get a message such as ""Adobe Reader blocked for this website," then from the Safari menu bar, select
    Safari ▹ Preferences... ▹ Security
    and check the box marked
    Allow Plug-ins
    Then click
    Manage Website Settings...
    and make any required changes to the security settings for the Adobe PDF plugin.
    Step 4
    Triple-click anywhere in the line of text below on this page to select it, the copy the selected text to the Clipboard by pressing the key combination command-C:
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens by pressing command-V, then press return.
    From the folder that opens, move to the Trash any items that have "Adobe" or “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari.
    Step 5
    The "Silverlight" web plugin distributed by Microsoft can interfere with PDF display in Safari, so you may need to remove it, if it's present. The same goes for a plugin called "iGetter," and perhaps others—I don't have a complete list. Don't remove Silverlight if you use the "Netflix" video-streaming service.
    Step 6
    Do as in Step 4 with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari.

  • Since upgrading to mavericks I cannot scroll with my mouse in mail - I have to use the keyboard arrows

    since upgrading to mavericks I cannot scroll with my mouse in mail - I have to use the keyboard arrows

    Hopefully this is what you are looking for: 
    Canon MP560 series:
      Status: Idle
      Print Server: Local
      Driver Version: 10.84.2.0
      Default: Yes
      Shared: Yes
      URI: usb://Canon/MP560%20series?serial=254057
      PPD: Canon MP560 series
      PPD File Version: 10.84.2.0
      PostScript Version: (3010.000) 705
      CUPS Version: 1.7.2 (cups-372.4)
      Scanning support: Yes
      Scanning app (bundleID path): -
      Scanning app version: -
      Scanner UUID: 00000000-0000-0000-0000-323534303537
      Printer Commands: PrintSelfTestPage ReportLevels
      CUPS filters:
    Raster2CanonIJ:
      Path: /Library/Printers/Canon/BJPrinter/Filters/Raster2CanonIJ/Raster2CanonIJ.bundle/ Contents/MacOS/Raster2CanonIJ
    Hope

  • Scrolling with mouse on pages create black and white lines,

    When scrolling with mouse, periodically the whole screen turns into black and white lines. Sometimes whole page, sometimes just pictures/side ads. If you continue to scroll it does go away but then you need to scroll back to where the lines started, its hard to explain, i have taken 1 photo of the problem but will take more photos as i can, i really enjoy how Firefox runs on my computer, it has always been the best browser for my needs. I did recently buy a new desktop, but it did it then also, so i removed it and tried running explorer and Google and i just don't like them, so i am hoping we can get this fixed.

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    If there is a problem with scrolling on web pages then try to disable smooth scrolling.
    *Tools > Options > Advanced > General: Browsing: "Use smooth scrolling"

  • Has anybody else been seeing (Not Responding) at the top of the screen and having thier browser not respond to wheel scrolling and scrolling with the usual slider at the right part of the screen?

    I have noticed my Firefox browser is having way too many incidences where it is "Not Responding". The browser freezes up for a second quite often and the "Not Responding" message will appear at the top of the screen.
    The browser will also not scroll with either the scroll bar on the right nor with the mouse wheel. Both used to work in previous versions of Firefox, but it seems to have gotten worse since Firefox 5 0r 6. The same with the "Not Responding". It is happening more with Firefox 7 than in at least the past two versions.
    Anybody else having these issues? Seems like they are hand-in-hand. Thanks for any and all help or advice. It's making me pretty angry since I'm online all day for work.
    Just an FYI. At the bottom of my troubleshooting copy/paste is a suggestion to update the driver for my graphics. That was a no-go. I tried that.

    Thank you for this first reply! I'll have to give this a try later....the main laptop I experience this on crashed not more than an hour after I posted this issue. I'm on a tiny, slow netbook that hasn't had the same problem. Now I'm wondering if I picked up a Trojan on the main laptop and the "Not Responding" message is a side effect of a virus or Trojan.
    One of the system .dll files has been corrupted and I'm not being allowed to use recovery discs, previous disc images, or any recovery options. That was an all day sucker yesterday and from what I've read on forums and have researched, it appears I'm going to need to reload the operating system. If it is indeed a Trojan/virus, I'm surprised it made it through my antivirus and firewall. Anything is possible, really.
    Thanks again, I'll get back with results once I get the wounded laptop back up and running.

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

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

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

  • Why can I no longer use AirPlay with my Slingbox?  New updates break complatibility?

    Why can I no longer use AirPlay with my Slingbox?  New updates break complatibility?

    You already seem to know what the issue is, it is the parallax feature that was added to iOS 7.  From your rant, it appears that your attempt to work around this was not successful.  According to the Apple documents I've seen, they recommend that you enlarge your image (not reduce it).  Make your image have excess space on all sides, which is not displayed on the screen.  This way, when you tilt your device one direction or another, it can shift the image to give the appearance of 3D. 
    As a photographer, I like to use the full frame of my images, but I also know that I need to leave room around the image as well.  I have some photos I have taken that I can't use because I have them cropped too tightly too, but I have others that work just fine.  Just remember that part of the image file is "off screen" so that if iOS has to shift the image up it has some image that can scroll onto the screen.  It needs this space on all sdes, so just make youre images larger, and keep in mind that a portion on each side will be outside the normally visible screen...  If you don't like this feature, you can always go into the settigns and turn it off.

  • Can't load the snag it plug in for scrolling with firefox 6.0.1. i have snag it 1.0.3

    I have just purchased snag it 1.0.3 for mac. It has a section in the install for loading the plug in for scrolling with firefox. It errored and said it can't load the plug in with firefox 6.0.1 version. What version needs to be in order to use the scrolling feature?

    See this: http://techsmith.custhelp.com/app/answers/detail/a_id/3126/~/snagit%3A-firefox-5-or-6-extensions-for-windows-and-mac

  • Problem Scrolling with T400

    I have a recent problem with the middle button (scroll) feature for the trackpoint on my T400 with Windows XP 32-bit. 
    Previously, holding down the middle button would freeze the cursor and enable scrolling with the nubbin.
    However, now the scrolling is only enabled on every 3rd or 4th click of the middle button. 
    Holding down the middle button still freezes the cursor, as it used to, but most often will not enable scrolling. When scrolling does enable, it works fine. When scrolling does not enable, the signal that the button has been pressed still seems to register, as it still freezes the cursor and if I click it three times, the help message still shows up; I think it must be a software issue, not a hardware one.
    The only recent update I have one to my computer is to add a new user, who has not done anything that should have changed my trackpoint settings.
    Thanks for any help.

    Hi hard0923,
    Please try to re-install UltraNav driver. If problem presist, please contact local lenovo for further assistance
    Synaptics UltraNav driver for Windows 7 (32-bit, 64-bit), Vista (32-bit, 64-bit) and XP (32-bit, 64-bit) - ThinkPad
    http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS019164
    Fred
    T61 + X201i

  • Using JScrollBar with JTextArea

    hey!
    i'm using JDev 10g, creating a Swing Application
    i have a JTextArea and a JScrollBar (both which I have dragged down from Component Palette)
    how to I use JScrollBar with the JTextArea, such that the JScrollBar response to the JTextArea
    help me out...
    Cheers,
    Shivek

    this is the problem:
    i have a JTextArea and a JScrollBar which I have "DRAGGED" down from the component pallette in JDev...
    how do I make the JScrollBar work for the JTextArea... because right now the JTextArea is not responsing to the JScrollBar...
    so when the text is flooded in the JTextArea, scrolling the JScrollBar doesnt work
    this is my code:
    private JTextArea jTextArea1 = new JTextArea();
    private JScrollBar jScrollBar1 = new JScrollBar();
    private void jbInit() throws Exception
    this.getContentPane().add(jScrollBar1, null);
    this.getContentPane().add(jTextArea1, null);
    can u tell me wat code is missing! I've tried everything... read many tutorials some of them uses a panel...
    cheers,
    Shivek

  • Scroll with mouse wheel requires multiple "ticks" to start scrolling

    I recently got a new mouse, and now when using firefox the scroll wheel doesn't want to work correctly. Everywhere else I can do single scroll ticks to scroll content, but in firefox a single tick scroll is just ignored as are multiple ticks if done somewhat slow. In order to get firefox to actually scroll with the mouse wheel I have to quickly do a few ticks at once. Doing so makes for very inaccurate control.
    I've tried turning off smooth scroll, hardware acceleration, and pixel scroll, but none of those helped. Any help getting firefox to stop ignoring slow and single scroll ticks would be greatly appreciated.

    Did you check the settings in the mouse driver software in case something has changed?
    Boot the computer in Windows Safe Mode with network support (press F8 on the boot screen) as a test.
    *http://www.bleepingcomputer.com/tutorials/how-to-start-windows-in-safe-mode/

Maybe you are looking for

  • BPM-70830 while deploying process in BPM Composer

    Hi, I got these errors When I try to deploy a bpm project which created and developed in BPM Composer(11.1.1.6.0). Can anyone help me? Thanks a lot! There're already 34 processes successfully deployed with BPM Composer before this error occur, howeve

  • Converting INVOIC02 idoc to EDIFACT INVOIC message (Using Adapter Module

    Hi Friends, We are sending customer idoc (INVOIC02) from R/3 to external system through PI. We want to generate EDIFACT output file (message type : INVOIC). Is it possible to convert IDoc message to EDI file format through java adapter module ? Will

  • How to genarate multiple pdf's in XML Publisher

    Hi, i need sample code for genarating multiple pdf output files. I am using datasource as "XML file" & Through Application Engine .. How to genarate multiple pdf's.. Please any one help on this issue, and also send me sample code step by step process

  • Google home page is cut off

    Hi. Has anyone else noticed that the word google on the search page is cut off on the iPad? I think it is not problem with the iPad cause it works okay on all other sites. Please help.

  • What is OTHERS mean under the startup disk category???

    Hello guys, I am facing troubles with the Startup disk. I am getting the message that says " your start up disk is full"...this is not the case, the problems is the category OTHER, i could not find which files goes under that ?? the other categories