disconnected

Persisting disconnected POCO entities

痞子三分冷 提交于 2020-01-05 12:28:13
问题 I'm working with disconnected POCO objects. When I persist a single object, it works fine! The problem starts when I want to persist related objects. For example: Retrieving object from Data layer: using (MyContext ctx = new MyContext ()) { return ctx.Users.First(); } This object goes back to Business layer and there, I add some child records, see below (just to ilustrate): objectUser.Permissions.Add(new Permission()); objectUser.Permissions.Add(new Permission()); Permissions is a navigation

java.sql.SQLException: Io exception: Broken pipe how to recover without restart?

痞子三分冷 提交于 2019-12-22 05:01:43
问题 In my application I use connection to Oracle, when connection lost and I try to re-connect I receive exception: java.sql.SQLException: Io exception: Broken pipe at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:273) at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:540) at oracle.jdbc.driver

How to find an asp.net client is disconnected immidiately

家住魔仙堡 提交于 2019-12-21 05:29:12
问题 I'm aware of Response.IsClientConnected but in my scenario it has a great lag. Code: // sample code for sending a dynamic file in chuncks long bytesSent = 0; while (continueSending) { if (!AskReceiverToContinue()) break; if (!Response.IsClientConnected) break; // Your suggestion goes here... :) try { Response.OutputStream.Write(buffer, 0, buffer.Length); bytesSent += buffer.Length; } Catch { // To my experience, this is more reliable than Response.IsClientConnected continueSending = false; }

android- ble device status shows connected for some seconds even after turning off the device

匆匆过客 提交于 2019-12-12 20:08:53
问题 I m developing a ble app that goes out of range many times or turns off, it is designed to do so. if connected to android if i turn off my Bluetooth low energy (smart) device the Bluetooth manager still keeps that profile for some time and then removes it after calling the onClientConnectionState() method. Even the device is visible in the list i get from getConnectedDevices(int) . how can i invoke the method device removal from the android device 回答1: There are two parameters used in ble

SMS goes to the inbox when the mobile is disconnected

只愿长相守 提交于 2019-12-11 17:17:52
问题 I'm using J2ME WMA to send/receive SMS into a specific port, wich in my case is port 50000. When one of the mobile devices is not running the application the message goes to the inbox, which by default is port 0. Is there any way to prevent this from happening? 回答1: PushRegistry resolves the issue but it's only available in WMA 2.0. Check the WMADemo sample at JavaME SDK 3.0. 来源: https://stackoverflow.com/questions/4932972/sms-goes-to-the-inbox-when-the-mobile-is-disconnected

Flex - Is there a way to change the “Channel Disconnected” error message?

强颜欢笑 提交于 2019-12-11 11:53:35
问题 I have a Flash app with a PHP backend. Whenever there is a PHP error, I get the "Channel Disconnected before an acknowledgement was received" error message. I'm getting ready to push my project to beta and I would prefer if this message said something more like "There was a PHP error, please log a bug" or something instead of a message they don't understand. Anyone know of a way for me to change this error message? BTW I'm pretty much a noob when it comes to Flash programming so please be

Using JMS, is there any way to store messages on intermittently disconnected clients and forward them to a broker when a network is available?

亡梦爱人 提交于 2019-12-07 22:58:06
问题 I am considering an architecture where I have clients that are intermittently connected to a network. I would like to store messages created on these clients in a JMS queue when the network is not available and have these forwarded to a central message broker when the clients are on the network. (The user has control over the network, e.g. dialing in, so it's not an intermittent connection like with a mobile phone.) Are there any JMS implementations that provide this feature? 回答1: You can

Using JMS, is there any way to store messages on intermittently disconnected clients and forward them to a broker when a network is available?

試著忘記壹切 提交于 2019-12-06 11:42:21
I am considering an architecture where I have clients that are intermittently connected to a network. I would like to store messages created on these clients in a JMS queue when the network is not available and have these forwarded to a central message broker when the clients are on the network. (The user has control over the network, e.g. dialing in, so it's not an intermittent connection like with a mobile phone.) Are there any JMS implementations that provide this feature? You can embed an activeMQ broker into your application http://activemq.apache.org/how-do-i-embed-a-broker-inside-a

java.sql.SQLException: Io exception: Broken pipe how to recover without restart?

只愿长相守 提交于 2019-12-05 05:51:51
In my application I use connection to Oracle, when connection lost and I try to re-connect I receive exception: java.sql.SQLException: Io exception: Broken pipe at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:273) at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:540) at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:264) at oracle.jdbc.driver.OracleResultSetImpl

How to find an asp.net client is disconnected immidiately

二次信任 提交于 2019-12-03 16:31:21
I'm aware of Response.IsClientConnected but in my scenario it has a great lag. Code: // sample code for sending a dynamic file in chuncks long bytesSent = 0; while (continueSending) { if (!AskReceiverToContinue()) break; if (!Response.IsClientConnected) break; // Your suggestion goes here... :) try { Response.OutputStream.Write(buffer, 0, buffer.Length); bytesSent += buffer.Length; } Catch { // To my experience, this is more reliable than Response.IsClientConnected continueSending = false; } } The problem is the actual received bytes by client is very smaller in amount than my bytesSent . It