java

Discussion in 'Java' started by ajit kumar, Aug 24, 2011.

  1. ajit kumar

    ajit kumar Guest

    in java what does it means getConnection function
    ajit kumar, Aug 24, 2011
    #1
    1. Advertising

  2. ajit kumar

    Jeff Higgins Guest

    On 08/24/2011 10:57 AM, ajit kumar wrote:
    > in java what does it means getConnection function

    You can look in the Java API Documentation index here:
    <http://download.oracle.com/javase/7/docs/api/index-files/index-7.html>
    Jeff Higgins, Aug 24, 2011
    #2
    1. Advertising

  3. ajit kumar

    Lew Guest

    ajit kumar wrote:
    > in java what does it means getConnection function


    That depends on from what type the method comes. What type are you discussing?

    In general terms, such a method returns a reference to some sort of "connection" object given some sort of information about what "connection" you want. There are various classes and interfaces in the standard API alone thatsport a 'getConnection()' method, or in some cases more than one such method:

    <http://download.oracle.com/javase/7/docs/api/java/sql/DriverManager.html#getConnection(java.lang.String)>
    <http://download.oracle.com/javase/7...erManager.html#getConnection(java.lang.String, java.util.Properties)>
    <http://download.oracle.com/javase/7...erManager.html#getConnection(java.lang.String, java.lang.String, java.lang.String)>
    <http://download.oracle.com/javase/7/docs/api/javax/sql/DataSource.html#getConnection()>
    <http://download.oracle.com/javase/7...ataSource.html#getConnection(java.lang.String, java.lang.String)>
    <http://download.oracle.com/javase/7/docs/api/java/sql/Statement.html#getConnection()>

    There may be others in third-party libraries.

    --
    Lew
    Lew, Aug 24, 2011
    #3
  4. ajit kumar

    Arne Vajhøj Guest

    On 8/24/2011 10:57 AM, ajit kumar wrote:
    > in java what does it means getConnection function


    The developer of the class decided to call a method
    getConnection most likely because it gets a connection.

    Arne
    Arne Vajhøj, Aug 25, 2011
    #4
  5. ajit kumar

    markspace Guest

    On 8/24/2011 8:28 AM, Jeff Higgins wrote:

    > You can look in the Java API Documentation index here:
    > <http://download.oracle.com/javase/7/docs/api/index-files/index-7.html>




    Sweet link there, thanks for pointing that index out.
    markspace, Aug 25, 2011
    #5
  6. ajit kumar

    Lew Guest

    markspace wrote:
    > Jeff Higgins wrote:
    >> You can look in the Java API Documentation index here:
    >> <http://download.oracle.com/javase/7/docs/api/index-files/index-7.html>

    >
    > Sweet link there, thanks for pointing that index out.


    Useful to the OP provided they're talking about the standard API - not so useful if they happen to be talking about some other library. Something the OP will have to clarify.

    --
    Lew
    Lew, Aug 25, 2011
    #6
  7. ajit kumar

    Roedy Green Guest

    On Wed, 24 Aug 2011 07:57:00 -0700 (PDT), ajit kumar
    <> wrote, quoted or indirectly quoted someone who
    said :

    >in java what does it means getConnection function


    see http://mindprod.com/jgloss/jdbc.html
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    The modern conservative is engaged in one of man's oldest exercises in moral philosophy; that is,
    the search for a superior moral justification for selfishness.
    ~ John Kenneth Galbraith (born: 1908-10-15 died: 2006-04-29 at age: 97)
    Roedy Green, Aug 25, 2011
    #7
  8. ajit kumar

    Lew Guest

    Roedy Green wrote:
    > ajit kumar wrote, quoted or indirectly quoted someone who said :
    >>in java [sic] what does it means getConnection function

    >
    > see http://mindprod.com/jgloss/jdbc.html


    The OP has not stated that the method is from a JDBC type, though that is a reasonable first guess. Even within JDBC there are many methods with that name, each with somewhat different semantics.

    One hopes that the OP will respond and clarify their question.

    --
    Lew
    Lew, Aug 25, 2011
    #8
  9. ajit kumar

    Rajiv Gupta Guest

    On 2011-08-25 00:57:00 +1000, ajit kumar said:

    > in java what does it means getConnection function


    It means to obtain the Connection for the Java with the function
    getConnection. This is very useful for the getting of connection for
    use in the Java program which is developed by the programming team.

    After you get the connection you need to store it in a safe place where
    it cannot be lifted by the malware or virus, so often the programmer
    puts the connection inside an array (which makes it difficult for the
    malware to see it).

    When you need to use the connection (for example to ask for the data of
    the connection or the connection speeds (and to change connection
    speeds) you must unhide it temporarily for to use it.

    Java is not the best language for getConnection function. There are
    problems with syntax dripping and difficulties with encryptor. I would
    recommend to switch to a more performant language like Visual Basic.
    The advantage of the Visual Basic is that it is supported by Microsoft.
    The Java is not supported by Microsoft any more
    Rajiv Gupta, Aug 26, 2011
    #9
  10. ajit kumar

    Rajiv Gupta Guest

    On 2011-08-25 00:57:00 +1000, ajit kumar said:

    > in java what does it means getConnection function


    It means to obtain the Connection for the Java with the function
    getConnection. This is very useful for the getting of connection for
    use in the Java program which is developed by the programming team.

    After you get the connection you need to store it in a safe place where
    it cannot be lifted by the malware or virus, so often the programmer
    puts the connection inside an array (which makes it difficult for the
    malware to see it).

    When you need to use the connection (for example to ask for the data of
    the connection or the connection speeds (and to change connection
    speeds) you must unhide it temporarily for to use it.

    Java is not the best language for getConnection function. There are
    problems with syntax dripping and difficulties with encryptor. I would
    recommend to switch to a more performant language like Visual Basic.
    The advantage of the Visual Basic is that it is supported by Microsoft.
    The Java is not supported by Microsoft any more
    Rajiv Gupta, Aug 26, 2011
    #10
  11. ajit kumar

    Jeff Higgins Guest

    On 08/26/2011 08:35 AM, Rajiv Gupta wrote:
    > On 2011-08-25 00:57:00 +1000, ajit kumar said:
    >
    >> in java what does it means getConnection function

    >
    > It means to obtain the Connection for the Java with the function
    > getConnection. ...


    Let's play..
    How many from the list here can we connect to java in some fashion.
    <http://en.wikipedia.org/wiki/Connection>
    Jeff Higgins, Aug 26, 2011
    #11
  12. ajit kumar

    Jeff Higgins Guest

    On 08/26/2011 08:35 AM, Rajiv Gupta wrote:
    > On 2011-08-25 00:57:00 +1000, ajit kumar said:
    >
    >> in java what does it means getConnection function


    > The Java is not supported by Microsoft any more

    while the Java still supports Microsoft.
    Jeff Higgins, Aug 26, 2011
    #12
  13. On 11-08-26 09:35 AM, Rajiv Gupta wrote:
    > On 2011-08-25 00:57:00 +1000, ajit kumar said:
    >
    >> in java what does it means getConnection function

    >
    > It means to obtain the Connection for the Java with the function
    > getConnection. This is very useful for the getting of connection for use
    > in the Java program which is developed by the programming team.
    >
    > After you get the connection you need to store it in a safe place where
    > it cannot be lifted by the malware or virus, so often the programmer
    > puts the connection inside an array (which makes it difficult for the
    > malware to see it).
    >
    > When you need to use the connection (for example to ask for the data of
    > the connection or the connection speeds (and to change connection
    > speeds) you must unhide it temporarily for to use it.
    >
    > Java is not the best language for getConnection function. There are
    > problems with syntax dripping and difficulties with encryptor. I would
    > recommend to switch to a more performant language like Visual Basic.
    > The advantage of the Visual Basic is that it is supported by Microsoft.
    > The Java is not supported by Microsoft any more
    >

    Visual Basic is good because you can use the better variables in Visual
    Basic. Java has variables too but they are copy on value references. You
    cannot write a swap function of Java copy on value references. So use
    real variables in Visual Basic. This means you can better swap
    connections. It is hard to write a Java connection pool because of this.

    AHS
    Arved Sandstrom, Aug 26, 2011
    #13
  14. ajit kumar

    Arne Vajhøj Guest

    On 8/25/2011 4:42 PM, Lew wrote:
    > Roedy Green wrote:
    >> ajit kumar wrote, quoted or indirectly quoted someone who said :
    >>> in java [sic] what does it means getConnection function

    >>
    >> see http://mindprod.com/jgloss/jdbc.html

    >
    > The OP has not stated that the method is from a JDBC type, though that is a reasonable first guess. Even within JDBC there are many methods with that name, each with somewhat different semantics.


    But Roedy will get a few extra pages views ...

    Arne
    Arne Vajhøj, Aug 27, 2011
    #14
  15. ajit kumar

    jaap Guest

    On 27-08-11 00:22, schreef Arved Sandstrom:
    > On 11-08-26 09:35 AM, Rajiv Gupta wrote:
    >> On 2011-08-25 00:57:00 +1000, ajit kumar said:
    >>
    >>> in java what does it means getConnection function

    >>
    >>

    > Visual Basic is good because you can use the better variables in Visual
    > Basic. Java has variables too but they are copy on value references. You
    > cannot write a swap function of Java copy on value references. So use
    > real variables in Visual Basic. This means you can better swap
    > connections. It is hard to write a Java connection pool because of this.


    Java has the nasty habit that he wants variables to be declared before
    you can use them. Visual Basic is much smarter, she creates them on the
    fly. Java programmers are afraid to make mistakes, that's why Java is
    created this way. Visual Basic programmers are real hero's: they don't
    make mistakes.

    Jaap
    jaap, Aug 27, 2011
    #15
  16. ajit kumar

    Lew Guest

    Rajiv Gupta wrote:
    > ajit kumar said:
    >> in java [sic] what does it means getConnection function

    >
    > It means to obtain the Connection for the Java with the function
    > getConnection. This is very useful for the getting of connection for
    > use in the Java program which is developed by the programming team.
    >
    > After you get the connection you need to store it in a safe place where
    > it cannot be lifted by the malware or virus, so often the programmer
    > puts the connection inside an array (which makes it difficult for the
    > malware to see it).
    >
    > When you need to use the connection (for example to ask for the data of
    > the connection or the connection speeds (and to change connection
    > speeds) you must unhide it temporarily for to use it.
    >
    > Java is not the best language for getConnection function. There are
    > problems with syntax dripping and difficulties with encryptor. I would
    > recommend to switch to a more performant language like Visual Basic.
    > The advantage of the Visual Basic is that it is supported by Microsoft.
    > The Java is not supported by Microsoft any more


    To the OP: It will be useful to keep in mind that Rajiv is being satirical here. You are meant to laugh, not follow his nonsensical but very clever advice.

    --
    Lew
    Lew, Aug 27, 2011
    #16
  17. ajit kumar

    Paul Cager Guest

    On Aug 27, 8:42 am, jaap <> wrote:
    > Java has the nasty habit that he wants variables to be declared before
    > you can use them. Visual Basic is much smarter, she creates them on the
    > fly.


    So Java is male, but VB is female? I can't help but wonder what their
    offspring would look like.

    private Runnable r = new Runnable() {
    Public Sub Run() Implements Runnable.run
    Dim AsyncCall As New AsyncCallback(AddressOf
    Me.BuiltInCallback)
    TestDelegate.BeginInvoke(asyncCall, Nothing)
    End Sub
    };
    Paul Cager, Aug 28, 2011
    #17
  18. On 8/27/2011 2:42 AM, jaap wrote:
    > Java has the nasty habit that he wants variables to be declared before
    > you can use them. Visual Basic is much smarter, she creates them on the
    > fly. Java programmers are afraid to make mistakes, that's why Java is
    > created this way. Visual Basic programmers are real hero's: they don't
    > make mistakes.


    So explicit scoping is a "nasty habit"? Implicit scoping of variables
    unarguably makes closures in Python a lot harder to use, and experience
    from other dynamic programming languages is that implicit scoping often
    causes as many problems as it solves. In addition, static typing also
    allows the compiler to report more errors at compile-time, which greatly
    reduces costs as opposed to suddenly discovering them at runtime. It's
    not that VB programmers don't make mistakes, it's that they're unaware
    of their mistakes.

    --
    Beware of bugs in the above code; I have only proved it correct, not
    tried it. -- Donald E. Knuth
    Joshua Cranmer, Aug 28, 2011
    #18
  19. Sun, 28 Aug 2011 05:37:42 -0700 (PDT), /Paul Cager/:

    > So Java is male, but VB is female?


    In my native language it is the opposite. :)

    --
    Stanimir
    Stanimir Stamenkov, Aug 28, 2011
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Novice
    Replies:
    1
    Views:
    1,144
    Mike Schilling
    Jul 19, 2003
  2. Michael Kintner
    Replies:
    0
    Views:
    843
    Michael Kintner
    Nov 30, 2003
  3. Ilias Lazaridis
    Replies:
    0
    Views:
    569
    Ilias Lazaridis
    Feb 1, 2005
  4. manish sahu
    Replies:
    3
    Views:
    1,002
  5. Isaac
    Replies:
    0
    Views:
    367
    Isaac
    Jan 20, 2011
Loading...

Share This Page