<o:p> </o:p>
Hi All, <o:p></o:p>
<o:p> </o:p>
I am working
on an application based on three tiered architecture. I have a business Layer
which communicates with the Data Access Layer. Now I created a service layer
that’s going to interact with the Business layer which internally
communicates with Data Access Layer and gets me all the results from the Data Base.
I wish to enforce a security checking in DAL that is when ever an object of DAL
is being created I need to check from which component I am creating. <o:p></o:p>
<o:p> </o:p>
When I try to
create a DAL object in some other layer by referencing it, DAL should throw
exception. <o:p></o:p>
<o:p> </o:p>
My new task
is to create a Decorator Class that must validate or secure the DAL such that
only calls from BL are allowed and the rest are terminated. <o:p></o:p>
<o:p> </o:p>
My question
is how do I achieve this? How should I check in my DAL or Decorator class that
the call has arrived only from BL and not from any other layer?<o:p></o:p>
<o:p> </o:p>
It’s like finding out in which layer a call to the method of DAL
was activated.<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Regards,<o:p></o:p>
Mahesh Thakur<o:p></o:p>
Software
Engineer - Development
AppLabs Technologies Pvt Ltd.
Phone:
+91-40-23398222 Extn. 114<o:p></o:p>
[EMAIL PROTECTED]<o:p></o:p>
<o:p> </o:p>