 |

|
No, there won't be any gridlock in both cases.
If A calls SendSyncTextMsg to B and B is busy doing something else, the call will timeout at most. This will happen no matter how they were connected together.
The question is, if A and B are calling SendSyncTextMsg to each other, how is it possible that they can replay to each other and not causing timeout?
The answer is, when a message arrives, the message handler will be invoked. If you wrote the message handler so that it replies to an incoming message, then the handler will be invoked even if you are in the middle of calling SendSyncTextMsg!
This is because when XYMessenger is waiting for a reply to a SendSyncTextMsg call, it can processe other incoming messages, and it can also forward messages between two other XYMessenger objects.
Now it should be clear that if A is waiting for a reply to SendSyncTextMsg call, other XYMessenger objects connected via A will not be stuck because A can still forward messages from one node to the other.
Hope this helps.
My articles and software tools
|
|
|
|

|
It sounds like there should not be gridlock but my program hangs on SendSyncTextMsg
In regards to problem A:
A. Process A sends SendSyncTextMsg to B. Before B replies (using ReplySyncTextMsg) to A, B calls SendSyncTextMsg to process C.
At this porint B hangs.
process B = XYAdmin
process C = XYRoot (java)
Process A is trying to tell process B to add a user. B then tells process C (XYRoot).
I have tested this without process A, with process B attempting to add a user directly. It works fine. With process A, process B hangs when it calls process C (java XYRoot).
|
|
|
|

|
If you call SendSyncTextMsg to XYAdmin and XYRoot, you will not get any reply unless the message is one of the few documented in the help files. XYAdmin and XYRoot will disregard and delete any message they don't want to process.
If you post your code (the sending part), I will take a look.
My articles and software tools
|
|
|
|

