Which code segment should you insert at line 17?

You create a service-oriented architecture (SOA) application that will be deployed on a Windows HPC Server 2008 cluster.
The cluster has the following configuration:
A head node named HeadNode01
A Windows Communication Foundation (WCF) broker node Ninety compute nodes
You deploy and register a WCF service named MyWcfService on all compute nodes. You plan to create a client application for the WCF service. You write the following code segment. (Line numbers are included for reference only.)

01 public void InvokeService()
02 {
03 ISchedulerJob job =
04 GetJobReference("HeadNode01", "MyWcfService"); 05 Binding binding = new
06 NetTcpBinding(SecurityMode.None, false);
07 EndpointAddress endpoint = new
08 EndpointAddress(job.EndpointAddresses[0]);
09 MyWcfServiceClient proxy = new
10 MyWcfServiceClient(binding, endpoint);
11 proxy.MyServiceOperation();
12 proxy.Close();
13 }
14 ISchedulerJob GetJobReference(string headNode, 15 string serviceName)
16 {
18 }

You need to ensure that the client application uses an existing shared session that was previously created.
Which code segment should you insert at line 17?

You create a service-oriented architecture (SOA) application that will be deployed on a Windows HPC Server 2008 cluster.
The cluster has the following configuration:
A head node named HeadNode01
A Windows Communication Foundation (WCF) broker node Ninety compute nodes
You deploy and register a WCF service named MyWcfService on all compute nodes. You plan to create a client application for the WCF service. You write the following code segment. (Line numbers are included for reference only.)

01 public void InvokeService()
02 {
03 ISchedulerJob job =
04 GetJobReference("HeadNode01", "MyWcfService"); 05 Binding binding = new
06 NetTcpBinding(SecurityMode.None, false);
07 EndpointAddress endpoint = new
08 EndpointAddress(job.EndpointAddresses[0]);
09 MyWcfServiceClient proxy = new
10 MyWcfServiceClient(binding, endpoint);
11 proxy.MyServiceOperation();
12 proxy.Close();
13 }
14 ISchedulerJob GetJobReference(string headNode, 15 string serviceName)
16 {
18 }

You need to ensure that the client application uses an existing shared session that was previously created.
Which code segment should you insert at line 17?

A.
SessionStartInfo info = new SessionStartInfo(headNode, serviceName); info.Secure = false;
info.ShareSession = true;
Session session = Session.CreateSession(info);
return session.BrokerJob;

B.
SessionStartInfo info = new SessionStartInfo(headNode, serviceName); info.Secure = false;
info.ShareSession = true;
Session session = Session.CreateSession(info);
return session.ServiceJob;

C.
IScheduler sch = new Scheduler();
sch.Connect(headNode);
IFilterCollection flt = sch.CreateFilterCollection(); flt.Add(FilterOperator.Equal, JobPropertyIds.State, JobState.Running); flt.Add(FilterOperator.Equal, JobPropertyIds.JobType, JobType.Broker); ISchedulerJobCollection jobList = sch.GetJobList(flt, null); return jobList[servicename];

D.
IScheduler sch = new Scheduler();
sch.Connect(headNode);
IFilterCollection flt = sch.CreateFilterCollection(); flt.Add(FilterOperator.Equal, JobPropertyIds.State, JobState.Running); flt.Add(FilterOperator.Equal, JobPropertyIds.JobType, JobType.Service); ISchedulerJobCollection jobList = sch.GetJobList(flt, null); return jobList[servicename];



Leave a Reply 0

Your email address will not be published. Required fields are marked *