Java.beans.Statement & java.sql.Statement

My old code from jdk1.3.1 throws the ambiguous class thingie-mo-bob. Why did they implement the new java.beans.Statement, and is there anyway to make it default to the old java.sql.Statement without having to go through all the old code and add import java.sql.Statement. I have like 200 jsp files 'n it will take a loooong time!
Pete

There r two ways to do this.
(i) One is Implement the java.sql.Statement
like
package java.beans;
public interface Statement implements
java.sql.Statement {
}What? Are you suggesting he edit the source code for java.beans.Statement and make it implement java.sql.Statement?? I would most certainly not suggest that solution- beside violating the licensing agreement, it has troubling consequences since you are basically redefining the structure of a class in a way that makes no functional sense- that is, there is no reason for java.beans.Statement to implement methods like getConnection() and the other signatures of java.sql.Statement.
I'm not sure if I'm reading your response correctly or not, but I would definitely not refactor java.beans.Statement just to get this problem solved with out editing files ... ... since java.sql.Statement is used so widely, perhaps they should have considered a different name for java.beans.Statement , although you hate to base a name off of what's going to cause the least problems, rather then what makes the most sense ... ... any way, I guess it doesn't matter now: the name has been selected .... I'd be interested to hear how you solved the problem.

Similar Messages

  • JAVA beans and JAVA related services require Oracle client to be installed?

    Can you please advice whether an application server that make use of JAVA beans and JAVA related services require Oracle client to be installed? For an example if the solution build based on Java and JBOSS to be used as application server, do we still require oracle client to be installed and configure the tnsnames in order to communicate to database server?

    SHANOJ wrote:
    Can you please advice whether an application server that make use of JAVA beans and JAVA related services require Oracle client to be installed? For an example if the solution build based on Java and JBOSS to be used as application server, do we still require oracle client to be installed and configure the tnsnames in order to communicate to database server?Oracle client is not required when JDBC is used to connect to the remote DB

  • Question about main difference between Java bean and Java class in JSP

    Hi All,
    I am new to Java Bean and wonder what is the main difference to use a Bean or an Object in the jsp. I have search on the forum and find some post also asking the question but still answer my doubt. Indeed, what is the real advantage of using bean in jsp.
    Let me give an example to illustrate my question:
    <code>
    <%@ page errorPage="errorpage.jsp" %>
    <%@ page import="ShoppingCart" %>
    <!-- Instantiate the Counter bean with an id of "counter" -->
    <jsp:useBean id="cart" scope="session" class="ShoppingCart" />
    <html>
    <head><title>Shopping Cart</title></head>
    <body bgcolor="#FFFFFF">
    Your cart's ID is: <%=cart.getId()%>.
    </body>
    <html>
    </code>
    In the above code, I can also create a object of ShoppingCart by new operator then get the id at the following way.
    <code>
    <%
    ShoppingCart cart = new ShoppingCart();
    out.println(cart.getId());
    %>
    </code>
    Now my question is what is the difference between the two method? As in my mind, a normal class can also have it setter and getter methods for its properties. But someone may say that, there is a scope="session", which can be declared in an normal object. It may be a point but it can be easily solved but putting the object in session by "session.setAttribute("cart", cart)".
    I have been searching on this issue on the internet for a long time and most of them just say someting like "persistance of state", "bean follow some conventions of naming", "bean must implement ser" and so on. All of above can be solved by other means, for example, a normal class can also follow the convention. I am really get confused with it, and really want to know what is the main point(s) of using the java bean.
    Any help will be highly apprecaited. Thanks!!!
    Best Regards,
    Alex

    Hi All,
    I am new to Java Bean and wonder what is the main
    difference to use a Bean or an Object in the jsp. The first thing to realize is that JavaBeans are just Plain Old Java Objects (POJOs) that follow a specific set of semantics (get/set methods, etc...). So what is the difference between a Bean and an Object? Nothing.
    <jsp:useBean id="cart" scope="session" class="ShoppingCart" />
    In the above code, I can also create a object of
    ShoppingCart by new operator then get the id at the
    following way.
    ShoppingCart cart = new ShoppingCart();
    out.println(cart.getId());
    ...Sure you could. And if the Cart was in a package (it has to be) you also need to put an import statement in. Oh, and to make sure the object is accessable in the same scope, you have to put it into the PageContext scope. And to totally equal, you first check to see if that object already exists in scope. So to get the equivalant of this:
    <jsp:useBean id="cart" class="my.pack.ShoppingCart"/>Then your scriptlet looks like this:
    <%@ page import="my.pack.ShoppingCart %>
    <%
      ShoppingCart cart = pageContext.getAttribute("cart");
      if (cart == null) {
        cart = new ShoppingCart();
        pageContext.setAttribute("cart", cart);
    %>So it is a lot more work.
    As in my mind, a normal class can also
    have it setter and getter methods for its properties.True ... See below.
    But someone may say that, there is a scope="session",
    which can be declared in an normal object.As long as the object is serializeable, yes.
    It may be
    a point but it can be easily solved but putting the
    object in session by "session.setAttribute("cart",
    cart)".Possible, but if the object isn't serializable it can be unsafe. As the point I mentioned above, the useBean tag allows you to check if the bean exists already, and use that, or make a new one if it does not yet exist in one line. A lot easier than the code you need to use otherwise.
    I have been searching on this issue on the internet
    for a long time and most of them just say someting
    like "persistance of state", "bean follow some
    conventions of naming", "bean must implement ser" and
    so on. Right, that would go along the lines of the definition of what a JavaBean is.
    All of above can be solved by other means, for
    example, a normal class can also follow the
    convention. And if it does - then it is a JavaBean! A JavaBean is any Object whose class definition would include all of the following:
    1) A public, no-argument constructor
    2) Implements Serializeable
    3) Properties are revealed through public mutator methods (void return type, start with 'set' have a single Object parameter list) and public accessor methods (Object return type, void parameter list, begin with 'get').
    4) Contain any necessary event handling methods. Depending on the purpose of the bean, you may include event handlers for when the properties change.
    I am really get confused with it, and
    really want to know what is the main point(s) of
    using the java bean.JavaBeans are normal objects that follow these conventions. Because they do, then you can access them through simplified means. For example, One way of having an object in session that contains data I want to print our might be:
    <%@ page import="my.pack.ShoppingCart %>
    <%
      ShoppingCart cart = session.getAttribute("cart");
      if (cart == null) {
        cart = new ShoppingCart();
        session.setAttribute("cart", cart);
    %>Then later where I want to print a total:
    <% out.print(cart.getTotal() %>Or, if the cart is a JavaBean I could do this:
    <jsp:useBean id="cart" class="my.pack.ShoppingCart" scope="session"/>
    Then later on:
    <jsp:getProperty name="cart" property="total"/>
    Or perhaps I want to set some properties on the object that I get off of the URL's parameter group. I could do this:
    <%
      ShoppingCart cart = session.getAttribute("cart");
      if (cart == null) {
        cart = new ShoppingCart();
        cart.setCreditCard(request.getParameter("creditCard"));
        cart.setFirstName(request.getParameter("firstName"));
        cart.setLastName(request.getParameter("lastName"));
        cart.setBillingAddress1(request.getParameter("billingAddress1"));
        cart.setBillingAddress2(request.getParameter("billingAddress2"));
        cart.setZipCode(request.getParameter("zipCode"));
        cart.setRegion(request.getParameter("region"));
        cart.setCountry(request.getParameter("country"));
        pageContext.setAttribute("cart", cart);
        session.setAttribute("cart", cart);
      }Or you could use:
    <jsp:useBean id="cart" class="my.pack.ShoppingCart" scope="session">
      <jsp:setProperty name="cart" property="*"/>
    </jsp:useBean>The second seems easier to me.
    It also allows you to use your objects in more varied cases - for example, JSTL (the standard tag libraries) and EL (expression language) only work with JavaBeans (objects that follow the JavaBeans conventions) because they expect objects to have the no-arg constuctor, and properties accessed/changed via getXXX and setXXX methods.
    >
    Any help will be highly apprecaited. Thanks!!!
    Best Regards,
    Alex

  • Xi JDBC Adapter - Query SQL Statement & Update SQL Statement

    Hi!
    I configure the JDBC adapter sender (XI) to take data from Oracle database.
    I set the Query and Update SQL Statement in the Processing parameters of the communication channel in this way:
    Query SQL Statement :
    SELECT * FROM XI_TABLE WHERE STATUS = 'WAIT' ORDER BY ROW_NUM
    Update SQL Statement :
    UPDATE XI_TABLE SET STATUS = 'DONE', DATE = SYSDATE WHERE STATUS = 'WAIT'
    My question is :
    If a new record with the field STATUS = 'WAIT' is added to the table (xi_table) during the time between the execution of the query statement and the start of the update statement, what will happen to that record during the update?
    There is a way to avoid the update of that record? or to pass to the update statement only the record selected in the query statement?
    Please, may you give me some example?
    Thanks,
    Francesco

    hi,
    did you check "Isolation Level for Transaction"
    for the sender jdbc adapter?
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    michal

  • Using Java Beans in Java Server Pages

    Can we not use a method of Java Bean in a Java Server Page ?
    I am trying to retrieve the user email from a java bean method "getUserEmail". I am instantiating the class, but when I try to use that in JSP tags, I am getting an error.
    <jsp:useBean class = "formjavabean.application" id = "applicationId" scope = "session" />
    <%@ page import="java.io.*, java.lang.*" %>
    <%!
    String user = applicationId.getUserEmail() ;
    String f3 = "ftn03" ;
    String f3not = "ftn03 file not uploaded";
    ...........I am failing in debugging that, can anyone help plz ?

    Here is my whole code in parts:
    First the head section:
    <head>
    <title> Fastran </title>
    <jsp:useBean class = "formjavabean.application" id = "applicationId" scope = "session" />
    </head>JSP part in the body section :
    <%@ page import="java.lang.*, java.io.*" %>
    <%!
    private String f3 = "ftn03";
    private String f3not = "ftn03 file not uploaded";
    private String f7 = "ftn07";
    private String f7not = "ftn07 file not uploaded";
    private String f9 = "ftn09";
    private String f9not = "ftn09 file not uploaded";
    public String checkFile3()
        File ch3 = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn03") ;
        if (ch3.exists() == true)
            return f3 ;
        else
            return f3not ;
    public String checkFile7()
        File ch7 = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn07") ;
        if (ch7.exists() == true)
            return f7 ;
        else
            return f7not ;
    public String checkFile9()
        File ch9 = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn09") ;
        if (ch9.exists() == true)
            return f9 ;
        else
            return f9not ;
    %>Java Script in the body section, using methods defined in the JSP part:
    <script type="text/javascript">
            function validate_file ( )
                    var file3 = "<%= checkFile3() %>" ;
                    var file7 = "<%= checkFile7() %>" ;
                    var file9 = "<%= checkFile9() %>" ;
                    if ( file3 != "ftn03" || file7 != "ftn07" || file9 != "ftn09" )
                        alert("Please upload the required file") ;   
                        return ("fastran.jsp") ;
                    else
                        return ("processForm.jsp") ;
            function validate_upload ( )
                    valid = true;
                    if ( document.val_file.filefield.value == "")
                            alert("Please select a file for upload") ;
                            valid = false;
                    return valid;
        </script>Finally the form and button part of the page, in the body section:
    <form name = "val_file" method="post" action="upload.jsp" name="submit" enctype="multipart/form-data" onSubmit = "return validate_upload();">
    Upload Files: <input type="file" name="filefield" >&nbsp&nbsp<input type="submit" name="submit" value="Upload"><br>
    <font color = "Red"><h5>(ftn03,ftn07, and ftn09)</h5></font><br><br><br>
    Files on the server :<br><br>
    <font color = "Green"><h5>
    <%= checkFile3() %><br>
    <%= checkFile7() %><br>
    <%= checkFile9() %><br>
    </h5></font>
    <br><br><br><br><br><br><br><br><br>
    <input type=button onClick="location.href='logintest.jsp'" value='Home'>  <input type=button onClick="location.href=validate_file()" value='Proceed' ><br>
    </form>Now try this:
    Change <%! to <%, or try using bean method as:
    String userEmail = applicationId.getUserEmail() ;..........and that is my problem. I would really appreciate any help, thanks

  • Query SQL Statement & Update SQL Statement

    Hi!
    I configure the JDBC adapter sender (XI) to take data from MSSQL database.
    I have to run select like this:
    SELECT
    tblMilestone.Site,
    tblMilestone.Revision,
    tblMilestone.MilestoneNameID,
    tblMilestone.ApprovedDate,
    tblMilestoneName.MilestoneName
    FROM
    tblMilestoneName
    INNER JOIN tblMilestone ON tblMilestoneName.MilestoneNameID = tblMilestone.MilestoneNameID
    WHERE tblMilestone.StatusCode = 1;
    My question is what "Update SQL Statement" I should use in communication channel definition? I only need to update tblMilestone or this two tables?
    Maybe you give me some example.

    Check this from SAP help...
    Update SQL Statement
    You have the following options:
    &#9679;     Enter a valid SQL statement that is to be applied to the database once the data (determined from the Query SQL Statement) has been successfully sent to the Integration Server/PCK.
    It must be an INSERT, UPDATE, or DELETE statement.
    &#9679;     In place of the SQL statement, you can also enter <TEST>. Once the data determined from Query SQL Statement has been successfully sent, the data in the database remains unaltered.
    This is recommended if the data has not only been read, but also changed by a stored procedure entered under Query SQL Statement.

  • Use Java Bean or Java Importer

    I have created my java class to validate a user against LDAP and now I would like to use that class in my own 9i login form. In order to pass the class variable values to the form is it better to create a java bean or use the Java Importer? Which is better for performance?

    Mike,
    Java Beans added to Forms are downloaded to teh client as part of the application startup. The jar files get permanently cached on teh client until they are renewed on the server. For your original request, the funtionality already exists in a Forms9i demo
    http://otn.oracle.com/sample_code/products/forms/files/Forms9iOID_DEMO.zip
    Viewlet:
    http://otn.oracle.com/sample_code/products/forms/demo/9i/forms_services_demos/sso_oid_integration/viewlet/forms_integration_oid/OID90_viewlet.html
    To authenticate
    <Java Importer class package>.authenticateUser(<obj ORA_JAVA.JOBJECT>,user_dn VARCHAR2,password VARCHAR2) RETURN BOOLEAN;
    Frank

  • Is there an equivalent statement in Java for this PL/SQL stmt?

    Hi,
    I want to know if there is an equivalent statement
    in java for this PL/SQL statement:
    IF strTok IN('COM-1','COM-2','COM-3') Then
    /* Do Something */
    End If;
    I tried using : // This is giving me errors..
    if (strTok.equals(("COM-1") || ("COM-2") || ("COM-3") ) )
    /* Do Something */
    The above Java code is giving me errors.
    Any Help to reduce the number of steps for comparison
    is appreciated.
    thanks in adv
    Sharath

    Something like
    if (strTok.equals("COM-1") ||
        strTok.equals("COM-2") ||
        strTok.equals("COM-3") )Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Convert a logic from SQL statement to java

    Hi.,
    I m using jdeveloper 11.1.1.5
    I had used one sql statement as gievn below
    (SELECT max(decode(LENGTH(fy_year),4, fy_year + 1,6,SUBSTR(fy_year, 1, 4)+1||SUBSTR(SUBSTR(fy_year, 1, 4) + 2, 3, 2)))YEAR from fin_years)I need to use this logic in java
    Could anyone pls help me

    "wilhelm,"
    I've seen some ridiculous questions in my life. This is one of them.
    There are just so many things wrong here. So, so many.
    SELECT statements get data from databases; they are not "logic."
    Do you really expect us to parse your SQL and try to guess what it is supposed to do?
    Do you really believe that when converting a Forms app to Java that you "convert" SQL statements to Java?
    Do you really believe that going through your forms app and "converting" it to ADF is a sensible approach?
    John

  • Using Java Bean in JSP to show database record

    I have links in my Tomcat container that if someone clicks on a specific link it should go to a Record page (Show.jsp) with all the values associated with a record from a database.
    For example if someone clicks on a specific link like this:
    LinkExample
    it would take you to a jsp with database info for someone named Jones and show you his info:
    Lastname = Jones
    Firstname = Mike
    City = San Diego
    I would like to do this using a Java helper class and bean so I dont have any database connection or Java code in my JSP.
    I created Java class file that has Database connection that works with a Java bean. I just dont know how to get the Show.jsp to work with the Java Bean and Java helper class file.
    Here is what I have for Show.jsp and this is the part I have been working on the longest but cant get it to work because it doesnt seem to work with the database:<jsp:useBean id="user" class="num.UserDB"/>
    //do I call getUser(lastname) here and if so how?
    <jsp:setProperty name="user" property="*"/>
    Last Name: <jsp:getProperty name="user" property="lastname"/><BR>
    First Name: <jsp:getProperty name="user" property="firstname"/><BR>
    City: <jsp:getProperty name="user" property="city"/><BR>My Java Helper class that compiles and connects to database:
    package num;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import num.User;
    public class UserDB
    public User getUser(String lastname)
    User user = new User();     
            try          
         Class.forName...//database connection stuff here
        ResultSet results = stmt.executeQuery("SELECT * from user where lastname = '" + lastname + "'");
         if(results.next() == true)
         results.next();
         user.setLastname(results.getString("lastname"));
         user.setFirstname(results.getString("firstname"));
            user.setFirstname(results.getString("city"));
         catch(Exception e)          
                   System.out.println("Exception...");               
       return user;
    }My Java Bean that compiles here:
    package num;
    public class User
      private String firstname;
      private String lastname;
    private String city;
      public User()
         //no arg constructor
      public User(String firstname, String lastname, String city)
           this.lastname = lastname;
              this.firstname = firstname;
              this.city = city;
      public String getLastname()
              return lastname;
      public void setLastname(String lastname)
         this.lastname = lastname;
      //more bean methods for all fields here
     

    Sorry if I wasnt specific enough. I have a link that passes a value (field that is passed is called lastname) to a JSP where I want to show record info for that value that is passed.
    My question is how do I show the database record info on Show.jsp for the lastname field value of Jones where I want to use a Java Bean and Database helper class in Show.jsp
    Here is the message I get when I hit the link (LinkExample) and it goes to Show.jsp:
    org.apache.jasper.JasperException: Cannot find any information on property 'lastname' in a bean of type 'num.UserDB'
    .....My UserDB class:
    public class UserDB
    public User getUser(String lastname)
    User user = new User();     
            try          
         Class.forName("org.gjt.mm.mysql.Driver");
        Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/dbconnone?user=smitherson&password=abcdefg");
        Statement stmt = conn.createStatement();
        ResultSet results = stmt.executeQuery("SELECT * from user where lastname = '" + lastname + "'");
         if(results.next() == true)
         results.next();
         user.setLastname(results.getString("lastname"));
         user.setFirstname(results.getString("firstname"));
                         user.city(results.getString("city"));
         catch(Exception e)          
             System.out.println("Exception..." + e);          
       return user;
    }Bean class:
    package num;
    public class User
      private String firstname;
      private String lastname;
      private String city;
      public User()
         //no arg constructor
      public User(String firstname, String lastname, Sting city)
          this.firstname = firstname;
           this.lastname = lastname;
    this.city = city;
      public String getFirstname()
              return firstname;
      public void setFirstname(String firstname)
         this.firstname = firstname;
      public String getLastname()
              return lastname;
      public void setLastname(String lastname)
         this.lastname = lastname;
      public String getCity()
              return city;
      public void setCity(String city)
         this.city = city;
      

  • Java Bean Error in JSP: Cannot Resolve Symbol FirstBean

    I have created a java bean with following package statement
    package mybeans;
    and my bean name is
    FirstBean
    it compile secessfully and now my directory structure is following
    WebAppRootDir \ WEB-INF \ classes \ mybeans \ FirstBean.class
    I am using Tomcat 4.1 and in JSP i am declaring the bean with following line
    <jsp:useBean id="b" class="mybeans.FirstBean" />
    and tomcat 4.1 is failed to find this bean and giving me following error
    cannot resolve symbol
    symbol  : class StudentBean 
    location: package mybeans
    mybeans.FirstBean b = null;
    all my class and directory structure is ok i am puzzle why this error is coming, plz help me quickly i need solution quickly ...

    Error is for StudentBean, not for FirstBean. So check for it.

  • Java Bean Error in JSP: Cannot Resolve Symbol Error

    I have created a java bean with following package statement
    package mybeans;
    and my bean name is
    FirstBean
    it compile secessfully and now my directory structure is following
    WebAppRootDir \ WEB-INF \ classes \ mybeans \ FirstBean.class
    I am using Tomcat 4.1 and in JSP i am declaring the bean with following line
    <jsp:useBean id="b" class="mybeans.FirstBean" />
    and tomcat 4.1 is failed to find this bean and giving me following error
    cannot resolve symbol
    symbol  : class FirstBean 
    location: package mybeans
    mybeans.FirstBean b = null;
    all my class and directory structure is ok i am puzzle why this error is coming, plz help me quickly i need solution quickly ...

    It seem to be ok... why dont your try with a newer versi�n of Tomcat?

  • Java Beans in 11g !

    Hi everyone,
    We are using 11gr2 Forms/Reports 64-bit on Windows Server 2008 64-bit.
    Now we want to use JAVA BEANS in our application.
    Suggest me link and steps for installing/using JAVA BEANS compatible for 11gr2 Forms/Reports.
    Kindly tell me benefits of using JAVA BEANS in our applications.
    Thanks vth Regards.
    Bhatt.

    Advantage of java beans is you can enhance the behavior of forms. Forms is as you know applet based running on the client. (There is a different technology associated with inserting your own java code into the loop on the application server, should you want to do that.) So with beans in theory you can get more code to run on the client and do things like read and write files on the client, communicate with devices on the client, etc.
    Regarding doing that I think the executive summary is mostly look up Fbean in forms builder help.
    How I came to that tentative conclusion (I haven't gotten mybean to work yet! What do I know?) follows.
    Home of much forms info:
    http://www.oracle.com/technetwork/developer-tools/forms/overview/index.html
    Java beans are java obviously one has to acquire a certain level of expertise in java to deal with them but more importantly how to understand how to communicate between forms and the bean? It's hard for formists, living their lives at the outside of forms, who come up with an idea of something exceptional they want to do in forms, to translate that into the bean world. Then you have to think like a form and that's unknown territory.
    One problem is terminology: what is a PJC and what is a bean? Is a bean a PJC? I have yet to definitely figure that out. The paper below says: "A javabean is a pjc which is of an unspecialized type". However after that was written seems like in many cases when people are referring to "pjc"'s they are thinking the pjc is a specialized type.
    "Oracle9i Forms provides two mechanisms for extending the client with Java. The
    Pluggable Java Component (PJC) mechanism, which was introduced with Forms
    6i, and the newer Oracle9i Forms specific, enhanced JavaBean support
    mechanism." (paper 2 below).
    I was reading this document from 2000 which is interesting:
    Paper 1:
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/269054-130573.pdf
    It's talking about handlers and views and it's quickly getting over my head as I don't know enough forms internals to make much of this. For example I would like to write a bean that can print a small form. I have a proof of concept in java (6) that can print text to the default printer. So next step, create a bean that can get the data out of the form. From my formist perspective here I am in a bean how do I access some fields in a record in a block in forms? It's tough going. What does that mean in this handler/view world? Or do I have to be in the form and think of sending data to the bean and telling it to print it?
    Paper 2:
    http://www.oracle.com/technetwork/developer-tools/forms/documentation/269054-130573.pdf
    Starts out with more on the handler/view thing. Unfortunately I am totally mvc or handler-view impaired. It escapes me totally.
    "The Handler class is responsible for both maintaining the current value of any data and controlling the visual representation of the data."....vs.... "The View class is singularly responsible for presenting the data to the user in some
    manner and handling user input. The View class may allow the data to be changed
    by the user.". What? I am lost I have no idea what the handler does and what the view does. How about a discussion that is strictly goal oriented? If you want to do this, you have to talk to the (Handler| View)? Don't leave it to me to understand the handler/view thing and then figure it out from that. (This mvc thing is precisely what repels me about jdeveloper. You can't embrace jdev if you haven't drunk the mvc koolaid.)
    Further on in the paper they bring up fbean:
    "So in Oracle9i Forms a new simpler mechanism was introduced to allow you to integrate JavaBeans and Java
    Applets as custom components without writing any Java Code at all. This is all handled using a PL/SQL package in Forms called FBean.
    "FBean provides a full PL/SQL API to allow interaction with any public methods,
    properties and events that a JavaBean or Applet exposes."
    Now you're talking! This is more like it!:
    "Executing Methods
    Methods on the JavaBean are executed using one of the variety of
    FBean.Invoke methods. Like the property getters and setters there are various
    versions of this method which handle calling methods on the JavaBean that return
    different datatypes (or return void):
    • FBean.Invoke_Char()
    • FBean.Invoke_Bool()
    • FBean.Invoke_Num()
    • FBean.Invoke()
    Ok now that we know about the fbean thing we can find fbean in the forms builder help system. Looking good. I am pretty sure that somewhere in there you have to get your bean in a jar file and sign it (not a trivial proposition) and
    change the forms server configuration to include your jar file. I also think that the bean has to import frmall.jar and some of the packages regarding that view stuff. A tutorial about fbean and all these details from start to finish would be super!
    So you can talk to another applet? Really? Can this still be done considering all the security concerns in current browsers?

  • Java Bean access in a JSP Tag handler class

    Hello Everybody,
    I am trying to access my java bean(ErrorBean.java) in th doEndTag() method of the tag handler class(MyTagHandler.java) and iam getting an "CLASSCAST EXCEPTION"
    I am doing it like this in the tag handler class.
    MyBeans.ErrorBean errorBean = (MyBeans.ErrorBean)pageContext.getSession().getAttribute("ErrorBean");
    Where MyBeans is the package in which my Error Bean is and iam placing the ErrorBean object in the session object before it comes to the jsp page where i have the jsp Custom tag:
    <%@ taglib uri="/WEB-INF/taglib.tld" prefix="errors" %>
    <errors:message/>
    <%@ include file="footer.jsp"%>
    I was of the opinion that i was casting it right...can anyone help me to find ...where iam doing it wrong...its really URGENT ..PLEASE

    Friend that did not work either ...
    u know what...the ErrorTagHandler class is comiling fine with out errors but in the jsp page when the custom tag is hit..this error is showing up when i see the server log.
    can you throw some light on this..
    thanks..
    Firasath

  • Spooling Extracts from Multiple SQL statements in 1 File

    Hi all,
    I am trying to spool extract results of 3 separate SQL statements into one single file. I wrote a SQL block similar to the one below. However, the result of the statements overwrite each other: 3 overwrote 2 and overwrote 1. Any suggestion how to combined there extracted results in one file?
    spool c:\test.txt
    <SQL statement 1>
    <SQL statement 2>
    <SQL statement 3>
    /spool OFF
    Thanks in advance
    Jason

    Please paste you SQL file here. These is no way one should overwrite another.
    Eric

  • How to execute multiple sql statements

    hi all
    i am wondering if i can execute multiple sql statements in one shot with >> execute immediate command
    for example:
    i define the variable as X := sql statement
    Y := sql statement
    z := sql statement
    can i do execute immediate (X,Y, Z);
    if yes how ?? and if not any possible alternate
    thanks

    Starting with Ganesh's code
    DECLARE
       l_statement                 VARCHAR2 (2000);
       v_passwd                    VARCHAR2 (200);
       v_username                  VARCHAR2 (200) := 'test';
       v_pwd_key                   VARCHAR2 (200) := 'lwty23';
       v_dblink_name               VARCHAR2 (2000);
       v_dblink_drop               VARCHAR2 (2000);
       v_dblink_create             VARCHAR2 (2000);
       v_dblink_check_connection   VARCHAR2 (2000);
       l_number                    NUMBER;
    BEGIN
       --<<c_instance>>
       FOR c_instance IN (SELECT *
                            FROM v_oracle_instances
                           WHERE environment = 'Developement')
       LOOP
          SELECT encpwd_owner.display_db_encpwd (v_username,
                                                 c_instance.host_name,
                                                 c_instance.instance_name,
                                                 v_pwd_key)
            INTO v_passwd
            FROM DUAL;
          v_dblink_name := c_instance.host_name || '_' || c_instance.instance_name;
          v_dblink_create :=
                ' CREATE DATABASE LINK '
             || v_dblink_name
             || ' CONNECT TO '
             || v_username
             || ' '
             || 'IDENTIFIED BY '
             || v_passwd
             || ' USING'
             || ' ''(DESCRIPTION=
    (ADDRESS=(PROTOCOL=TCP)(HOST= '
             || c_instance.host_name
             || ')(PORT='
             || c_instance.LISTENER_PORT
             || '))(CONNECT_DATA=(SID='
             || c_instance.instance_name
             || ')))''';
          v_dblink_check_connection := 'select 1 from global_name@' || v_dblink_name || '.QCM';    --- Notice this change. I am simply selecting 1. That should be enough to test the database link.
          v_dblink_drop := 'drop database link ' || v_dblink_name || '.QCMTLAF';
          -- l_statement := 'BEGIN ' || v_dblink_create ';' || v_dblink_check_connection ';' || v_dblink_drop '; END ;'
          BEGIN
              EXECUTE IMMEDIATE (v_dblink_create);
              DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Created');
         EXCEPTION
            WHEN others THEN
               dbms_output.put_line( 'Failed to create the database link ' || v_dblink_name  );
               dbms_output.put_line( dbms_utility.format_error_backtrace() );
               INSERT INTO error_table( column_list )
                 VALUES( <<list of values>> );
         END;
          EXECUTE IMMEDIATE (v_dblink_check_connection) INTO l_number;    --- Notice this.
          DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Tested');
          BEGIN
             EXECUTE IMMEDIATE (v_dblink_drop); 
             DBMS_OUTPUT.PUT_LINE ('DB Link ' || v_dblink_name || ' Dropped');
          EXCEPTION
             WHEN others THEN
               dbms_output.put_line( 'Failed to drop the database link ' || v_dblink_name  );
               dbms_output.put_line( dbms_utility.format_error_backtrace() );
               INSERT INTO error_table( column_list )
                 VALUES( <<list of values>> );
         END;
       END LOOP;
    END;But I agree with the point that others have brought up that it really doesn't make sense to create and drop a database link like this.
    Justin

Maybe you are looking for

  • Macbook not connecting to wireless internet anymore

    I've read the previous posts and it seems like I am having a simliar problem as others. I am running OSX10.4.9... I'm not sure if it's been updated to that recently or not. Anyway, my computer has connected with no problem to the internet for the pas

  • Problem in Reading and writing to process stream

    I have created a java IDE which supports IO on the same window.,One touch compilation and execution.Applet can also be executed. Also it provides Templates of various types which can be extended. It has some problem in Conveying user inputs to the pr

  • ITunes opens itself!!

    I'm surfing with Safari or any other programm (iTunes is completely shut down), and every few minutes iTunes opens itself. I didn't press any link to open iTunes or anything else like import music. It's getting on my nerve. Please help. Thanks P.S.:

  • Update downloads fail, initial app installs work fine, Windows 8.1, internet connection and firewall settings fine

    I just installed the CS6/CC applications I use without any issue. I then was prompted to install various updates. All the updates failed and the message says the downloads failed. I checked my internet and firewall settings and they are fine. I the w

  • External Speakers on Macbook Air have stopped working after update.

    Hi I downloaded an update (10.6.8) for my Macbook Air and my external speakers stopped working. I have checked system preferences and nothing is muted and it can detect the speakers but nothing comes through. If i plug in headphones sound comes throu