Hi I was going through this page. Here it states, in short, that an enterprise bean 'must' not access and try to modify the followings classloader, security policy, JVM, threads, IO, AWT, native library etc. I would like to know that we should avoid doing these OR we cant do these? I dont have any app server right now to test myself so any help will be appreciated. Thanks in advance
"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
At least some of these can be done regardless of the explicit restriction. The point is that the appserver does not guarantee that your application will work as expected if you break the restrictions. You'll have to test whether a particular spec-breach causes your particular appserver and application to misbehave.
Thanks to all .. I think as Lasse point out that some of them can be implemented but cant be gauranteed to run on every container. But some like "Nonfinal static class fields are disallowed in EJBs ", I think compiler will give error if I use static non-final field. And some like accessing IO can be done with no gaurantee of running everywhere. Pradeep your link seems good .. thanks . .
But some like "Nonfinal static class fields are disallowed in EJBs ", I think compiler will give error if I use static non-final field.
The complier wont complain. Some containers do not complian even during runtime. Devlating from the retsrictions will make your bean harder to port. The EJB specification states:
"Some Containers may allow the Deployer to grant more, or fewer, permissions to the enterprise bean instances than specified in Table 10. Support for this is not required by the EJB specification. Enterprise beans that rely on more or fewer permissions will not be portable across all EJB Containers."
[ September 08, 2003: Message edited by: Pradeep Bhat ]
R K Singh
Joined: Oct 15, 2001
Originally posted by Pradeep Bhat:
The complier wont complain. Some containers do not complian even during runtime.
It means all the restrictions has to be taken care by programmer manually