Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
QuestionTrimEnd Question Pin
MumbleB26-Aug-08 2:21
MumbleB26-Aug-08 2:21 
AnswerRe: TrimEnd Question Pin
Stephen Lintott26-Aug-08 2:27
Stephen Lintott26-Aug-08 2:27 
GeneralRe: TrimEnd Question Pin
MumbleB26-Aug-08 2:37
MumbleB26-Aug-08 2:37 
GeneralRe: TrimEnd Question Pin
Stephen Lintott26-Aug-08 4:53
Stephen Lintott26-Aug-08 4:53 
AnswerRe: TrimEnd Question Pin
Guffa26-Aug-08 2:41
Guffa26-Aug-08 2:41 
GeneralRe: TrimEnd Question Pin
MumbleB26-Aug-08 3:55
MumbleB26-Aug-08 3:55 
AnswerRe: TrimEnd Question Pin
Guffa26-Aug-08 8:36
Guffa26-Aug-08 8:36 
QuestionObjects getting lost in .Net remoting object pooling.......Plz help us its an urgent...We r facing the issue in production Pin
Falguni Joshi26-Aug-08 2:17
Falguni Joshi26-Aug-08 2:17 
HI ,

I am trying to impement object pooling.Where the object are remote objects.
Using this remote object i am calling a class in which i am having a method with while loop which runs for 1 min.

I found that after some time my remote object are lost.

it means if i have 10 object
Then for all the 10 object the method is called a part of the code is excuted but after that we don't know where that object goes .As at last we are updating a log file which is not getting updated so we concluded that remote object gets lost ...
Please help us on thiss...

The sample code is as

public class CallingClass : MarshalByRefObject, IBusinessComponent
{

[System.Runtime.Remoting.Messaging.OneWay()]
void IBusinessComponent.ProcessRequestOW1(Int32 hashCode,string URI)
{

CretaeLOG("Start")
ProcessRequest(hashCode);
CretaeLOG("END")
}
}

public void ProcessRequest(Int32 hashCode)
{
int dtStart = DateTime.Now.Minute;
int initialMinute = dtStart;
while (dtStart < initialMinute + 1)
{
dtStart = DateTime.Now.Minute;
}
}


Singleton class is as follow:

public sealed class ObjInstance
{

private Int32 m_Hashcode;
private string m_URI;

public Int32 Hashcode
{
get { return m_Hashcode; }
set { m_Hashcode = value; }
}
public string URI
{
get { return m_URI; }
set { m_URI = value; }
}
public PIMS.Interfaces.IBusinessComponent IBusinessObject;

}
internal sealed class PoolObject
{

private static PoolObject poolInstance = null;
private static object syncRoot = new object();
public Hashtable objectPool = new Hashtable();
Int32 maxPoolSize = 5;
public Hashtable usedObject = new Hashtable();
public Hashtable usedObjectHashCode = new Hashtable();
//Timer poolTimer = new Timer();


private PoolObject()
{
//When pool timer's timeout occures call MoveToPool function to get available objects
// poolTimer.Elapsed += new ElapsedEventHandler(MovetoPool);
//poolTimer.Tick += new EventHandler(poolTimer_Tick);
// poolTimer.Interval = 60;
// poolTimer.Start();
CreatePool();
}



public static PoolObject Instance
{
get
{
if (poolInstance == null)
{
lock (syncRoot)
{
poolInstance = new PoolObject();
}
}

return poolInstance;

}
}


public void CreatePool()
{
.... Some code here.........
}

public PIMS.Interfaces.IBusinessComponent GetObjectFromPool(string URI, ref Int32 hashCode)
{

.... Some code here.........
}


public void MovetoPool()
{
.... Some code here.........
}
} Cry | :(( Cry | :((
AnswerRe: Objects getting lost in .Net remoting object pooling.......Plz help us its an urgent...We r facing the issue in production Pin
leppie26-Aug-08 2:48
leppie26-Aug-08 2:48 
AnswerRe: Objects getting lost in .Net remoting object pooling.......Plz help us its an urgent...We r facing the issue in production Pin
leppie26-Aug-08 2:54
leppie26-Aug-08 2:54 
AnswerEveryone drop what they are doing! Pin
leckey26-Aug-08 3:14
leckey26-Aug-08 3:14 
GeneralRe: Everyone drop what they are doing! Pin
leppie26-Aug-08 3:52
leppie26-Aug-08 3:52 
GeneralRe: Everyone drop what they are doing! Pin
Pete O'Hanlon26-Aug-08 5:04
mvePete O'Hanlon26-Aug-08 5:04 
Questionhow to enable FolderBrowserDialog Control in Web Application! Pin
nitar25-Aug-08 23:46
nitar25-Aug-08 23:46 
AnswerRe: how to enable FolderBrowserDialog Control in Web Application! Pin
Manas Bhardwaj26-Aug-08 0:15
professionalManas Bhardwaj26-Aug-08 0:15 
QuestionDifference between in intializing the Object of the class Pin
.NET- India 25-Aug-08 23:39
.NET- India 25-Aug-08 23:39 
AnswerRe: Difference between in intializing the Object of the class Pin
J4amieC25-Aug-08 23:41
J4amieC25-Aug-08 23:41 
GeneralRe: Difference between in intializing the Object of the class Pin
.NET- India 25-Aug-08 23:51
.NET- India 25-Aug-08 23:51 
AnswerRe: Difference between in intializing the Object of the class Pin
Shpendh25-Aug-08 23:41
Shpendh25-Aug-08 23:41 
GeneralRe: Difference between in intializing the Object of the class Pin
.NET- India 25-Aug-08 23:48
.NET- India 25-Aug-08 23:48 
GeneralRe: Difference between in intializing the Object of the class Pin
lisan_al_ghaib26-Aug-08 1:25
lisan_al_ghaib26-Aug-08 1:25 
GeneralRe: Difference between in intializing the Object of the class Pin
Shpendh26-Aug-08 1:43
Shpendh26-Aug-08 1:43 
GeneralRe: Difference between in intializing the Object of the class Pin
lisan_al_ghaib26-Aug-08 1:45
lisan_al_ghaib26-Aug-08 1:45 
GeneralRe: Difference between in intializing the Object of the class Pin
Shpendh26-Aug-08 1:50
Shpendh26-Aug-08 1:50 
AnswerRe: Difference between in intializing the Object of the class Pin
Pete O'Hanlon26-Aug-08 0:59
mvePete O'Hanlon26-Aug-08 0:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.