tracker issue : CF-3037384

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 75211:(Watson Migration Closure)ColdFusion should really be providing dynamic classloading to applications

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Jared Rypka-Hauer / Jared C Rypka-Hauer (Jared Rypka-Hauer)

Created: 01/27/2009

Components: Installation/Config, JEE Deployment

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 10

Problem:

ColdFusion should really be providing dynamic classloading to applications. This could be accomplished by a couple simple additions:

1) Add an optional third argument to createObject() for java classes:

createObject("java","com.foo.bar.Fiddle","c:\path\to\file.jar")

This would have the side effect of loading the jar file into the current context classloader so that all classes are available from that point on.

2) For the java/ejb variant of cfobject syntax, allow the following addition for the action attribute:

<cfobject action="load" classpath="c:\path\to\files\and\folders" />

This loads all specified classes into the context classloader.
Method:

Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037384

External Customer Info:
External Company:
External Customer Name: Jared C Rypka-Hauer
External Customer Email: 08C411A143BC38A7992016B6
External Test Config: 01/27/2009

Attachments:

This bug has been voted..
Vote by External U.
24086 | November 10, 2011 07:14:53 PM GMT
This bug has been voted..
Vote by External U.
24087 | November 10, 2011 07:14:54 PM GMT
This bug has been voted..
Vote by External U.
24088 | November 10, 2011 07:14:56 PM GMT
This bug has been voted..
Vote by External U.
24089 | November 10, 2011 07:14:57 PM GMT
it would certianly make working w/java libs less of a PITA.
Vote by External U.
24090 | November 10, 2011 07:14:59 PM GMT
This bug has been voted..
Vote by External U.
24091 | November 10, 2011 07:15:01 PM GMT
This bug has been voted..
Vote by External U.
24092 | November 10, 2011 07:15:03 PM GMT
I support #1 but not #2. I'd rather see a list of file paths / directories as the argument to createObject() so it is more like a classpath. I don't see any benefit of just "loading" classes independent of an instantiation. I would expect a class loader to be created behind the scenes for each unique set of class paths. The class loader context is important for initialization and for the context of Java classes loaded into CFML.
Vote by External U.
24093 | November 10, 2011 07:15:05 PM GMT
This bug has been voted..
Vote by External U.
24094 | November 10, 2011 07:15:06 PM GMT