The code I showed was how to use reflection to instantiate a new
instance of a Java class. The ServiceFactory is a static class, so the
same code won't work. The only way I have found to access the
ServiceFactory without using cfobject is to use Java. However, one could
certainly create a Java class to access the ServiceFactory and then call
that class using reflection.

Matt Liotta
President & CEO
Montara Software, Inc.
http://www.montarasoftware.com/
888-408-0900 x901

> -----Original Message-----
> From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 12:16 PM
> To: CF-Talk
> Subject: Re: CFMX ServiceFacotry ?s>>>
> 
> Matt Liotta wrote:
> >
> > <cfscript>
> >     foo = "";
> >     aClass = foo.getClass();
> >     theClass = aClass.forName("what.ever.java.class.i.want");
> >     anInstance = theClass.newInstance();
> > </cfscript>
> 
> I have tried to get at the java.coldfusion.ServiceFactory that way but
> couldn't get it running. Can you post a working example?
> 
> Jochem
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to