Showing posts with label SOA. Show all posts
Showing posts with label SOA. Show all posts

Wednesday, September 19, 2007

Connect to SQL 2005 by the JDBC Provider


In order to connect to the SQL 2005 by the JDBC provider - in addition to the connection string,

you have to configure the service to a static ip/port :


for help and other learning materials
visit our site: Bina

Monday, September 17, 2007

Timers problem on Windows 2003 server

In a SOA solution sometimes we need to set a timer on a web service to manage some tasks.
for example if we have cached data and want to flush it to a database each 30 seconds we can create a timer for this task
the problem is that the timer runs on anonimous identity and cant access the database
the problem exist only on Windows 2003 server, on XP pro it runs with ASPNET user identity
to solve it, create a thread that do that job and sleep for a 30 seconds
Another problem with the thread - it access database or other resource with network service identity and its a very weak account - so if the resource is located on other computer change the application pool identity to other domain user

for help and other learning materials
visit our site: Bina

Out of resource - TCP ports

In A SOA solution we want to create a client that loads the server with many requests
we wrote too clients :
  • java client - runs on linux with AXIS toolkit
  • c# client - runs on windows using .net FCL and WSE 3.0

both clients crashed after a while with the error : "too many open files" of "out of resources"
the problem is the use of many TCP ports without release (that managed automatically by OS)
The OS allow you to use limited number of port concurrently and free the unused ports once in a while - if you want more ports in the interval it will fail

2 solutions

  • Set HTTP keep-alive both on client and server that means that you use the same port for each request (this can be problem if using built in load balancing feature)
  • Raise the port number limit

To raise the port number:

On Windows Registry: set the following
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"TCPTimedWaitDelay"=dword:0000001e
"MaxUserPort"=dword:0000fffe

On Linux:
open the file etc/security/limits.conf and set nofiles=N

for help and other learning materials
visit our site: Bina