Search Results

Search found 16035 results on 642 pages for 'connection pooling'.

Page 17/642 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Java Socket Connection is flooding network OR resulting in high ping

    - by user1461100
    i have a little problem with my java socket code. I'm writing an android client application which is sending data to a java multithreaded socket server on my pc through direct(!) wireless connection. It works fine but i want to improve it for mobile applications as it is very power consuming by now. When i remove two special lines in my code, the cpu usage of my mobile device (htc one x) is totally okay but then my connection seems to have high ping rates or something like that... Here is a server code snippet where i receive the clients data: while(true) { try { .... Object obj = in.readObject(); if(obj != null) { Class clazz = obj.getClass(); String className = clazz.getName(); if(className.equals("java.lang.String")) { String cmd = (String)obj; if(cmd.equals("dc")) { System.out.println("Client "+id+" disconnected!"); Server.connectedClients[id-1] = false; break; } if(cmd.substring(0,1).equals("!")) { robot.keyRelease(PlayerEnum.getKey(cmd,id)); } else { robot.keyPress(PlayerEnum.getKey(cmd,id)); } } } } catch .... Heres the client part, where i send my data in a while loop: private void networking() { try { if(client != null) { .... out.writeObject(sendQueue.poll()); .... } } catch .... when i write it this why, i send data everytime the while loop gets executed.. when sendQueue is empty, a null "Object" will be send. this results in "high" network traffic and in "high" cpu usage. BUT: all send comments are received nearly immediately. when i change the code to following: while(true) ... if(sendQueue.peek() != null) { out.writeObject(sendQueue.poll()); } ... the cpu usage is totally okay but i'm getting some laggs.. the commands do not arrive fast enough.. as i said, it works fine (besides cpu usage) if i'm sending data(with that null objects) every while execution. but i'm sure that this is very rough coding style because i'm kind of flooding the network. any hints? what am i doing wrong?? Thanks for your Help! Sincerly yours, maaft

    Read the article

  • making lan connection problem

    - by user216112
    i am making lan connection.afer all to do i have check all the setting of workgroup and all but if i am checking through ping command to check they are connected or not??only from one system reply is coming.from the secong system reply is not coming.and i m accessing the workgru=oup"the maessge\ pc2 is not accessible.the network path not found"what should i do??

    Read the article

  • Webservice connection data storage

    - by Mey
    Hello, I would like to ask you how can i implement the next: I have a tabBar where each tab make one different connection to one web service, and should show a different data. I would like to save this data "somewhere" and from it place load the different tabs. Where i should save this received data? Thank you, Best regards

    Read the article

  • Java: Sharing a connection pool accross other J2SE Apps...?

    - by Zombies
    So I have a connection pool setup. Which is great and all since I have an application that really needs it. However what I would like to know is if it is possible to share this connection pool with other J2SE apps? Would this even be worth it, as opposed to creating a connection pool based on each apps needs? If it would be prudent, how can I accomplish this?

    Read the article

  • Problem with bluetooth on android 2.1 (samsung spica i5700) where pairing works but connection does

    - by user319634
    I have a Samsung Spica i5700 which I already have updated to Android 2.1. I am using the phone with an application called Run.GPS (http://www.rungps.net). This application logs data such as GPS position, route, speed, bearing etc. It can also log heartrate provided the user has a Zephyr HxM bluetooth heart rate monitor ("HxM"), which I do have. I can pair the HxM to the phone through the standard bluetooth utility. I'm prompted for the PIN, which I enter and the device is shown as 'Paired but not connected'. In the Run.GPS application itself, I click on 'Connect Heartrate Monitor'. This times out after about 30 seconds and the error message is 'Could not connect to heartrate monitor. Please try other settings'. I used a friend's HTC Windows Mobile as a control device to see if the HxM works there. It does. The Run.GPS application automatically sets the baud rate (initially to 9600 IIRC, though the connection also worked with higher baud rates) and it is possible to choose between various COM ports as well as a .Net COM port. I did some testing on my Spica Android, to try to find out why the bluetooth connection doesn't work. Below are some log files that I connected over adb when I clicked on 'Connect to Heartrate Monitor' in the Run.GPS application. I would be interested in any tips (including if I'm posting to the wrong forum here ;-)) - whether or not it's possible to experiment with the baud rate in Android etc. I still don't know if the problem is with the Run.GPS application (I've posted already on the development forum there) or with Android 2.1. I checked out another application - Endomondo - which is also a sport tracking application which supports heartrate monitor only with the HxM. There, what looked like exactly the same error occurred - I clicked on 'Connect Zephyr HxM'. For a few seconds I was shown the 'Connecting...' status, but then it timed out into 'Not Connected'. I'm thus tending towards looking at Android for the problem. Here's the output of adb logcat while trying to connect ./adb logcat | grep Run.GPS D/WYNEX> (11551): Excute :: Run.GPS Trainer UV, (null) E/Run.GPS (11997): Cannot connect to BT device E/Run.GPS (11997): java.io.IOException: Service discovery failed E/Run.GPS (11997): at android.bluetooth.BluetoothSocket$SdpHelper.doSdp(BluetoothSocket.java:374) E/Run.GPS (11997): at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:184) E/Run.GPS (11997): at ju.a(Unknown Source) E/Run.GPS (11997): at qk.j(Unknown Source) E/Run.GPS (11997): at fs.c(Unknown Source) E/Run.GPS (11997): at le.a(Unknown Source) E/Run.GPS (11997): at s.b(Unknown Source) E/Run.GPS (11997): at pb.a(Unknown Source) E/Run.GPS (11997): at as.a(Unknown Source) E/Run.GPS (11997): at am.b(Unknown Source) E/Run.GPS (11997): at gf.onTouchEvent(Unknown Source) E/Run.GPS (11997): at android.view.View.dispatchTouchEvent(View.java:3709) E/Run.GPS (11997): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) E/Run.GPS (11997): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884) E/Run.GPS (11997): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1665) E/Run.GPS (11997): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107) E/Run.GPS (11997): at android.app.Activity.dispatchTouchEvent(Activity.java:2061) E/Run.GPS (11997): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1649) E/Run.GPS (11997): at android.view.ViewRoot.handleMessage(ViewRoot.java:1694) E/Run.GPS (11997): at android.os.Handler.dispatchMessage(Handler.java:99) E/Run.GPS (11997): at android.os.Looper.loop(Looper.java:123) E/Run.GPS (11997): at android.app.ActivityThread.main(ActivityThread.java:4363) E/Run.GPS (11997): at java.lang.reflect.Method.invokeNative(Native Method) E/Run.GPS (11997): at java.lang.reflect.Method.invoke(Method.java:521) E/Run.GPS (11997): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/Run.GPS (11997): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/Run.GPS (11997): at dalvik.system.NativeStart.main(Native Method) E/Run.GPS (11997): Cannot connect to BT device E/Run.GPS (11997): java.io.IOException: Service discovery failed Here's the output of dmesg while trying to connect the heartrate monitor <4>[74726.239833] select 11691 (.serviceModeApp), adj 15, size 3205, to kill <4>[74726.240741] select 11739 (com.wssnps), adj 15, size 3207, to kill <4>[74726.246870] select 11750 (id.partnersetup), adj 15, size 3219, to kill <4>[74726.253390] select 11857 (p.bluetoothicon), adj 15, size 3299, to kill <4>[74726.259879] select 13131 (ndroid.settings), adj 15, size 4586, to kill <4>[74726.266372] send sigkill to 13131 (ndroid.settings), adj 15, size 4586 <7>[74733.945097] [BT] GPIO_BT_WAKE = 1 <7>[74733.945121] [BT] wake_lock(bt_wake_lock) <7>[74733.951799] [BT] GPIO_BT_HOST_WAKE = 1 <7>[74733.951822] [BT] wake_lock timeout = 5 sec <7>[74735.890196] [BT] GPIO_BT_HOST_WAKE = 0 <7>[74736.150987] [BT] GPIO_BT_HOST_WAKE = 1 <7>[74736.151009] [BT] wake_lock timeout = 5 sec <7>[74737.490185] [BT] GPIO_BT_HOST_WAKE = 0 <7>[74740.073913] [BT] GPIO_BT_HOST_WAKE = 1 <7>[74740.073948] [BT] wake_lock timeout = 5 sec <7>[74741.315336] [BT] GPIO_BT_HOST_WAKE = 0 <7>[74743.249747] [BT] GPIO_BT_HOST_WAKE = 1 <7>[74743.249768] [BT] wake_lock timeout = 5 sec <7>[74744.865099] [BT] GPIO_BT_HOST_WAKE = 0 <7>[74745.154487] [BT] GPIO_BT_HOST_WAKE = 1 <7>[74745.154509] [BT] wake_lock timeout = 5 sec <7>[74748.852534] [BT] GPIO_BT_HOST_WAKE = 0 <7>[74749.156256] [BT] GPIO_BT_HOST_WAKE = 1 <7>[74749.156278] [BT] wake_lock timeout = 5 sec <7>[74750.490018] [BT] GPIO_BT_HOST_WAKE = 0 <4>[74754.230424] select 11691 (.serviceModeApp), adj 15, size 3191, to kill <4>[74754.231326] select 11739 (com.wssnps), adj 15, size 3193, to kill <4>[74754.237473] select 11750 (id.partnersetup), adj 15, size 3205, to kill <4>[74754.243950] select 11857 (p.bluetoothicon), adj 15, size 3283, to kill <4>[74754.250452] select 13140 (com.svox.pico), adj 15, size 3465, to kill <4>[74754.256787] send sigkill to 13140 (com.svox.pico), adj 15, size 3465

    Read the article

  • Connection.State Issue

    - by Mostafa
    Hi I've published my new website , In my computer it works fine and no problem , But in the Server I when some user connect at the same time it crash . I found out There is a error at this Method : public static DbDataReader ExecuteReader(DbCommand dbCommand, CommandBehavior commandBehavior) { if (dbConnection.State != ConnectionState.Open) dbConnection.Open(); return dbCommand.ExecuteReader(commandBehavior); } When i trace it , It says ConnectionState is not open , and it's doing opening . Here are my questions : 1- Is it a problem if while ConnectionState is doing opening , we Open the connection again ? 2- What I've missed , that i receive this error ?

    Read the article

  • Ruby Rack: startup and teardown operations (Tokyo Cabinet connection)

    - by clint.tseng
    I have built a pretty simple REST service in Sinatra, on Rack. It's backed by 3 Tokyo Cabinet/Table datastores, which have connections that need to be opened and closed. I have two model classes written in straight Ruby that currently simply connect, get or put what they need, and then disconnect. Obviously, this isn't going to work long-term. I also have some Rack middleware like Warden that rely on these model classes. What's the best way to manage opening and closing the connections? Rack doesn't provide startup/shutdown hooks as I'm aware. I thought about inserting a piece of middleware that provides reference to the TC/TT object in env, but then I'd have to pipe that through Sinatra to the models, which doesn't seem efficient either; and that would only get be a per-request connection to TC. I'd imagine that per-server-instance-lifecycle would be a more appropriate lifespan. Thanks!

    Read the article

  • SQL server 2005 remote connection problem, cannot solve it help please thank you

    - by user287745
    note:- if this question does not fit this site please do not just close it but also redirect the question to the fitting sister site, thank you" the steps taken and the error are mentioned please help, i am stuck here! installed sql server 2005 express on both computers installed sql server management studio express on both computers ran each management studio and connect to instance sqlserver using windows authentication ( one computer connection example "A-63A9D4D7E7834\SQLEXPRESS" ) created a database in the databases named as "test1" created a few tables with data saved and exit. did everything what this site says " How to configure SQL Server 2005 to allow remote connections" [add h t t p here as spam prevention] ://support.microsoft.com/kb/914277/en-us" but i have just disable the firewalls completely :turn off connecting to A-63A9D4D7E7834 started "SQL Server Management Studio Express" on computer A-63A9D4D7E7834 sever name: "ALL-E425BE6C41D\SQLEXPRESS" authentication: "windows authentication" and CONNECT I GET THE FOLLOWING ERROR Cannot connect to ALL-E425BE6C41D\SQLEXPRESS. ADDITIONAL INFORMATION: Login failed for user 'ALL-E425BE6C41D\Guest'. (Microsoft SQL Server, Error: 18456) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476 BUTTONS: OK HELP

    Read the article

  • connection string reading data from excel in asp.net

    - by Greg
    Hello, I am trying to read data from excel file in asp.net. I have added the connection string to webConfig file: <add name="xls" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=HPM_DB.xls;Extended Properties=Excel 8.0"/> But it shows me an errormessage when I run this query: string query = "Select * from [IO_Definition$]"; IO_Definition is the name of the spreadsheet in my excel file. I also added the excel file to the App_Data folder of the website. The error is: The Microsoft Jet database engine could not find the object 'IO_Definition$'. Make sure the object exists and that you spell its name and the path name correctly. The thing is, when I write the absolute path of the excel file in the connectionString it does work. Is there anyway I can make it work without writing the absolute path? Thanks, Greg

    Read the article

  • php mysql database users connection handling

    - by aviv
    What is the best way to handle mysql database users connection in PHP? I have a web server running a PHP application on MySQL. I have created a database user for the application: dbuser1 with limited access - only for query, insert and update tables. No alter table. Now the question is, should i use the same dbuser1 widely in my scripts, so if there are 100 current people using my system and hence 100 scripts running parallel they all connect to the database with the same dbuser1? or should i create a few users and assign each script a different user or load-balance between the dbusers ?

    Read the article

  • Secure database connection. DAL .net architecture best practice

    - by Andrew Florko
    We have several applications that are installed in several departments that interact with database via Intranet. Users tend to use weak passwords or store login/password written on a shits of paper where everybody can see them. I'm worried about login/password leakage & want to minimize consequences. Minimizing database-server attack surface by hiding database-server from Intranet access would be a great idea also. I'm thinking about intermediary data access service method-based security. It seems more flexible than table-based or connection-based database-server one. This approach also allows to hide database-server from public Intranet. What kind of .net technologies and best practices would you suggest? Thank in you in advance!

    Read the article

  • SQL server 2055 remote connection problem, cannot solve it help please thank you

    - by user287745
    note:- if this question does not fit this site please do not just close it but also redirect the question to the fitting sister site, thank you" the steps taken and the error are mentioned please help, i am stuck here! installed sql server 2005 express on both computers installed sql server management studio express on both computers ran each management studio and connect to instance sqlserver using windows authentication ( one computer connection example "A-63A9D4D7E7834\SQLEXPRESS" ) created a database in the databases named as "test1" created a few tables with data saved and exit. did everything what this site says " How to configure SQL Server 2005 to allow remote connections" [add h t t p here as spam prevention] ://support.microsoft.com/kb/914277/en-us" but i have just disable the firewalls completely :turn off connecting to A-63A9D4D7E7834 started "SQL Server Management Studio Express" on computer A-63A9D4D7E7834 sever name: "ALL-E425BE6C41D\SQLEXPRESS" authentication: "windows authentication" and CONNECT I GET THE FOLLOWING ERROR Cannot connect to ALL-E425BE6C41D\SQLEXPRESS. ADDITIONAL INFORMATION: Login failed for user 'ALL-E425BE6C41D\Guest'. (Microsoft SQL Server, Error: 18456) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476 BUTTONS: OK HELP

    Read the article

  • java jdbc connection to mysql problem

    - by fatnjazzy
    Hi, I am trying to connect to mysql from java web application in eclipse. Connection con = null; try { //DriverManager.registerDriver(new com.mysql.jdbc.Driver()); Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost/db_name","root" ,""); if(!con.isClosed()) System.out.println("Successfully connected to " + "MySQL server using TCP/IP..."); } catch(Exception e) { System.err.println("Exception: " + e.getMessage()); } finally { try { if(con != null) con.close(); } catch(SQLException e) { System.out.println(e.toString()); } } I am always getting the Exception: com.mysql.jdbc.Driver I have downloaded this jar http://forums.mysql.com/read.php?39,218287,220327 import it to the "java build path/lib" the mysql version is 5.1.3 under. running: mysql 5.1.3 (db is up and running queries form PHP) windows XP java jee Thanks

    Read the article

  • Host...not allowed error in ODBC connection, while connecting to an online MySQL database

    - by sqlchild
    I have downloaded MySQL ODBC Connector 5.1. Now am trying to setup the DSN. But am getting the error: Connection Failed : [HY000] [MySQL] [ODBC 5.1 Driver]Host '117.x.x.x' is not allowed to connect to this MySQL server My server url is server.myweb.com - this name am entering in the TCP/IP Server and Port =3306. I have also entered the userid and password , which is the one which i enter when i open www.myweb.com/cpanel Is this a version problem? Should the version of MySQL on my server also be 5.1, i.e. the one of the ODBC? Please help.

    Read the article

  • Excel file reading with 2007 office connection string.

    - by p-vasuu
    Actually in my system having 2007 office then i am reading the 2003 .xls file with using the 2007 connection string string ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Filename + ";Extended Properties=\"Excel 8.0;HDR=YES;\""; data is not reading. But if the first row first column data length is lessthen 255 then the following first columns data is cutting up to 255 character. If the First row first column is morethan the 255 character then the following first columns data is reading fine. Is there any back word computability is there?

    Read the article

  • Can't establish a DB connection. (Maybe threads related)

    - by JobGovernor
    Hello, I am getting this exception on the Rufus::Scheduler ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5 seconds. The max pool size is currently 30; consider increasing it. I've increased the pool from 10 to 30. And I also monkey patched the method which raises the exception to also call ActiveRecord::Base.verify_active_connections! before doing its job. And I also restarted the service which executes the script so that the new code is run. Any ideas would be greatly appreciated. Let me know if you need any other info about environment or whatnot. Thank you.

    Read the article

  • WebSocket send extra information on connection

    - by MattDiPasquale
    Is there a way for a WebSocket client to send additional information on the initial connection to the WebSocket server? I'm asking because I want the client to send the user ID (string) to the server immediately. I don't want the client to send the user ID in the onopen callback. Why? Because it's faster and simpler. If the WebSocket API won't let you do this, why not? If there's no good reason, how could I suggest they add this simple feature?

    Read the article

  • Why can't Win7 remember my tether? New Connection Setup every time

    - by Andrew Heath
    In Win7 when you connect to a new network you're prompted to set it as a Home, Work, or Public connection. Presumably this influences default security settings. That's all well and good, except for the part that everytime I USB tether my smartphone Win7 comes up with a new dialogue. I think I'm up to generic connection 25 or something? It's getting ridiculous. Is there anyway to get Win7 to remember the phone tether as ONE connection only?

    Read the article

  • Unable to read data from the transport connection: the connection was closed

    - by webdreamer
    The exception is Remoting Exception - Authentication Failure. The detailed message says "Unable to read data from the transport connection: the connection was closed." I'm having trouble with creating two simple servers that can comunicate as remote objects in C#. ServerInfo is just a class I created that holds the IP and Port and can give back the address. It works fine, as I used it before, and I've debugged it. Also the server is starting just fine, no exception is thrown, and the channel is registered without problems. I'm using Forms to do the interfaces, and call some of the methods on the server, but didn't find any problems in passing the parameters from the FormsApplication to the server when debugging. All seems fine in that chapter. public ChordServerProgram() { RemotingServices.Marshal(this, "PADIBook"); nodeInt = 0; } public void startServer() { try { serverChannel = new TcpChannel(serverInfo.Port); ChannelServices.RegisterChannel(serverChannel, true); } catch (Exception e) { Console.WriteLine(e.ToString()); } } I run two instances of this program. Then startNode is called on one of the instances of the application. The port is fine, the address generated is fine as well. As you can see, I'm using the IP for localhost, since this server is just for testing purposes. public void startNode(String portStr) { IPAddress address = IPAddress.Parse("127.0.0.1"); Int32 port = Int32.Parse(portStr); serverInfo = new ServerInfo(address, port); startServer(); //node = new ChordNode(serverInfo,this); } Then, in the other istance, through the interface again, I call another startNode method, giving it a seed server to get information from. This is where it goes wrong. When it calls the method on the seedServer proxy it just got, a RemotingException is thrown, due to an authentication failure. (The parameter I'll want to get is the node, I'm just using the int to make sure the ChordNode class has nothing to do with this error.) public void startNode(String portStr, String seedStr) { IPAddress address = IPAddress.Parse("127.0.0.1"); Int32 port = Int32.Parse(portStr); serverInfo = new ServerInfo(address, port); IPAddress addressSeed = IPAddress.Parse("127.0.0.1"); Int32 portSeed = Int32.Parse(seedStr); ServerInfo seedInfo = new ServerInfo(addressSeed, portSeed); startServer(); ChordServerProgram seedServer = (ChordServerProgram)Activator.GetObject(typeof(ChordServerProgram), seedInfo.GetFullAddress()); // node = new ChordNode(serverInfo,this); int seedNode = seedServer.nodeInt; // node.chordJoin(seedNode.self); }

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >