Think of what exactly the Reflection API allows you to do: call a class's
method without knowing what the class is, or what the method is. In a simple
app, you would not need to do this. Java is based on OOP, and if your design
pattern is as per OOP, then calling a method ad hoc is out of the question.
Catherine has used Reflection in an apt situation (she's allowing Plug-ins
to be used with her application, so obviously the app does not know today
what methods need to be called) She was wondering if Reflection can be used
to call an application from a servlet, and that's where I wondered how
Reflection can serve the purpose here.

-Shital


>From: Vivek Singh <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>        Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Servlet communication with an exisiting java app
>Date: Tue, 24 Oct 2000 15:54:55 +0530
>
>Its Ok that the API says it should be used with tools, debugger, etc fine.
>But why?
>What will be lost when the Reflection is used in places like the person is
>using....
>Will it be performance/security/development time/etc issue?
>Vivek
>
>
>Hi Catherine,
>
>No, we are not reading the API differently. Reflection is also used in
>generic GUI builders and Bean development. And the app where you have used
>reflection is one such category (ie generic) Whereas, when you asked if
>reflection could be used for Application-Servlet communication, this is
>definitely not in the same category.
>
>I guess sockets are you're best bet here. Also, I'm not certain, but you'll
>have to use the policy tool to allow your application to talk to your
>server(ie if the application does not reside on your server).
>
>Regards,
>-Shital
> >From: Catherine Jung <[EMAIL PROTECTED]>
> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> >        Servlet API Technology." <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: Servlet communication with an exisiting java app
> >Date: Mon, 23 Oct 2000 09:32:27 +0100
> >
> > > How do you mention reflection? I thought Reflection was used very
> > > specifically for writing development tools.
> >
> >I'm reading the API differently then - it says "such as" development
> >tools, debuggers etc. and then goes on to mention serialization and java
> >beans, so I don't see any problem in using it in applications - I've used
> >it myself to allow a user to add plug-ins to an application - a situation
> >where I won't have any idea what the name of the plug-in is until I come
> >to load it - I can't think of any way to do that other than with
> >reflection.
> >
> >However, having given the matter more thought, reflection doesn't help me
> >anyway (Doh!) so sockets it is......
> >
> >Thanks,
> >
> >Catherine
> >
> >___________________________________________________________________________
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the
>body
> >of the message "signoff SERVLET-INTEREST".
> >
> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> >Resources: http://java.sun.com/products/servlet/external-resources.html
> >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.msn.com.
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to