|
[Process A] Process A requests B to add a user to Process C(XYRoot).
int retMsg =0;
string reciever = getUser(MANAGER); //reciever get the value XYAdmin@XXX
string message = name + DELIM + password;
if ( (retMsg = xy.SendSyncTextMsg(reciever, TITLE,message, ADD_USER_MSGID,TIME_OUT_SEC)) > -1 )
{...}
[Process B] B is the "MANAGER" and logged in as XYAdmin@XXX
private int sendXyRootMessage(String title, String message, int appId,boolean isSave)
{
// using debugger
// title= "Spotp"
// message = ""
// appId = -2000000001
String strTo = _xySocket.GetParent(); // Using debugger strTo = "XYRoot@"
int reply = _xySocket.SendSyncTextMsg(strTo,title,message,appId,60);
// hangs here. reply is -1 after timeout
int index = _xySocket.GetMsgIndexWithSenderMsgID(reply);
[Process C] is your XYRoot java utility
A is asking B to add a user to C (XYRoot). This is done since only the XYAdmin can add users.
I tried another scenario with A not in the picture. B can add a user to C without any problems when A is not connected at all.
I tried a third scenario where A uses SendTextMsg instead of SendSyncTextMsg and Process B hangs at the same spot.
Maybe this isn't an issue of communication but some caveats that apply to being logged in as XYAdmin and XYRoot? Process A and B(XYAdmin) both connect to C (XYRoot) as clients. A then requests B to add a user to C.
|
|
|
|

|
the "title" field came out wrong in the above message because of the html on this site. Here it is again: title = "<XYConnect><XYUser>spot</XYUser><XYPassword>p</XYPassword></XYConnect>" Thanks!
|
|
|
|

|
I got it to work!
I changed the communication tree layout.
Process B connects to C (XYROOT) as a client
Process A connects to B as a client.
before it was:
Process A and B were clients to process C
Why does it only work this way??
Thanks
|
|
|
|

|
Hi There, Is it possible to disable XYNTService logging? Thanks, Shibu
|
|
|
|

|
You need to comment out what the WriteLog function does and recompile the code. Or you can add a configuration setting that allows disabling log at run-time.
Good luck.
My articles and software tools
|
|
|
|

|
Hi .
First i would like to thank you for your articles it help me a lot.
Wile trying to use your XYSoapClient.dll ,
if every thing is ok than it is working all right.
but when i try to rase exception like a wrong MethodName
then i get a Soap error print on my crt which does not explain the error
SOAP error:
(null)
only when setting the .... #define XYDISPDRIVER_DEBUG
i get the print messages on my screen but not getting it back to the XYSoapClientApp
so maybe you can add a check for GetIDsOfNames for the MethodName
and throw your own exception
or lean on the system exception and return the Exception->GetErrorMessage
any way right now i think it is not clear what is the Soap error.
thank's ... avner
|
|
|
|
|

|
Hi,
I tried opening the downloaded source code for 'Notification Service' but could not view it in vs.net 2003. Please suggest!
Thanks
Ashu Sharma
|
|
|
|
|

|
I tried using the DLL from your above article. Installed the xyrunproc OK on MS-SQL 2k. Whenever I try and use it, I get "unable to load DLL or a DLL it references" type message. I did not have Framework on the server (W2K Server) but installing framework 1.1 did not fix the problem.
I would LOVE to be able to use this DLL.
John Griffiths
Perth Australia
|
|
|
|

|
You can open the dll in depends.exe to see exactly what dlls it depeneds on. The tool should tell you what is missing on your system. Good luck.
My articles and software tools
|
|
|
|

|
Hi
I did this program by using administrator privilege and it worked.
Is it possible to do so, by using low level user.
So other users who r not administrator can also run their own process
thanks
|
|
|
|

|
Here is the answer to the problem[^] I posted a few days ago in the lounge.
We are given 12 balls that look identical and we know only one of them has a different weight. We are also given a scale that can be used to compare weights of any two subsets of the 12 balls. The problem is find a way to determine which ball has a different weight than the rest by using the scale only 3 times.
Let {B01, B02, ..., B12} be the 12 balls. First, compare weights of {B01, B02, B03, B04} and {B05, B06, B07, B08} using the scale.
Case 1
If the two subsets have the same weight, then the odd ball is in {B09, B10, B11, B12}, other 8 balls all have normal weight. Now it is easy to determine which one in {B09, B10, B11, B12} is the odd ball by using the scale only 2 times (this is left as an exercise).
Case 2
The two subsets have different weights, the odd ball is in one of the subsets and all balls in {B09, B10, B11, B12} are normal. We can further assume that {B01, B02, B03, B04} is heavier than {B05, B06, B07, B08}.
Now we use the scale to compare weights of {B01, B02, B05} and {B03, B04, B06}.
Case 2.1
If {B01, B02, B05} and {B03, B04, B06} have the same weight, then the odd ball is either B07 or B08. We can determine which it is by comparing weight of B07 with anyone of the normal balls.
Case 2.2
If {B01, B02, B05} is heavier than {B03, B04, B06}, then the odd ball is in {B01, B02, B06}. This is because we already know {B01, B02, B03, B04} is heavier group from the previous use of the scale. Now we can determine which one is the odd ball by comparing B01 and B02, if they have the same weight, then B06 is the odd ball, otherwise the heavier one is.
Case 2.3
If {B01, B02, B05} is lighter than {B03, B04, B06}, then the odd ball is in {B03, B04, B05}. We determine which one is the odd ball by comparing B03 and B04, if they have the same weight, then B05 is the odd ball, otherwise the heavier one is.
My articles and software tools
|
|
|
|

|
Nowhere in the problem does it state that the odd ball out is heavier, it just says "one of them has a different weight". So using your logic you could never be certain that you had chosen the correct group of balls.
|
|
|
|

|
netclectic wrote:
Nowhere in the problem does it state that the odd ball out is heavier, it just says "one of them has a different weight".
You are right, that is why the problem is not easy. However, nowhere in the answer I posted did I assume the odd ball is heavier (or lighter). You need to read the answer more carefully.
Let me know if you still have doubt and what part of the answer is not clear.
My articles and software tools
|
|
|
|

|
Hi,
I have found (and implemented) your XYMailClient.DLL in MSAccess 2000. It creates the email message. The recipient's format is "Let Outlook decide". When I use MSMAPI32.OCX the format is "Send using Outlook Rich Text Format". This causes a problem with attachments and TNEF. Can anyone perhaps give me a hint on how to fix this?
Sorry if this is off-topic!
TIA,
Adri
|
|
|
|

|
Hi
I have just unzipped your ODBCService web service ... and attempted to run some of your sample code ... i am getting an error message stating the following:
C:\Inetpub\wwwroot\PublicNet\cmtest\WebForm1.aspx.cs(59): The type or namespace name 'ODBCService' could not be found (are you missing a using directive or an assembly reference?)
C:\Inetpub\wwwroot\PublicNet\cmtest\WebForm1.aspx.cs(61): The type or namespace name 'oService' could not be found (are you missing a using directive or an assembly reference?)
C:\Inetpub\wwwroot\PublicNet\cmtest\WebForm1.aspx.cs(60): The type or namespace name 'oService' could not be found (are you missing a using directive or an assembly reference?)
for some reason it does not seem to be picking up the class .. any ideas why this may be happening?
my code is below:
************************************************
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Web.Services;
namespace cmtest
{
///
/// Summary description for WebForm1.
///
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button1;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Button1_Click(object sender, System.EventArgs e)
{
String sConnect="dsn=cmtest;uid=jttest_usr;pwd=";
String sSQL = "select * from v_dccases";
ODBCService oService = new ODBCService();
oService.Url = "http://localhost/ODBCService/ODBCService.asmx";
String sDataXML = oService.GetXMLStringEx(sConnect, sSQL);
if(sDataXML!="")
{
// process the data
XmlDocument oDoc = new XmlDocument();
oDoc.LoadXml(sDataXML);
// ...
}
else throw new Exception("Query failed: " + sConnect + ", " + sSQL);
}
}
}
*************************************************
thanks
Jon
|
|
|
|

