Original Post
Hi guys This isn't directly game related (apologies). I'm writing some Java threading guidelines with a colleague and, since most of our code runs in an EJB container, an important section relates to the (threading) restrictions placed on EJB programming. Specifically: - non thread management - no synchronisation - no non-final statics I understand the reasoning behind these and I'm pushing to include them in our guidelines. However there is always the (nonsensical to me) argument that the EJB restrictions only apply to the EJB code itself and not any classes deployed with and used by it (in many cases the majority of the EJB's implementation - in our case ALL of it). A supporting argument to this is that the JDK itself breaks all of these restrictions - but must by definition be used in an EJB's implementation. Although the JDK argument is a tough one to counter - I believe it comes down to the JDK and Container being implemented by the same vendor - the vendor knows their implementations and therefore will have addressed any issues. We don't and shouldn't know their implementation so should stick to the restrictions. Not ideal - but sometimes you have to accept things like this. So - any thoughts on this? I've searched for a definitive answer on this - but would be interested in any links people have too. cheers Stubble