on 10-11-2005 3:40 PM
Can anyone tell me what this error message means:
"Cannot change property as Destination is Locked. This happend when the desitnation is assigned to a connection."
The connection was working fine until I received this message. Could this be caused by to many open connections?
Can I programatically unlock the destination.
A destination is locked, when it is associated with an open connection. In this case it is not allowed to change properties of the destination, because they could anyway not incluence the open connection. Here is a sample:
Destination dest = new Destination();
dest.AppServerHost = "host";
// ...
Connection conn = Connection.GetConnection(dest);
// now conn and dest are associated.
dest.AppServerHost = "host1"; // still possible, because conn is not yet open.
conn.Open();
dest.AppServerHost = "host3"; // throws exception, because it is too late to change the settings.
conn.Close();
dest.AppServerHost = "host4"; // works again.
If you don't like this behavior, you can create the connection from the connection string instead of having this "coupling" of Destination and Connection:
Destination dest = new Destination();
dest.AppServerHost = "host";
// ...
Connection conn = Connection.GetConnection(dest.ConnectionString);
// Any further change on dest don't have any effect on conn!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.