Re: [Fwd: Re: [Rcom-l] Building R(D)Com Web Application experiences]

2008-11-21 Thread Thomas Baier

Wayne,

[EMAIL PROTECTED] schrieb:
THanks for the help in retrieving a server under shared use. 

In the VB code example: 


RServerManager.ServerPool.Item("MyR").Server.EvaluateNoReturn("plot(x)")

Is this retrieving a server for shared use or is it doing something different?


It is for shared use, but indeed without tracking uses. So using 
GetServerShared() or GetServerExclusive() is the recommended way. Could 
you please point out, which of the Examples uses .Item() to retrieve a 
server, so I can fix this for the next release.


As has already been pointed out by Julien, special care has to be taken 
into account when using these components from a webserver account. I've 
not yet done this myself, but I have heard that in this case permissions 
for all COM objects have to be set accordingly.


Regards,
Thomas

___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


RE: [Fwd: Re: [Rcom-l] Building R(D)Com Web Application experiences]

2008-11-21 Thread Wayne.W.Jones

Hi Thomas, 


THanks for the help in retrieving a server under shared use. 

In the VB code example: 

RServerManager.ServerPool.Item("MyR").Server.EvaluateNoReturn("plot(x)")

Is this retrieving a server for shared use or is it doing something different?

Regards, 

Wayne



http://rcom.univie.ac.at/server/doc/RServerManager.html


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Thomas
Baier
Sent: 20 November 2008 22:21
To: rcom-l
Subject: [Fwd: Re: [Rcom-l] Building R(D)Com Web Application
experiences]


Hi Wayne,

[EMAIL PROTECTED] schrieb:
> Hi Thomas & fellow R(D)Com users, 
> 
> Thanks for the excellent suggestion of using RserverManager. This would seem 
> to be exactly what I need!
> I have managed to get an example in VBA working (See VBA code at bottom of 
> email). 
> 
> However, when I try to run a corresponding example using .NET with C# I run 
> into difficulty. 
> I can add a IStatConnector-objects to RserverManager with no problems but I 
> can't seem to retrieve it back again!
> In VBA the  RServerManager has a method called "Item" which I can pass in a 
> string to retrieve my IStatConnector session!
> The methods, classes, constructors for the  .NET example are quite different. 
> 
> Here is the C# code I used to set up an R session and store the 
> IStatConnector called "RLink" into the RServermanager. 
> Does anyone know how to get it back? i.e. can anyone translate the VBCode
> 
> Call RServerManager.ServerPool.Item("MyR").Server.EvaluateNoReturn("plot(x)")
> 
> to C#?

The following piece of code retrieves a server called "R" for shared use
and produces a plot:

RServerManager.ServerPool lServerManager =
  new RServerManager.ServerPool();
 RServerManager.ServerItem lItem =
  lServerManager.GetServerShared("R");
 lItem.Server.EvaluateNoReturn("plot(sin(1:100))");

I hope this helps,

Thomas



___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at


[Fwd: Re: [Rcom-l] Building R(D)Com Web Application experiences]

2008-11-20 Thread Thomas Baier

Hi Wayne,

[EMAIL PROTECTED] schrieb:
Hi Thomas & fellow R(D)Com users, 


Thanks for the excellent suggestion of using RserverManager. This would seem to 
be exactly what I need!
I have managed to get an example in VBA working (See VBA code at bottom of email). 

However, when I try to run a corresponding example using .NET with C# I run into difficulty. 
I can add a IStatConnector-objects to RserverManager with no problems but I can't seem to retrieve it back again!

In VBA the  RServerManager has a method called "Item" which I can pass in a 
string to retrieve my IStatConnector session!
The methods, classes, constructors for the  .NET example are quite different. 

Here is the C# code I used to set up an R session and store the IStatConnector called "RLink" into the RServermanager. 
Does anyone know how to get it back? i.e. can anyone translate the VBCode


Call RServerManager.ServerPool.Item("MyR").Server.EvaluateNoReturn("plot(x)")

to C#?


The following piece of code retrieves a server called "R" for shared use
and produces a plot:

RServerManager.ServerPool lServerManager =
  new RServerManager.ServerPool();
RServerManager.ServerItem lItem =
  lServerManager.GetServerShared("R");
lItem.Server.EvaluateNoReturn("plot(sin(1:100))");

I hope this helps,

Thomas



___
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at