Issues in QA using services in the Model like PowerTools do

8 views
Skip to first unread message

Andreas Vestlund

unread,
Jan 18, 2012, 5:15:28 AM1/18/12
to Tridion PowerTools
Hi everyone!

My name is Andreas Vestlund and I'm a developer at Capgemini Sweden. I
am not quite sure I'm in the right place to post this so please
redirect me if I'm wrong. This post is about an issue I have in the
Qualtiy Assurance environment and I hope that someone can shed some
light on why my issue is happening.

I am developing an extension for cropping images and saving back to
Tridion. Before you read my explanation it is good to know that the QA
environment only has 1 content manager server so there should only be
1 server handling incominc service calls, or are the service calls
handled elsewhere? Here's the explanation:

We have a weird issue in our QA environment in the communication
between javascript and .net services using WCF. The services provide
one method to start a process, store it in InstanceContext.Extensions
and then the process will start working. The services also provide a
method to check the status of the started process, and it does this by
getting the stored processes from InstanceContext.Extensions and gets
the process matching the requested process (looking at IDs).

The service classes looks like this:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
[AspNetCompatibilityRequirements(RequirementsMode =
AspNetCompatibilityRequirementsMode.Required)]
public abstract class BaseService

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
[AspNetCompatibilityRequirements(RequirementsMode =
AspNetCompatibilityRequirementsMode.Required)]
public class ExampleService : BaseService

What gets wrong: The javascript calls the Execute method on a service
to start a process, it gets a process id back and it starts calling
GetProcessStatus on the service, with the process id, to see if it is
done. The Execute call and 1-2 of GetProcessStatus calls succeeds but
then the next GetProcessStatus call fails because it didn’t find
process matching the requested one. When logging the hashcode of
InstanceContext I can see that it was the same during the first calls
but in the failing call the hashcode changed. When trying this I am
only executing one service at a time.

Trying the same flow again it fails again, but I can see that the
first calls this second time have the same hashcode as the last
failing call the first try and the failing call the second try has the
same hashcode as the first successful calls in the first try. It looks
like there are two InstanceContexts alive.

Reading this forum thread:
http://social.msdn.microsoft.com/forums/en-us/wcf/thread/FFDD8647-DF27-4428-855A-B3F63BC72524,
it feels like the startup of services might be erroneous but I can't
look at that code since it reside in Tridions code right?

Btw, my extension works well in dev and test environments.

Thanks for your time
Andreas

Peter Kjaer

unread,
Jan 27, 2012, 10:49:26 AM1/27/12
to Tridion PowerTools
Sorry we haven't replied yet. The short answer is that I don't know.
It could be a bug in the Content Manager, or it could be something
else.

I know this question has been sent to Customer Support too; did you
get an answer back yet?
We will likely run into the same issue in the PowerTools.


An alternative I can think of is to store this information in
Application Data instead (so it ends up in the Content Manager
database as custom data).
If all else fails, we can consider doing that.




On Jan 18, 11:15 am, Andreas Vestlund <vestlund.andr...@gmail.com>
wrote:
> Reading this forum thread:http://social.msdn.microsoft.com/forums/en-us/wcf/thread/FFDD8647-DF2...,
Reply all
Reply to author
Forward
0 new messages