Reg Implementing the interfaces in JDBC

Hi,
When we do a program that deals with database connectivity,we are not implementing the Interfaces like Statement,ResultSet.But we are using those
interfaces inside our program.
Can anybody justify how it is possible.
Thanks in advance

The DB vendors are responsible for providing implementation classes for these interfaces. That's why we need to keep DB specific jar files in CLASSPATH when we do DB activities..
Gautam

Similar Messages

  • How to get classes which implement the interface in program

    Hi,
    I created an interface and some classes are implementing it. I want to know in which classes the interface is implemented through program. I mean in which table the interface implemented details stores.
    please helps regarding this.
    Thanks,
    Regards,
    Priya

    Hi.,
    Read the  database view VSEOIMPLEM with where condition.,  REFCLSNAME =  <Interface Name> and Version = 1.
    This gives the class names which implement the interface.,
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Concrete classes implement abstract class and implements the interface

    I have one query..
    In java collection framework, concrete classes extend the abstract classes and implement the interface. What is the reason behind extending the class and implementing the interface when the abstract class actually claims to implement that interface?
    For example :
    Class Vector extends AbstractList and implements List ,....
    But the abstract class AbstractList implements List.. So the class Vector need not explicitly implement interface List.
    So, what is the reason behind this explicit definition...?
    If anybody knows please let me know..
    Thanx
    Rajendra.

    Why do you post this question again? You already asked this once in another thread and it has been extensively debated in that thread: http://forum.java.sun.com/thread.jsp?forum=31&thread=347682

  • Achiving serialization without implementing the interface serializable.

    how to make a class serializable without implementing the interface the serializable.

    ... although the objects you're converting with XMLEncoder must be JavaBeans, not just any POJO.
    For the latter, you may want to look at XStream, or JSX.

  • What are the classes and interface in JDBC

    Please anybody tell me
    What are the Classes in JDBC?
    and
    What are the Interfaces in JDBC?
    Will you please show the classes in one table and interfaces in one table. Plesae
    regards
    pooja.

    Hi jeyan,
    Very more thanks. I am searching lot of time in net to exactly get the classes and interface in jdbc. Now you have given helpful link.
    thank you.
    regards
    pooja

  • How to find out in program which all classes have implemented an interface

    Hello,
    I have created an interface and few classes are implementing the interface.
    I want to know in a program which all class have implemented the interface.
    Is it possible to find it out and how?
    Regards,
    Bikash.

    Hi Bikash,
    Read the Database view VSEOIMPLEM with where condition REFCLSNAME = Interface Name and version = 1.
    This would give you all the classes which have implemented the interface and are active...
    If you want to look at the values that the field version can have then see Type Group SEOC ans search for version....
    Hope this help...
    Regards,
    Sitakant

  • Problem implementing multiple interfaces

    I'm trying to implement Runnable, KeyListener and MouseListener.
    However, I'm having errors.
    Here's the line where I implement the interfaces:
    public class Main extends Applet implements Runnable, MouseListener, KeyListenerRunnable works fine. The listeners do not. The error is "cannot find symbol " on that line. That error goes away if I only have Runnable.
    Here's one of the methods:
    public void mouseClicked(Event e)
              if (e.getClickCount() == 2)
                   isStopped = false;
                   init();
         }It says it can't find getClickCount().
    Any help?
    Thanks.

    Well, I'm not exactly sure how to implement all the methods.
    I added some methods, but it's still giving me the same errors.
    import java.util.Random;
    import java.awt.*;
    import java.net.*;
    import java.applet.*;
    import java.awt.event.*;
    public class Main extends Applet implements Runnable, MouseListener, KeyListener
         AudioClip bounce;
         AudioClip goal;
         Player left;
         Player right;
         Ball ball;
         Thread th;
         Image dbImage;
         Graphics dbg;
         boolean isStopped = true;
         public void init()
              bounce = getAudioClip(getCodeBase(), "beep_2.au");
              goal = getAudioClip(getCodeBase(), "beep_1.au");
              left = new Player(0);
              right = new Player(1);
              ball = new Ball(4, 3, 500, 250, 15, left, right);
         public void start()
              th = new Thread(this);
              th.start();
         public void stop()
              th.stop();
         public void run()
              Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
              while (true)
                   if (!isStopped)
                        left.move();
                        right.move();
                   repaint();
                   try
                        Thread.sleep (30);
                   catch (InterruptedException ex)
                        // do nothing
                   Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
         public void paint(Graphics g)
              left.drawPaddle(g);
              right.drawPaddle(g);
              ball.drawBall(g);
              if (isStopped)
                   g.setColor(Color.green);
                   g.drawString("Double click to start.", 250, 250);
         public void update (Graphics g)
              if (dbImage == null)
                   dbImage = createImage (this.getSize().width, this.getSize().height);
                   dbg = dbImage.getGraphics ();
              dbg.setColor (getBackground ());
              dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);
              dbg.setColor (getForeground());
              paint (dbg);
              g.drawImage (dbImage, 0, 0, this);
         public void mouseClicked(Event e)
              if (e.getClickCount() == 2)
                   isStopped = false;
                   init();
         public void mouseEntered(Event e)
         public void mouseReleased(Event e)
         public void mouseExited(Event e)
         public void mousePressed(Event e)
         public void keyPressed(Event e)
              if (e.getKeyCode() == VK_UP)
                   right.setSpeed(-5);
              else if (e.getKeyCode() == VK_DOWN)
                   right.setSpeed(5);
              if (e.getKeyCode() == VK_S)
                   left.setSpeed(-5);
              else if (e.getKeyCode() == VK_W)
                   left.setSpeed(5);
         public void keyReleased(Event e)
              if (e.getKeyCode() == VK_UP || e.getKeyCode() == VK_DOWN)
                   right.setSpeed(0);
              else if (e.getKeyCode() == VK_S || e.getKeyCode() == VK_W)
                   left.setSpeed(0);
         public void keyTyped(Event e)
    }One error is
    Main is not abstract and does not override mouseExited() blah blah blah.
    All the other errors are like "Cannot find getKeyCode()" and "Cannot find VK_UP" and all that.

  • The interface .... cannot define an initializer

    Why I can't do it:
    public interface Constants
       java.util.HashMap BASE_HOLDERS = new java.util.HashMap();
       static
          BASE_HOLDERS.put("key1", "value2");
          BASE_HOLDERS.put("key2", "value3");
    and receive: The interface Constants cannot define an initializer?
    I don't want to have class (only interface). May you give me and advice?

    That said, interface constants are an anti-pattern, if that's the route the OP is heading...
    Effective Java - Joshua Bloch, Chapter 4, Item #17: Use interfaces only to define types.
    The constant interface pattern is a poor use of interfaces. That a class uses some constants internally is an implementation detail. Implementing a constant interface causes this implementation detail to leak into the class's exported API. It is of no consequence to the users of a class that the class implements a constant interface. In fact, it may even confuse them. Worse, it represents a commitment: if in a future release the class is modified so that it no longer needs to use the constants, it still must implement the interface to ensure binary compatibility. If a nonfinal class implements a constant interface, all of its subclasses will have their namespaces polluted by the constants in the interface.
    In summary, interfaces should only be used to define types. They should not be used to export constants.
    ~

  • Servlet also implementing listener interface

    Hi,
    Can I have a servlet "extends HttpServlet" and "implements HttpSessionListener" at the same time? If I add both a listener and a servlet element in deployment descriptor, how the container will instaniate/initialize the servlet/listener?
    Thanks.

    Hi,
    Can I have a servlet "extends HttpServlet" and
    "implements HttpSessionListener" at the same time? Yes, of course. Plenty of examples of this elsewhere in Java (e.g., java.awt.Canvas).
    If
    I add both a listener and a servlet element in
    deployment descriptor, how the container will
    instaniate/initialize the servlet/listener?Same way it always does: by calling the HttpServlet ctor. The fact that there's a new Listener interface doesn't affect that.
    You're on the hook to implement the interface's methods and make sure they're called appropriately.
    Whether this is a good design or not is another question. (I don't know the answer.)
    Thanks.You're welcome. - %

  • Regarding implementations of interfaces

    In Collection framework API, all the interfaces have been provided with adapter classes, which provide most of the skeletal implementation for those interfaces. The classes which are extended from these adapter classes are again implementing all the super interfaces. Why? For what reason, the ArrayList, HashSet etc., are implementing the interfaces List, Collection & Set, Collection respectively.

    Perhaps the list of interfaces isn't stored in plain text, but for a small class that extends ArrayList I see this:.......1........
    <init>...()V...C
    ode...LineNumber
    Table...main...(
    [Ljava/lang/Stri
    ng;)V...SourceFi
    le...deleteme.ja
    va........java/u
    til/Vector...del
    eteme$1CustomCla
    ss...CustomClass
    ...InnerClasses.
    ............My n
    ame is Gary...de
    leteme...java/ut
    il/ArrayList...(
    Ldeleteme;)V...a
    dd...(Ljava/lang
    /Object;)Z.!....
    ..............D.
    ..........Y...M.
    ..Y*...N,-...W..
    .............II don't see all the interfaces listed in the class file itself. Maybe I don't know what I'm talking about, but I'm sure I don't know what you're talking about. Perhaps your decompiler is looking up the inheritence tree.
    I effect, the real class ArrayList DOES implement interface List. I don't understand the problem.

  • How an array implements an interface?

    Section 5.5 of JLS (dealing with casting conversions) explains something like this:
    When an interface type S is cast to an array type T,
    "then T must implement S, or a compile-time error occurs. "
    I could not understand how an array can be made to implement an interface.
    I guessed it means that the component type of array implements the interface, and prepared the following test code. It doesn't compile.
    interface S{  }
    class C implements S{ }
    class Test {
    public static void main(String[] args) {
         C[] ac = new C[100];
         S s = new C();
         C[] ac1 = (C[])s; //doesn't compile
         System.out.println(ac1.length);
    Would someone open my eyes? Thank you

    dmbdmb Your correction compiled my code. But I was not looking for that, because the corrected code casts an array type to array type. Anyway, thanks.
    jverdYou are the man. Now I got it. Thank you.
    I think I will have to remember your simplified rule (Then S must be Serializable or Cloneable) rather than the JLS' rule. With your rule, I can write a test code like this, which compiles, and which shows that an interface type can be cast to array type.
    import java.awt.Point;
    import java.io.Serializable;
    class Test {
            public static void main(String[] args) {
               Point[] pa = new Point[100]; //any array of reference type
               Serializable s = new String("test");
               Point[] pa1 = (Point[])s; //compiles, though invalid at runtime
    }

  • Why we require to implement Serializable interface?

    Hi techies,
    I am new to Serialization. Why we require to use Serializable interface for Serializing objects. Since Serializable interface is a marker interface, how it prevents objects not implementing Serializable from being Serialized. Does Java Compiler checks it or how it checks it?

    JavaBreather wrote:
    Since Serializable interface is a marker interface, how it prevents objects not implementing Serializable from being >Serialized. Does Java Compiler checks it or how it checks it?Compiler does nothing but mark the class as implementing the interface. You can then later check whether “objects instanceof Interface" and find out whether or not it is present. As said above, ObjectOutputStream does the same thing.
    Marker interfaces are a misuse of interfaces, and should be avoided. You shouldn't create new ones.Annotations introduce in Java 5 are a generic mechanism of adding metadata to a class.

  • Actual implementation of interfaces involved in JDBC connection creation

    Pl some body tell me where does the actual implementation of interfaces like connection,Statement,PreparedStatement..we use to to make a JDBC connection from a simple application or J2EE application.
    Thanks

    Hi sharma,
    JDBC API will be implemented by JDBC Driver vendors. For example Microsoft provide "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver for SQL Server 2000. Similarly Oracle privide several JDBC Drivers to be used with Oracle databases.
    Sun has provided a JDBC-ODBC bridge (Driver) along with its JDK or JSDK. This driver is capable for connecting Java applications with any ODBC connection.
    Cuz this driver is included with the JDK/JSDK therefore you can use it to connect with for example MS Access DB or any other ODBC connected DB.
    If you want to connect your Java or J2EE application to some specific database then you should get the Driver for that particular database.
    regards,
    Humayun

  • Regarding message interfaces in JDBC implementation

    Hi Bhavesh,
         I have been trying to implement the jDBC scenario as mentioned by you in the blog "JDBC Receiver Adapter -- Synchronous Select – Step by Step",could you please help me out with interfaces(how many interfaces do we need on the whole).
    Regards
    Madhu

    Madhu,
    Please refrain from directing questions to someone in particular. There are lots of XI experts around here who can surely help and directing questions to one person is going to discourage others from answering .
    Answering your question~~ refer into this blog by Arpit and use the same concepts as he has described for File - RFC - File. The only difference will be in the datatypes and message types,
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Regards
    Bhavesh

  • Reading the Interfaces name which the class is implementing in a COM dll is implementing.

    Hi All,
    I'm using .NET Reflection to read a COM dll. I'm able to fetch the classes that are present in the dll. But I would like to know interface name which this class is implementing.
    For a .NET dll we can know the name of class's implementing interface name using the <classname>.BaseType.Name property.
    How can I know the interface name which this class is implementing (if any).
    Please let me know how to do this for a COM dll.
    Thanks in advance,Satish
    Thanks, Satish Bommideni "Success usually comes to those who are too busy to be looking for it."

    Hi,
    Thanks for the reply.
    I'm reading the COM assembly using the methods available in oleaut32.dll.
    Also I've imported the namespaces
    System.Runtime.InteropServices.ComTypes;
    System.Runtime.InteropServices;
    to use its respective methods and thus I'm able to read it's classes.But donot know what property to check for this class's interface.
    Kindly let me know if you need any further information.
    Thanks, Satish Bommideni "Success usually comes to those who are too busy to be looking for it."

Maybe you are looking for

  • Help with downloading and installing Flash Player into new Mac OS

    After spending hours installing and uninstalling flash player into my new (I have had it for 5 days) macbook pro, I need your help. I have MAC OS Snow Leopard 10.6.4  64 bit My web browser is Safari 5.0.2 ( i couldn't find whether it is 32bit or 64 b

  • Error during scheduling while running Run order sequencing in PPR

    Hello Experts, An error saying 'Error during scheduling' is logged while running Run order sequencing in Production Planning Run and the job is failed. Checked the capacity of the resource but seems ok. The below long text is displayed next to the er

  • Smartform Table; Internal table to work area

    Hi, I have created smartform with one table,in that internal table values are not moving into workarea,can anyone solve my issue.

  • How to use Spell Check in webdynpro?

    Hi, I'm having a text edit UI element and a button. By clicking on that button the contents in the text edit UI elements should be <b>spellchecked</b>. can anyone give me out with the detailed procedure to be followed to do this. Thanks & Regards, Su

  • Apple id account disabled message

    I changed my password and still keep getting my account has been disabled message...WHy