|
First of all, you need to compile and install ODBCService on your machine.
Secondly, you need to add a "web reference" to ODBCService into your project.
Thirdly, depending on how you name the "web referece", you need to add the following to the your source code:
using MyWefRef;
Or you can write code like the following:
MyWefRef.ODBCService oService = new MyWefRef.ODBCService();
Here MyWebRef is the name you use for the web reference to ODBCService in your project.
Good luck.
My articles and software tools
|
|
|
|

|
Hi
Having some problem in sending mail by using System.Net.Mail Namespace
can you suggest some idea how to send mail from an asp.net page and by using System.Net.Mail i dont want to use System.Web.Mail
Plz Help me out
Regards
Rahul
|
|
|
|

|
You did a great job developing xysystem! I have a few questions about what happens when a receiver gets overwhelmed with messages.
1. How big is the message queue?
2. If the receiver is overwhelmed does SendTextMsg return false? I assume it does but this is not mentions in the API. Is there any retry mechanism within SendTextMsg - meaning it will try to send the message again in a few seconds.
3. Will 10 messages sent by process A using SendTextMsg always arrive in the same order to proces B? I believe it would since it returns a boolean value.
Thanks!
|
|
|
|

|
Thanks. Here are the answers.
1. There is no limit on the message queue besides memory capacity. When a message is received, the appropriate handler in the receiver will be invoked, which can do the following:
1) Ignore, leave the message in queue.
2) Delete the message because the message is not expected.
3) Do something to process the message and delete it afterwards.
4) Process the message without deleting it.
5) Save the message somewhere (in a database, for example) for later processing.
2. Typically, SendTextMsg will not return false. This is because the sender and receiver can be connected indirectly via one or more intermediate parties. The intermediate parties will forward the message to the receiver. Even if the receiver is dead, SendTextMsg could still return true. If you want to make sure the receiver does receive the message being sent, use SendSyncTextMsg which will not return until a reply from the receiver is sent back.
3. Yes.
Hope this helps.
--- Xiangyang Liu
My articles and software tools
|
|
|
|

|
Thanks for the quick response!
Under what circumstances will SendTextMsg return false?
I have a few other minor questions:
1. Is XYFileNet & XYFileNetDaemon part of XYSystem 2.0?
2. Can XYRoot be configured (at startup) to run without displaying the window?
Again thanks for developing this framework.
|
|
|
|
 |
|