tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nishant_Awas...@progressive.com
Subject Re: Connection between TOMCAT and DB2 ???
Date Thu, 01 Aug 2002 13:30:59 GMT

Richard
Correct me if I am undertanding it correctly.
If the DB2 server is running on (default port 50000) cline tmachine
then in my client application, I need not specify the port number.

But I may or maynot use the port number (50000) in my Connection URL
string.
Now When I use
 String url = "jdbc:db2://100.3.13.34:50000/sample"; /** with port number ,
it doesnot work ***/

 String url = "jdbc:db2://100.3.13.34/sample"; /** without it works ***/

There are two things that are bugging me:

1. Why specifying portnumber doesnot work (though I understand it is not
necessary)

2. In my earlier experience, I need to specify the port number that is not
50000 but some other number...Is it because it is not the default port
number
that I need to specify it in my Connection string.

Please reply me if you think I have a point...
Thanks
------------------------------------------------------------------------------------

Nishant Awasthi
Corporate Systems Development
Progressive Insurance





                                                                                         
 
                    Ryszard Lach                                                         
 
                    <rla@id.pl>          To:     Tomcat Users List                 
       
                                         <tomcat-user@jakarta.apache.org>          
       
                    08/01/2002           cc:     (bcc: Nishant Awasthi)                  
 
                    04:47 AM             Subject:     Re: Connection between TOMCAT and  
 
                    Please               DB2 ???                                         
 
                    respond to                                                           
 
                    "Tomcat Users                                                        
 
                    List"                                                                
 
                                                                                         
 
                                                                                         
 





On Wed, Jul 31, 2002 at 03:11:03PM -0400, Nishant_Awasthi@progressive.com
wrote:
>
> Thanks Richard for your help,
>
> Yes, just now I managed to connect DB2 to Tomcat and using simple java
file
> able to retrieve the values from sample database.
>
> But I have a question for you.
> while defining my Connection URL I never specified a port number.
>   String url = "jdbc:db2://100.3.13.34/sample";
>
> If you see above I just gave IP address of my machine and not port
number.
> In past cases I have used port number given to me by the DBA.
>
> I would like to know what is the importance of port number and which
> service is running on this port.
>

DB2 usually listens on 50000 port (the server). You use it in 'catalog
tcpip node' command on client, then you execute 'catalog
database...as...at node ...' on the client machine and then use the new
database name and ip of the client machine. You don't need the port
number, DB2 client knows it.

Richard.

--
"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.

--
To unsubscribe, e-mail:   <
mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:tomcat-user-help@jakarta.apache.org>





--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message