RE: Java in CF (CFMX) - MM Drivers

2002-12-13 Thread Mike Chambers
If you have a question that is directed directly to Macromedia then you
need to contact Macromedia directly. That means either contacting
support, or sending your question to me. At the least CC us on your
post. Otherwise, there is a chance we might not see your original
question, or a follow up.

We spend a lot of time helping people out on this list. Most of the
people from Macromedia who are on the list and help people out are not
here because they have to be, but because they love and are dedicated to
the product and community. However, again, if you need direct support
from Macromedia, then you need to contact us directly. We have processes
and channels setup to provide the type of 1 on 1 support /communication
that you appear to be looking for.

Again, please feel to email me directly with any questions that you have
that are addressed to the macromedia in general, or the CF Team in
particular.

btw, this should not be taken to mean that we will not continue to be
active on the list helping people out. It just means that with the high
volume of messages on the list, we miss questions / topics sometimes.

mike chambers

[EMAIL PROTECTED]


> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 13, 2002 12:49 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
> 
> 
> MM-Product Team...
> When Vernon Viehe(MM Community manager) exited.. there were 
> promises from
> MM..that MM would provide better support through other MM Folks...
> *Is this a JOKE?*
> Vernon did a much better job..than whoever is in that place now.
> 
> This Thread Question was directed to MM..since there is no 
> DOCUMENTATION on
> details of drivers and such.. NEVER Got an Answer.!
> 
> CFMX Updater 2 Release Notes...
> DB2-Specific Issues
> An exception could be generated when connecting to DB2 AS/400 v4R5.
> 15002962(ID).
> 
> ***STILL DOING THE SAME THING with V4R5 and V5R1***
> 
> Is MM(Product-Team) going to provide the documentation 
> details.. or do we have
> to wait another year.. for a reponse...?
> 
> BTW.. This Thread is dating back early last Month.
> 
> Joe
> 
> 
> On Mon, 09 Dec 2002 07:20:57 -0800 Joe Eugene 
> <[EMAIL PROTECTED]> wrote:
> 
> > Phil/MM Product Team
> > 
> > > All the drivers are from DataDirect/Merant
> > > except for the mySQL driver.
> > 
> > Are you sure about the above? What Java Type IV
> > driver is provided with CFMX
> > for DB2 UDB?
> > This?
> > 
> http://www.datadirect-technologies.com/products/jdbc/jdbcrelhi
> ghlights.asp
> > The above driver supports DB2 UDB for
> > AS400(iSeries) for V5R4 and V5R1 OS
> > Versions. I havent been able to configure this
> > connection with CFMX..(got a
> > Native JTOpen connection working) and i dont
> > think AS400 DB2 UDB is
> > supported
> > Can you give some documentation on exactly what
> > drivers CMFX
> > uses(Author/Versions)?
> > 
> > It would be very helpful to see some
> > documentation on implementation of
> > "CFQUERY" and how connection pooling works in
> > CFMX.
> > 
> > Thanks
> > Joe
> > 
> > 
> > 
> > On Mon, 9 Dec 2002 08:43:38 -0500  Phil Costa 
> > wrote:
> > 
> > > Better late than never ;-)
> > > 
> > > All the drivers are from DataDirect/Merant
> > > except for the mySQL driver.
> > > 
> > > I believe a third-party JDBC driver would be
> > > managed just like one of the drivers included
> > > with CFMX, but I have to verify that.
> > > 
> > > Phil
> > > 
> > > -Original Message-
> > > From: Joe Eugene
> > [mailto:[EMAIL PROTECTED]]
> > > 
> > > Sent: Saturday, December 07, 2002 11:01 PM
> > > To: CF-Talk
> > > Subject: RE: Java in CF (CFMX) - MM Drivers
> > > 
> > > 
> > > >Anybody from MM Product Team can explain
> > this?
> > > on November 24, 2002 
> > > >5:24 PM
> > > 
> > > Product Teams reply 2 weeks later on the
> > > Thread!. Talked to Sean and figured out this
> > > already. Anyways since you mentioned it, Are
> > > all CFMX Native Drivers "DataDirect"
> > > Drivers(Oracle,DB2 UDB). If you configure a
> > > Type IV Native Datasource in CMFX... Does
> > CFMX
> > > manage connection pooling? Single
> > Connection..
> > > Multiple Statements? How does this work?
> > > 
> > > Thanks
> > > Joe
> > > 
> > > 
> > > -Original Message-
> 

RE: Java in CF (CFMX) - MM Drivers

2002-12-13 Thread Joe Eugene
MM-Product Team...
When Vernon Viehe(MM Community manager) exited.. there were promises from
MM..that MM would provide better support through other MM Folks...
*Is this a JOKE?*
Vernon did a much better job..than whoever is in that place now.

This Thread Question was directed to MM..since there is no DOCUMENTATION on
details of drivers and such.. NEVER Got an Answer.!

CFMX Updater 2 Release Notes...
DB2-Specific Issues
An exception could be generated when connecting to DB2 AS/400 v4R5.
15002962(ID).

***STILL DOING THE SAME THING with V4R5 and V5R1***

Is MM(Product-Team) going to provide the documentation details.. or do we have
to wait another year.. for a reponse...?

BTW.. This Thread is dating back early last Month.

Joe


On Mon, 09 Dec 2002 07:20:57 -0800 Joe Eugene <[EMAIL PROTECTED]> wrote:

> Phil/MM Product Team
> 
> > All the drivers are from DataDirect/Merant
> > except for the mySQL driver.
> 
> Are you sure about the above? What Java Type IV
> driver is provided with CFMX
> for DB2 UDB?
> This?
> http://www.datadirect-technologies.com/products/jdbc/jdbcrelhighlights.asp
> The above driver supports DB2 UDB for
> AS400(iSeries) for V5R4 and V5R1 OS
> Versions. I havent been able to configure this
> connection with CFMX..(got a
> Native JTOpen connection working) and i dont
> think AS400 DB2 UDB is
> supported
> Can you give some documentation on exactly what
> drivers CMFX
> uses(Author/Versions)?
> 
> It would be very helpful to see some
> documentation on implementation of
> "CFQUERY" and how connection pooling works in
> CFMX.
> 
> Thanks
> Joe
> 
> 
> 
> On Mon, 9 Dec 2002 08:43:38 -0500  Phil Costa 
> wrote:
> 
> > Better late than never ;-)
> > 
> > All the drivers are from DataDirect/Merant
> > except for the mySQL driver.
> > 
> > I believe a third-party JDBC driver would be
> > managed just like one of the drivers included
> > with CFMX, but I have to verify that.
> > 
> > Phil
> > 
> > -Original Message-
> > From: Joe Eugene
> [mailto:[EMAIL PROTECTED]]
> > 
> > Sent: Saturday, December 07, 2002 11:01 PM
> > To: CF-Talk
> > Subject: RE: Java in CF (CFMX) - MM Drivers
> > 
> > 
> > >Anybody from MM Product Team can explain
> this?
> > on November 24, 2002 
> > >5:24 PM
> > 
> > Product Teams reply 2 weeks later on the
> > Thread!. Talked to Sean and figured out this
> > already. Anyways since you mentioned it, Are
> > all CFMX Native Drivers "DataDirect"
> > Drivers(Oracle,DB2 UDB). If you configure a
> > Type IV Native Datasource in CMFX... Does
> CFMX
> > manage connection pooling? Single
> Connection..
> > Multiple Statements? How does this work?
> > 
> > Thanks
> > Joe
> > 
> > 
> > -Original Message-
> > From: Phil Costa
> [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 06, 2002 4:49 PM
> > To: CF-Talk
> > Subject: RE: Java in CF (CFMX) - MM Drivers
> > 
> > 
> > It's throwing that error because you're
> trying
> > to access the JDBC drivers in an unlicensed
> > fashion. The DataDirect drivers are licensed
> > for use with ColdFusion, which includes
> support
> > for JSP as well as CFML, not the scenario
> > you're describing.
> > 
> > Phil Costa
> > Sr. Product Manager, ColdFusion
> > Macromedia
> > 
> > 
> > 
> > -Original Message-
> > From: Joe Eugene
> [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, November 24, 2002 5:24 PM
> > To: CF-Talk
> > Subject: RE: Java in CF (CFMX) - MM Drivers
> > 
> > 
> > I got this partially resolved... Sean helped
> > out.. Thanks Sean. It was a classpath
> problem.
> > However after i load the
> > drivers(macromedia.jdbc.MacromediaDriver)
> which
> > is in the "lib" directory of your
> > installation(eg.
> > "G:\CFusionMX\lib\macromedia_drivers.jar")
> and
> > give it the connection url.. Connection con =
> >
> DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServerName:1433"
> > ,"userid","Pwd");
> > 
> > I get an Exception..
> >
> "macromedia.jdbc.MacromediaDriver$InvalidLicenseException:
> > An Enterprise license is needed to use the
> > Macromedia JDBC Drivers on the DB2, Oracle,
> > Sybase and Info rmix servers."
> > 
> > I am running CFMX Enterprise
> > version(6,0,0,48097).  I have the same
> > connection working fine in JSP Pages under
> 

RE: Java in CF (CFMX) - MM Drivers

2002-12-09 Thread Joe Eugene
> > believe a third-party JDBC driver would be managed just like one of the
> drivers included with CFMX,
> is true.

Have you done any tests on how the driver connection pooling works with
native JDBC type IV other connections?

Yea.. i have configured Oracle 8.0.5 and AS400 DB2 V5R1 Native Drivers
and they are working... but am clueless.. on the how this works...
without seeing some documentation of CFQUERY implementation.

It works... How is the QUESTION?

Thanks
Joe


> -Original Message-
> From: Rob Rohan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 1:18 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> We recently moved from SQL7.0 with the included MX
> (DataDirect/Merant) JDBC
> drivers, to SQL2000 with MS provided JDBC drivers and it was (aside from
> microsofts non-standard jdbc uri) simple. In other words
>
> > believe a third-party JDBC driver would be managed just like one of the
> drivers included with CFMX,
>
> is true.
>
> Rob
>
> http://treebeard.sourceforge.net
> http://ruinworld.sourceforge.net
> Scientia Est Potentia
>
> -Original Message-
> From: Phil Costa [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 5:44 AM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> Better late than never ;-)
>
> All the drivers are from DataDirect/Merant except for the mySQL driver.
>
> I believe a third-party JDBC driver would be managed just like one of the
> drivers included with CFMX, but I have to verify that.
>
> Phil
>
> -Original Message-----
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 07, 2002 11:01 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> >Anybody from MM Product Team can explain this? on November 24, 2002
> >5:24 PM
>
> Product Teams reply 2 weeks later on the Thread!. Talked to Sean
> and figured
> out this already. Anyways since you mentioned it, Are all CFMX Native
> Drivers "DataDirect" Drivers(Oracle,DB2 UDB). If you configure a Type IV
> Native Datasource in CMFX... Does CFMX manage connection pooling? Single
> Connection.. Multiple Statements? How does this work?
>
> Thanks
> Joe
>
>
> -Original Message-
> From: Phil Costa [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 4:49 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> It's throwing that error because you're trying to access the JDBC
> drivers in
> an unlicensed fashion. The DataDirect drivers are licensed for use with
> ColdFusion, which includes support for JSP as well as CFML, not
> the scenario
> you're describing.
>
> Phil Costa
> Sr. Product Manager, ColdFusion
> Macromedia
>
>
>
> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 5:24 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> I got this partially resolved... Sean helped out.. Thanks Sean. It was a
> classpath problem. However after i load the
> drivers(macromedia.jdbc.MacromediaDriver) which is in the "lib"
> directory of
> your installation(eg. "G:\CFusionMX\lib\macromedia_drivers.jar")
> and give it
> the connection url.. Connection con =
> DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServer
> Name:1433"
> ,"userid","Pwd");
>
> I get an Exception..
> "macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise
> license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle,
> Sybase and Info rmix servers."
>
> I am running CFMX Enterprise version(6,0,0,48097).  I have the same
> connection working fine in JSP Pages under CFMX. Are CFMX
> Enterprise drivers
> protected from usage in Java Applications(Console/Swing)? Anybody from MM
> Product Team can explain this?
>
> Joe
>
>
> > -Original Message-
> > From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 22, 2002 4:11 PM
> > To: CF-Talk
> > Subject: RE: Java in CF (CFMX) - MM Drivers
> >
> >
> > I can use the CFMX MM DB drivers in a JSP page..No problem. however..
> > i need to use it in a Java Application..tried to load the Driver..
> > Class.forName("macromedia.jdbc.MacromediaDriver")
> > Keep getting ClassNotFound Error..
> > I put the macromedia_driver.jar in the class path.. still not
> > loading.. Do i need to import something? What am i missing?
> >
> > Joe
> >
> > PS:Old Thread.
> > I am just catching up on this Thread..
> > Isnt the ide

RE: Java in CF (CFMX) - MM Drivers

2002-12-09 Thread Rob Rohan
We recently moved from SQL7.0 with the included MX (DataDirect/Merant) JDBC
drivers, to SQL2000 with MS provided JDBC drivers and it was (aside from
microsofts non-standard jdbc uri) simple. In other words

> believe a third-party JDBC driver would be managed just like one of the
drivers included with CFMX,

is true.

Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Phil Costa [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 5:44 AM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


Better late than never ;-)

All the drivers are from DataDirect/Merant except for the mySQL driver.

I believe a third-party JDBC driver would be managed just like one of the
drivers included with CFMX, but I have to verify that.

Phil

-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 07, 2002 11:01 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


>Anybody from MM Product Team can explain this? on November 24, 2002
>5:24 PM

Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured
out this already. Anyways since you mentioned it, Are all CFMX Native
Drivers "DataDirect" Drivers(Oracle,DB2 UDB). If you configure a Type IV
Native Datasource in CMFX... Does CFMX manage connection pooling? Single
Connection.. Multiple Statements? How does this work?

Thanks
Joe


-Original Message-
From: Phil Costa [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 4:49 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


It's throwing that error because you're trying to access the JDBC drivers in
an unlicensed fashion. The DataDirect drivers are licensed for use with
ColdFusion, which includes support for JSP as well as CFML, not the scenario
you're describing.

Phil Costa
Sr. Product Manager, ColdFusion
Macromedia



-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 24, 2002 5:24 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


I got this partially resolved... Sean helped out.. Thanks Sean. It was a
classpath problem. However after i load the
drivers(macromedia.jdbc.MacromediaDriver) which is in the "lib" directory of
your installation(eg. "G:\CFusionMX\lib\macromedia_drivers.jar") and give it
the connection url.. Connection con =
DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServerName:1433"
,"userid","Pwd");

I get an Exception..
"macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise
license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle,
Sybase and Info rmix servers."

I am running CFMX Enterprise version(6,0,0,48097).  I have the same
connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers
protected from usage in Java Applications(Console/Swing)? Anybody from MM
Product Team can explain this?

Joe


> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 4:11 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> I can use the CFMX MM DB drivers in a JSP page..No problem. however..
> i need to use it in a Java Application..tried to load the Driver..
> Class.forName("macromedia.jdbc.MacromediaDriver")
> Keep getting ClassNotFound Error..
> I put the macromedia_driver.jar in the class path.. still not
> loading.. Do i need to import something? What am i missing?
>
> Joe
>
> PS:Old Thread.
> I am just catching up on this Thread..
> Isnt the idea to comply with J2EE Architecture? Model-View-Controller
> model etc.. Why would some want to write in-line Java..? Anyways...
>
>
>
> On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa <[EMAIL PROTECTED]>
> wrote:
>
> > The decision to disallow inline java code was
> > definitely not a cut and dry one. One reason
> > was definitely to enforce a cleaner separation
> > of syntax; the other, which I hadn't mentioned,
> > was to remove some additional complexity from
> > the parsing/compiling process. Because of the
> > differences between typing and syntax, parsing
> > a page that had both Java and CFML/CFScript
> > would have been a bear.
> >
> > Phil
> >
> > -Original Message-
> > From: Jon Hall [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 22, 2002 2:37 AM
> > To: CF-Talk
> > Subject: Re: Java in CF (CFMX)
> >
> >
> > Thursday, November 21, 2002, 11:54:58 PM, you
> > wrote:
> >
> > MT> Jon Hall wrote:
> > >> The case for allowing inline Java is simple,
> > CF developers can use
> > >> Java without having to know everything about
> > Java. Meth

RE: Java in CF (CFMX) - MM Drivers

2002-12-09 Thread Joe Eugene
Phil/MM Product Team

> All the drivers are from DataDirect/Merant
> except for the mySQL driver.

Are you sure about the above? What Java Type IV driver is provided with CFMX
for DB2 UDB?
This?
http://www.datadirect-technologies.com/products/jdbc/jdbcrelhighlights.asp
The above driver supports DB2 UDB for AS400(iSeries) for V5R4 and V5R1 OS
Versions. I havent been able to configure this connection with CFMX..(got a
Native JTOpen connection working) and i dont think AS400 DB2 UDB is
supported
Can you give some documentation on exactly what drivers CMFX
uses(Author/Versions)?

It would be very helpful to see some documentation on implementation of
"CFQUERY" and how connection pooling works in CFMX.

Thanks
Joe



On Mon, 9 Dec 2002 08:43:38 -0500  Phil Costa <[EMAIL PROTECTED]> wrote:

> Better late than never ;-)
> 
> All the drivers are from DataDirect/Merant
> except for the mySQL driver.
> 
> I believe a third-party JDBC driver would be
> managed just like one of the drivers included
> with CFMX, but I have to verify that.
> 
> Phil
> 
> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> 
> Sent: Saturday, December 07, 2002 11:01 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
> 
> 
> >Anybody from MM Product Team can explain this?
> on November 24, 2002 
> >5:24 PM
> 
> Product Teams reply 2 weeks later on the
> Thread!. Talked to Sean and figured out this
> already. Anyways since you mentioned it, Are
> all CFMX Native Drivers "DataDirect"
> Drivers(Oracle,DB2 UDB). If you configure a
> Type IV Native Datasource in CMFX... Does CFMX
> manage connection pooling? Single Connection..
> Multiple Statements? How does this work?
> 
> Thanks
> Joe
> 
> 
> -----Original Message-
> From: Phil Costa [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 4:49 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
> 
> 
> It's throwing that error because you're trying
> to access the JDBC drivers in an unlicensed
> fashion. The DataDirect drivers are licensed
> for use with ColdFusion, which includes support
> for JSP as well as CFML, not the scenario
> you're describing.
> 
> Phil Costa
> Sr. Product Manager, ColdFusion
> Macromedia
> 
> 
> 
> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 5:24 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
> 
> 
> I got this partially resolved... Sean helped
> out.. Thanks Sean. It was a classpath problem.
> However after i load the
> drivers(macromedia.jdbc.MacromediaDriver) which
> is in the "lib" directory of your
> installation(eg.
> "G:\CFusionMX\lib\macromedia_drivers.jar") and
> give it the connection url.. Connection con =
> DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServerName:1433"
> ,"userid","Pwd");
> 
> I get an Exception..
> "macromedia.jdbc.MacromediaDriver$InvalidLicenseException:
> An Enterprise license is needed to use the
> Macromedia JDBC Drivers on the DB2, Oracle,
> Sybase and Info rmix servers."
> 
> I am running CFMX Enterprise
> version(6,0,0,48097).  I have the same
> connection working fine in JSP Pages under
> CFMX. Are CFMX Enterprise drivers protected
> from usage in Java Applications(Console/Swing)?
> Anybody from MM Product Team can explain this?
> 
> Joe
> 
> 
> > -Original Message-
> > From: Joe Eugene
> [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 22, 2002 4:11 PM
> > To: CF-Talk
> > Subject: RE: Java in CF (CFMX) - MM Drivers
> >
> >
> > I can use the CFMX MM DB drivers in a JSP
> page..No problem. however.. 
> > i need to use it in a Java Application..tried
> to load the Driver..
> >
> Class.forName("macromedia.jdbc.MacromediaDriver")
> > Keep getting ClassNotFound Error..
> > I put the macromedia_driver.jar in the class
> path.. still not 
> > loading.. Do i need to import something? What
> am i missing?
> >
> > Joe
> >
> > PS:Old Thread.
> > I am just catching up on this Thread..
> > Isnt the idea to comply with J2EE
> Architecture? Model-View-Controller 
> > model etc.. Why would some want to write
> in-line Java..? Anyways...
> >
> >
> >
> > On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa
> 
> > wrote:
> >
> > > The decision to disallow inline java code
> was
> > > definitely not a cut and dry one. One
> reason
> > > was definitely to enforce a cleaner
> separation
&

RE: Java in CF (CFMX) - MM Drivers

2002-12-09 Thread Phil Costa
Better late than never ;-)

All the drivers are from DataDirect/Merant except for the mySQL driver.

I believe a third-party JDBC driver would be managed just like one of the drivers 
included with CFMX, but I have to verify that.

Phil

-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 07, 2002 11:01 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


>Anybody from MM Product Team can explain this? on November 24, 2002 
>5:24 PM

Product Teams reply 2 weeks later on the Thread!. Talked to Sean and figured out this 
already. Anyways since you mentioned it, Are all CFMX Native Drivers "DataDirect" 
Drivers(Oracle,DB2 UDB). If you configure a Type IV Native Datasource in CMFX... Does 
CFMX manage connection pooling? Single Connection.. Multiple Statements? How does this 
work?

Thanks
Joe


-Original Message-
From: Phil Costa [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 4:49 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


It's throwing that error because you're trying to access the JDBC drivers in an 
unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which 
includes support for JSP as well as CFML, not the scenario you're describing.

Phil Costa
Sr. Product Manager, ColdFusion
Macromedia



-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 24, 2002 5:24 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath 
problem. However after i load the
drivers(macromedia.jdbc.MacromediaDriver) which is in the "lib" directory of your 
installation(eg. "G:\CFusionMX\lib\macromedia_drivers.jar") and give it the connection 
url.. Connection con = 
DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServerName:1433"
,"userid","Pwd");

I get an Exception..
"macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is 
needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix 
servers."

I am running CFMX Enterprise version(6,0,0,48097).  I have the same connection working 
fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java 
Applications(Console/Swing)? Anybody from MM Product Team can explain this?

Joe


> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 4:11 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> I can use the CFMX MM DB drivers in a JSP page..No problem. however.. 
> i need to use it in a Java Application..tried to load the Driver..
> Class.forName("macromedia.jdbc.MacromediaDriver")
> Keep getting ClassNotFound Error..
> I put the macromedia_driver.jar in the class path.. still not 
> loading.. Do i need to import something? What am i missing?
>
> Joe
>
> PS:Old Thread.
> I am just catching up on this Thread..
> Isnt the idea to comply with J2EE Architecture? Model-View-Controller 
> model etc.. Why would some want to write in-line Java..? Anyways...
>
>
>
> On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa <[EMAIL PROTECTED]>
> wrote:
>
> > The decision to disallow inline java code was
> > definitely not a cut and dry one. One reason
> > was definitely to enforce a cleaner separation
> > of syntax; the other, which I hadn't mentioned,
> > was to remove some additional complexity from
> > the parsing/compiling process. Because of the
> > differences between typing and syntax, parsing
> > a page that had both Java and CFML/CFScript
> > would have been a bear.
> >
> > Phil
> >
> > -Original Message-
> > From: Jon Hall [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 22, 2002 2:37 AM
> > To: CF-Talk
> > Subject: Re: Java in CF (CFMX)
> >
> >
> > Thursday, November 21, 2002, 11:54:58 PM, you
> > wrote:
> >
> > MT> Jon Hall wrote:
> > >> The case for allowing inline Java is simple,
> > CF developers can use
> > >> Java without having to know everything about
> > Java. Methods and
> > >> classes are easy to get. Compiling,
> > classpath's, and understanding
> > >> the lengths Java goes to, to abstract
> > everything, etc. is not.
> >
> > MT> Knowing just a little about a language as
> > deep/complex as Java can
> > MT> be "dangerous" in a number of ways...
> >
> > MT> It's very easy to run into errors in java
> > if you don't understand
> > MT> how it all works (ex. trying to instantiate
> > an interface).

RE: Java in CF (CFMX) - MM Drivers

2002-12-07 Thread Joe Eugene
>Anybody from MM Product Team can explain this? on November 24, 2002 5:24 PM

Product Teams reply 2 weeks later on the Thread!. Talked to Sean and
figured out this already. Anyways since you mentioned it,
Are all CFMX Native Drivers "DataDirect" Drivers(Oracle,DB2 UDB).
If you configure a Type IV Native Datasource in CMFX...
Does CFMX manage connection pooling?
Single Connection.. Multiple Statements? How does this work?

Thanks
Joe


-Original Message-
From: Phil Costa [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 4:49 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


It's throwing that error because you're trying to access the JDBC drivers in
an unlicensed fashion. The DataDirect drivers are licensed for use with
ColdFusion, which includes support for JSP as well as CFML, not the scenario
you're describing.

Phil Costa
Sr. Product Manager, ColdFusion
Macromedia



-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 24, 2002 5:24 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


I got this partially resolved... Sean helped out.. Thanks Sean. It was a
classpath problem. However after i load the
drivers(macromedia.jdbc.MacromediaDriver) which is in the "lib" directory of
your installation(eg. "G:\CFusionMX\lib\macromedia_drivers.jar") and give it
the connection url.. Connection con =
DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServerName:1433"
,"userid","Pwd");

I get an Exception..
"macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise
license is needed to use the Macromedia JDBC Drivers on the DB2, Oracle,
Sybase and Info rmix servers."

I am running CFMX Enterprise version(6,0,0,48097).  I have the same
connection working fine in JSP Pages under CFMX. Are CFMX Enterprise drivers
protected from usage in Java Applications(Console/Swing)? Anybody from MM
Product Team can explain this?

Joe


> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 4:11 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> I can use the CFMX MM DB drivers in a JSP page..No problem. however..
> i need to use it in a Java Application..tried to load the Driver..
> Class.forName("macromedia.jdbc.MacromediaDriver")
> Keep getting ClassNotFound Error..
> I put the macromedia_driver.jar in the class path.. still not
> loading.. Do i
> need to import something? What am i missing?
>
> Joe
>
> PS:Old Thread.
> I am just catching up on this Thread..
> Isnt the idea to comply with J2EE Architecture? Model-View-Controller
> model etc.. Why would some want to write in-line Java..?
> Anyways...
>
>
>
> On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa <[EMAIL PROTECTED]>
> wrote:
>
> > The decision to disallow inline java code was
> > definitely not a cut and dry one. One reason
> > was definitely to enforce a cleaner separation
> > of syntax; the other, which I hadn't mentioned,
> > was to remove some additional complexity from
> > the parsing/compiling process. Because of the
> > differences between typing and syntax, parsing
> > a page that had both Java and CFML/CFScript
> > would have been a bear.
> >
> > Phil
> >
> > -Original Message-
> > From: Jon Hall [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 22, 2002 2:37 AM
> > To: CF-Talk
> > Subject: Re: Java in CF (CFMX)
> >
> >
> > Thursday, November 21, 2002, 11:54:58 PM, you
> > wrote:
> >
> > MT> Jon Hall wrote:
> > >> The case for allowing inline Java is simple,
> > CF developers can use
> > >> Java without having to know everything about
> > Java. Methods and
> > >> classes are easy to get. Compiling,
> > classpath's, and understanding
> > >> the lengths Java goes to, to abstract
> > everything, etc. is not.
> >
> > MT> Knowing just a little about a language as
> > deep/complex as Java can
> > MT> be "dangerous" in a number of ways...
> >
> > MT> It's very easy to run into errors in java
> > if you don't understand
> > MT> how it all works (ex. trying to instantiate
> > an interface).  One of
> > MT> the overriding strengths of CF is that it
> > offers a great deal of
> > MT> power in an easy to use/learn style.  This
> > sort of thing, IMO, goes
> > MT> against that strength.
> >
> > MT> Mixing CFML and Java can very quickly lead
> > to code that is horribly
> > MT> organized and difficult to follow/maintain.
> >  Obviousl

RE: Java in CF (CFMX) - MM Drivers

2002-12-06 Thread Phil Costa
It's throwing that error because you're trying to access the JDBC drivers in an 
unlicensed fashion. The DataDirect drivers are licensed for use with ColdFusion, which 
includes support for JSP as well as CFML, not the scenario you're describing.

Phil Costa
Sr. Product Manager, ColdFusion
Macromedia



-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, November 24, 2002 5:24 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX) - MM Drivers


I got this partially resolved... Sean helped out.. Thanks Sean. It was a classpath 
problem. However after i load the
drivers(macromedia.jdbc.MacromediaDriver) which is in the "lib" directory of your 
installation(eg. "G:\CFusionMX\lib\macromedia_drivers.jar") and give it the connection 
url.. Connection con = 
DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServerName:1433"
,"userid","Pwd");

I get an Exception..
"macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise license is 
needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and Info rmix 
servers."

I am running CFMX Enterprise version(6,0,0,48097).  I have the same connection working 
fine in JSP Pages under CFMX. Are CFMX Enterprise drivers protected from usage in Java 
Applications(Console/Swing)? Anybody from MM Product Team can explain this?

Joe


> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 4:11 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> I can use the CFMX MM DB drivers in a JSP page..No problem. however.. 
> i need to use it in a Java Application..tried to load the Driver..
> Class.forName("macromedia.jdbc.MacromediaDriver")
> Keep getting ClassNotFound Error..
> I put the macromedia_driver.jar in the class path.. still not
> loading.. Do i
> need to import something? What am i missing?
>
> Joe
>
> PS:Old Thread.
> I am just catching up on this Thread..
> Isnt the idea to comply with J2EE Architecture? Model-View-Controller 
> model etc.. Why would some want to write in-line Java..?
> Anyways...
>
>
>
> On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa <[EMAIL PROTECTED]> 
> wrote:
>
> > The decision to disallow inline java code was
> > definitely not a cut and dry one. One reason
> > was definitely to enforce a cleaner separation
> > of syntax; the other, which I hadn't mentioned,
> > was to remove some additional complexity from
> > the parsing/compiling process. Because of the
> > differences between typing and syntax, parsing
> > a page that had both Java and CFML/CFScript
> > would have been a bear.
> >
> > Phil
> >
> > -Original Message-
> > From: Jon Hall [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 22, 2002 2:37 AM
> > To: CF-Talk
> > Subject: Re: Java in CF (CFMX)
> >
> >
> > Thursday, November 21, 2002, 11:54:58 PM, you
> > wrote:
> >
> > MT> Jon Hall wrote:
> > >> The case for allowing inline Java is simple,
> > CF developers can use
> > >> Java without having to know everything about
> > Java. Methods and
> > >> classes are easy to get. Compiling,
> > classpath's, and understanding
> > >> the lengths Java goes to, to abstract
> > everything, etc. is not.
> >
> > MT> Knowing just a little about a language as
> > deep/complex as Java can
> > MT> be "dangerous" in a number of ways...
> >
> > MT> It's very easy to run into errors in java
> > if you don't understand
> > MT> how it all works (ex. trying to instantiate
> > an interface).  One of
> > MT> the overriding strengths of CF is that it
> > offers a great deal of
> > MT> power in an easy to use/learn style.  This
> > sort of thing, IMO, goes
> > MT> against that strength.
> >
> > MT> Mixing CFML and Java can very quickly lead
> > to code that is horribly
> > MT> organized and difficult to follow/maintain.
> >  Obviously, anal coders
> > MT> will keep things nice and neat, but others
> > will be mashing CFML,
> > MT> CFScript, Java, and SQL together
> > haphazardly.
> >
> > MT> Then there's the compatibility thing...
> > Java lists != CF lists.
> > MT> Java arrays != CF arrays.  Etc.  Again,
> > this can lead to confusion
> > MT> and cause all kinds of errors.
> >
> > I say let the coders (and the pm's who have a
> > clue ) who write the applications make the
> > decision on what works in their applicatio

Re: Java in CF (CFMX)

2002-11-26 Thread Dick Applebaum
On Tuesday, November 26, 2002, at 03:25 PM, Jochem van Dieten wrote:

>
>> Are you saying that you need to restart CFMX to install a new Java
>> class.
>
> IIRC it is a setting somewhere, search the archive.
>
>

I don't understand this response -- How can I avoid restarting CFMX OS 
X (Linux)
to recognize newly compiled Java class files in .../WEB-INF/classes ?

TIA

Dick

~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Java in CF (CFMX)

2002-11-26 Thread Dick Applebaum
On Tuesday, November 26, 2002, at 03:17 PM, Jochem van Dieten wrote:

> Dick Applebaum wrote:
>
>> Someone (maybe me), posted that strong typing in CFML would allow the
>> CF parser to generate better Java code.
>
> Not the current one.

Yes, that was understood  -- but CFML typing would allow the CF Parser 
to be updated to take typing into consideration when generating the 
Java code.

> Steps are irrelevant. Time is the question.

I don't entirely agree with -- if you are subject to interruption (e.g. 
a one-man-shop), the fewer the steps the fewer chances for errors.
>
> And if it is really that big an issue, your need to submit an
> enhancement request for you Java editor that is needs a button to
> publish (save and compile) the code. And if your CFML source editing
> environment is sufficiently smart/programmable it could just parse out
> an inline Java tag you defined yourself, move averything inside it to a
> java, compile it and translate the cf_inlinejava tag to the appropriate
> cfobject call.

I primarily use BBEdit -- It probably has this capability -- Never used 
it with a compiled language, so never needed this feature.

I also have Jedit.

Between the two, this can probably be accomplished -- good suggestion!

> Thanks

Dick

~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Java in CF (CFMX)

2002-11-26 Thread Rob Rohan
either
International Internet Recruiting Consultants

or

"If I Recall Correctly"



Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 4:08 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


What is IIRC?

On Tuesday, November 26, 2002, at 03:25 PM, Jochem van Dieten wrote:

> IIRC it is a setting somewhere, search the archive.


~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: Java in CF (CFMX)

2002-11-26 Thread Dick Applebaum
What is IIRC?

On Tuesday, November 26, 2002, at 03:25 PM, Jochem van Dieten wrote:

> IIRC it is a setting somewhere, search the archive.

~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Java in CF (CFMX)

2002-11-26 Thread Rob Rohan
I am still for  mind you.

Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Rob Rohan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 3:17 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX)


Again, I could be totally misinformed - I only write cfx_ tags at home with
a dev edition and it's not too bad typing

$/opt/coldfusionmx/bin/coldfusion stop
$/opt/coldfusionmx/bin/coldfusion start

(i dont trust restart)

Then take them to work and acctuallly add them to live server (which I
restart)

But I would dig auto-reload - if it's not already there.


Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 3:03 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Rob


~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: Java in CF (CFMX)

2002-11-26 Thread Joe Eugene
Dick.. 
This is known problem when you work with Java Classes, i never got the
configuration right to do *HOTLOAD*.. Sean was going to help out.. but i think
he is busy.

Temp Solution.
Every time, you re-compile the Java File, you have STOP-RESTART CFMX Service.
This will resolve that.

Joe

On Tue, 26 Nov 2002 14:20:56 -0800 Dick Applebaum <[EMAIL PROTECTED]> wrote:

> Joe
> 
> I  have been modifing with your Java code to
> return tables and columns  
> and I ran into a
> weird situation.
> 
> for convenience, I put the ,java file in
> WEB-INF/classes
> 
> I recompile the program and get a class file
> 
> I run the CF template, but get the old version
> of the class file
> 
> I even deleted the class file -- something is
> being cached, somewhere  
> -- Where?
> 
> TIA
> 
> Dick
> 
> 
> 
> 
> On Tuesday, November 26, 2002, at 01:35 PM, Joe
> Eugene wrote:
> 
> > Dick
> >
> > No problem, i got the same solution working
> with MM,MS-SQL and Oracle  
> > drivers
> > without any problem.
> >> You, likely, saved me several hours of
> >> frustration.
> > Now the ideal solution would be to return
> Complex
> > Objects/Types(Structs,ResultSets) back to
> CFMX. Havent had a chance to  
> > play
> > with Structs(CFMX-Java) compatibility.
> >
> >> Is there value to the Java developer (new or
> >> experienced) to inline
> >> code -- Yes,
> >
> > I understand your need. A while ago, we
> looked at the generated Java  
> > code(Real
> > Ugly!) from a *.cfm page. A lot of ugly
> wrappers coverting loose *.cfm  
> > TYPES
> > to strong Java Types..(Result..Slow
> pages)(Topic Jsp vs Cfm).
> >
> > InLine Java Code.
> > If this ever happens, ideally.. CFMX complier
> should create a helper  
> > class
> > file and let Java Complier, compile it like a
> Jsp page.. this would be
> > excellent.. but again IS'nt CfObject doing
> the same thing?(seperating  
> > the
> > helper/model class from presentation)...Am
> trying to relate to "Inline  
> > Java"..
> > So what overall advantage do we get with
> Inline Java? Any  
> > Performance...?
> > other than coding between CF/Java in
> templates?
> >
> > I am not against InLine Java.. just trying to
> understand the Mechanics.
> >
> > Joe
> >
> > On Tue, 26 Nov 2002 07:10:11 -0800 Dick
> Applebaum   
> > wrote:
> >
> >> Joe
> >>
> >> Your example, does, in fact work.
> >>
> >> Of course, I needed to modify the Java code
> to
> >> specify a different
> >> database --
> >> none of the MS databases appear to work on
> Mac
> >> OS X (or and non-win
> >> platform) :)
> >>
> >> This is enough to get me started -- I will
> add
> >> the flexibility to the
> >> interface so it
> >> will work with any JDBC driver, and any
> >> MetaData request.
> >>
> >> Thanks
> >>
> >> I have never written a wrapper for a Java
> >> program & it helps to start
> >> with a
> >> working example, and concise instructions.
> >>
> >> You, likely, saved me several hours of
> >> frustration.
> >>
> >> I think that implementing and deploying this
> >> example is a good
> >> illustration of the
> >> value of inline Java.
> >>
> >> Someone new to Java, like myself, could take
> >> your example and drop it
> >> into a simpleCF template,
> >> between  tags.  Then they could add the CFML
> >> portion in the
> >> same template. More likely,
> >> you would have provided a complete,
> standalone
> >> CF Template with the
> >> Java code, inline.
> >>
> >> Then they could save and test the template
> >> without concern for:
> >>
> >> 1) Separating your file into its Java
> and
> >> CFML component parts.
> >>
> >> 2) Where to put the Java source
> >>
> >> 3) How to compile the Java class
> >>
> >> 4) Which Java compiler options to use
> and
> >> their proper settings --
> >>  things such as:
> >>
> >> Usage: javac
> >> where possible options include:
> >>-g   
> Generate
> >> all debugging info
> >>-g:none  
> Generate
> >> no debugging info
> >>-g:{lines,vars,source}   
> Generate
> >> only some debugging info
> >>-O   
> Optimize;
> >> may hinder debugging or
> >> enlarge class file
> >>-nowarn  
> Generate
> >> no warnings
> >>-verbose  Output
> >> messages about what the
> >> compiler is doing
> >>-deprecation  Output
> >> source locations where
> >> deprecated APIs are used
> >>-classpath  Specify where
> to
> >> find user class
> >> files
> >>-sourcepath Specify where
> to
> >> find input source
> >> files
> >>-bootclasspath  Override
> >> location of bootstrap
> >> class files
> >>-extdirsOverride
> >> location of installed
> >> extensions
> >>-d Specify where to
> >> place generated
> >> class files
> >>-encoding   Specify character
> >> encoding used by
> >> source files
> >>   

Re: Java in CF (CFMX)

2002-11-26 Thread Jochem van Dieten
Dick Applebaum wrote:

> Are you saying that you need to restart CFMX to install a new Java
> class.

IIRC it is a setting somewhere, search the archive.

Jochem

PS Some deleting of ancient messages on the bottom would be nice. Just 
look at the mess this thread leaves in the archives to see why.

~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: Java in CF (CFMX)

2002-11-26 Thread Jochem van Dieten
Dick Applebaum wrote:

> Someone (maybe me), posted that strong typing in CFML would allow the 
> CF parser to generate better Java code.

Not the current one.

> Say you want to change the program(s) slightly so they return a list 
> of db tables, and the columns within each table.  On the presentation 
> side, you want to display the combined list in a select box.
>
> Here' s what you do, presently:
>
> 1) display the Java source
> 2) modify the Java source.
> 3) save the Java source
> 4) switch to a CLI window
> 5) compile the Java source
> 6) switch to the CF source
> 7) modify the CF source
> 8) save the CF source
> 9) switch to a browser window
> 10) invoke the cf template
>
> Here's what you would do with inline Java
>
> 1) display the combined  CF source with the inlineJava source
> 2) modify the inline Java source.
> 3) modify the CF source
> 4) save the combined  CF source with the inlineJava source
> 5) switch to a browser window
> 6) invoke the cf template
>
> Now, you might say "You only save 4 steps!! -- but that's 40% of the
> steps.

Steps are irrelevant. Time is the question.

And if it is really that big an issue, your need to submit an 
enhancement request for you Java editor that is needs a button to 
publish (save and compile) the code. And if your CFML source editing 
environment is sufficiently smart/programmable it could just parse out 
an inline Java tag you defined yourself, move averything inside it to a 
java, compile it and translate the cf_inlinejava tag to the appropriate 
cfobject call.

For the advantages on the code editing you mention here, you just need a 
better code editor, not better server side components.

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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Java in CF (CFMX)

2002-11-26 Thread Rob Rohan
Again, I could be totally misinformed - I only write cfx_ tags at home with
a dev edition and it's not too bad typing

$/opt/coldfusionmx/bin/coldfusion stop
$/opt/coldfusionmx/bin/coldfusion start

(i dont trust restart)

Then take them to work and acctuallly add them to live server (which I
restart)

But I would dig auto-reload - if it's not already there.


Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 3:03 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Rob

Are you saying that you need to restart CFMX to install a new Java
class.

Now there's a convenient, user-friendly, implementation.

If what you say is true, I think you have just made the case for inline
Java -- at least for developers

Do you mean that a CF production house, running clusters, and all that,
need to recycle the whole system, say just to fix a bug in a Java tag?

Do people put up with this?

Is this true of CFMXJ2ee?

Is this true on pure Java appservers like WebSphere, etc?


I recycled CFMX & the new Java class was recognized.

-- Head shaking in disbelief---

Dick


On Tuesday, November 26, 2002, at 02:29 PM, Rob Rohan wrote:

> ah, the fun of writting cf java tags. After you make a change and
> recompile,
> you'll need to cycle the service to re-read the class file...
>
> unless there is a better way that I don't know about.
>
>
> Rob
>
> http://treebeard.sourceforge.net
> http://ruinworld.sourceforge.net
> Scientia Est Potentia
>
> -Original Message-
> From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 2:21 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> Joe
>
> I  have been modifing with your Java code to return tables and columns
> and I ran into a
> weird situation.
>
> for convenience, I put the ,java file in WEB-INF/classes
>
> I recompile the program and get a class file
>
> I run the CF template, but get the old version of the class file
>
> I even deleted the class file -- something is being cached, somewhere
> -- Where?
>
> TIA
>
> Dick
>
>
>
>
> On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote:
>
>> Dick
>>
>> No problem, i got the same solution working with MM,MS-SQL and Oracle
>> drivers
>> without any problem.
>>> You, likely, saved me several hours of
>>> frustration.
>> Now the ideal solution would be to return Complex
>> Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to
>> play
>> with Structs(CFMX-Java) compatibility.
>>
>>> Is there value to the Java developer (new or
>>> experienced) to inline
>>> code -- Yes,
>>
>> I understand your need. A while ago, we looked at the generated Java
>> code(Real
>> Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm
>> TYPES
>> to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm).
>>
>> InLine Java Code.
>> If this ever happens, ideally.. CFMX complier should create a helper
>> class
>> file and let Java Complier, compile it like a Jsp page.. this would be
>> excellent.. but again IS'nt CfObject doing the same thing?(seperating
>> the
>> helper/model class from presentation)...Am trying to relate to "Inline
>> Java"..
>> So what overall advantage do we get with Inline Java? Any
>> Performance...?
>> other than coding between CF/Java in templates?
>>
>> I am not against InLine Java.. just trying to understand the
>> Mechanics.
>>
>> Joe
>>
>> On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Joe
>>>
>>> Your example, does, in fact work.
>>>
>>> Of course, I needed to modify the Java code to
>>> specify a different
>>> database --
>>> none of the MS databases appear to work on Mac
>>> OS X (or and non-win
>>> platform) :)
>>>
>>> This is enough to get me started -- I will add
>>> the flexibility to the
>>> interface so it
>>> will work with any JDBC driver, and any
>>> MetaData request.
>>>
>>> Thanks
>>>
>>> I have never written a wrapper for a Java
>>> program & it helps to start
>>> with a
>>> working example, and concise instructions.
>>>
>>> You, likely, saved me several hours of
>>> frustration.
>>>
>>> I think that implementing and deploying this
>>> example is a good
&g

Re: Java in CF (CFMX)

2002-11-26 Thread Dick Applebaum
Rob

Are you saying that you need to restart CFMX to install a new Java  
class.

Now there's a convenient, user-friendly, implementation.

If what you say is true, I think you have just made the case for inline  
Java -- at least for developers

Do you mean that a CF production house, running clusters, and all that,  
need to recycle the whole system, say just to fix a bug in a Java tag?

Do people put up with this?

Is this true of CFMXJ2ee?

Is this true on pure Java appservers like WebSphere, etc?


I recycled CFMX & the new Java class was recognized.

-- Head shaking in disbelief---

Dick


On Tuesday, November 26, 2002, at 02:29 PM, Rob Rohan wrote:

> ah, the fun of writting cf java tags. After you make a change and  
> recompile,
> you'll need to cycle the service to re-read the class file...
>
> unless there is a better way that I don't know about.
>
>
> Rob
>
> http://treebeard.sourceforge.net
> http://ruinworld.sourceforge.net
> Scientia Est Potentia
>
> -Original Message-
> From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 26, 2002 2:21 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> Joe
>
> I  have been modifing with your Java code to return tables and columns
> and I ran into a
> weird situation.
>
> for convenience, I put the ,java file in WEB-INF/classes
>
> I recompile the program and get a class file
>
> I run the CF template, but get the old version of the class file
>
> I even deleted the class file -- something is being cached, somewhere
> -- Where?
>
> TIA
>
> Dick
>
>
>
>
> On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote:
>
>> Dick
>>
>> No problem, i got the same solution working with MM,MS-SQL and Oracle
>> drivers
>> without any problem.
>>> You, likely, saved me several hours of
>>> frustration.
>> Now the ideal solution would be to return Complex
>> Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to
>> play
>> with Structs(CFMX-Java) compatibility.
>>
>>> Is there value to the Java developer (new or
>>> experienced) to inline
>>> code -- Yes,
>>
>> I understand your need. A while ago, we looked at the generated Java
>> code(Real
>> Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm
>> TYPES
>> to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm).
>>
>> InLine Java Code.
>> If this ever happens, ideally.. CFMX complier should create a helper
>> class
>> file and let Java Complier, compile it like a Jsp page.. this would be
>> excellent.. but again IS'nt CfObject doing the same thing?(seperating
>> the
>> helper/model class from presentation)...Am trying to relate to "Inline
>> Java"..
>> So what overall advantage do we get with Inline Java? Any
>> Performance...?
>> other than coding between CF/Java in templates?
>>
>> I am not against InLine Java.. just trying to understand the  
>> Mechanics.
>>
>> Joe
>>
>> On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Joe
>>>
>>> Your example, does, in fact work.
>>>
>>> Of course, I needed to modify the Java code to
>>> specify a different
>>> database --
>>> none of the MS databases appear to work on Mac
>>> OS X (or and non-win
>>> platform) :)
>>>
>>> This is enough to get me started -- I will add
>>> the flexibility to the
>>> interface so it
>>> will work with any JDBC driver, and any
>>> MetaData request.
>>>
>>> Thanks
>>>
>>> I have never written a wrapper for a Java
>>> program & it helps to start
>>> with a
>>> working example, and concise instructions.
>>>
>>> You, likely, saved me several hours of
>>> frustration.
>>>
>>> I think that implementing and deploying this
>>> example is a good
>>> illustration of the
>>> value of inline Java.
>>>
>>> Someone new to Java, like myself, could take
>>> your example and drop it
>>> into a simpleCF template,
>>> between  tags.  Then they could add the CFML
>>> portion in the
>>> same template. More likely,
>>> you would have provided a complete, standalone
>>> CF Template with the
>>> Java code, inline.
>>>
>>> Then they could save and test the template
>>> without concern for:
>>>
>>> 1)

Re: Java in CF (CFMX)

2002-11-26 Thread Dick Applebaum
On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote:

> I understand your need. A while ago, we looked at the generated Java 
> code(Real
> Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm 
> TYPES
> to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm).
>

I remember that thread -- the generated Java code was "Slow & Ugly".

Someone (maybe me), posted that strong typing in CFML would allow the CF
parser to generate better Java code.

> InLine Java Code.
> If this ever happens, ideally.. CFMX complier should create a helper 
> class
> file and let Java Complier, compile it like a Jsp page.. this would be
> excellent.. but again IS'nt CfObject doing the same thing?(seperating 
> the
> helper/model class from presentation)...Am trying to relate to "Inline 
> Java"..
> So what overall advantage do we get with Inline Java? Any 
> Performance...?
> other than coding between CF/Java in templates?
>
> I am not against InLine Java.. just trying to understand the Mechanics.

I think you could get an interface between no-typing and strong typing

I think you would be more easily do develop and test the parts of your 
program
that you needed (or decided) to code in Java.

The inline code likely would be more efficient that CF parser generated 
code, so
yes there would be a performance gain (when warranted).

You might be developing a routine that will be ultimately deployed as a 
separate Java
program (invoked with cfobject) -- it could be more convenient to 
develop and debug
the Java inline, along with the CFML.

The dbMetaData example illustrates one advantage of inline Java.

Say you want to change the program(s) slightly so they return a list of 
db tables, and the
columns within each table.  On the presentation side, you want to 
display the combined
list in a select box.

Here' s what you do, presently:

1) display the Java source
2) modify the Java source.
3) save the Java source
4) switch to a CLI window
5) compile the Java source
6) switch to the CF source
7) modify the CF source
8) save the CF source
9) switch to a browser window
10) invoke the cf template

Here's what you would do with inline Java

1) display the combined  CF source with the inlineJava source
2) modify the inline Java source.
3) modify the CF source
4) save the combined  CF source with the inlineJava source
5) switch to a browser window
6) invoke the cf template

Now, you might say "You only save 4 steps!! -- but that's 40% of the 
steps.

and they are repeated many times.

You would be eliminating 40% of the interactions, 40% of the 
distractions,
40% of the opportunities to make a mistake.

It means productivity!

I hope this helps answer your question -- I really don't under stand 
what a helper/model class is, yet!

As an aside, does Java recognize a construct similar to a hash or a CF 
Structure,
that could be passed between CFML & Java.





~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Java in CF (CFMX)

2002-11-26 Thread Rob Rohan
ah, the fun of writting cf java tags. After you make a change and recompile,
you'll need to cycle the service to re-read the class file...

unless there is a better way that I don't know about.


Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 2:21 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Joe

I  have been modifing with your Java code to return tables and columns
and I ran into a
weird situation.

for convenience, I put the ,java file in WEB-INF/classes

I recompile the program and get a class file

I run the CF template, but get the old version of the class file

I even deleted the class file -- something is being cached, somewhere
-- Where?

TIA

Dick




On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote:

> Dick
>
> No problem, i got the same solution working with MM,MS-SQL and Oracle
> drivers
> without any problem.
>> You, likely, saved me several hours of
>> frustration.
> Now the ideal solution would be to return Complex
> Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to
> play
> with Structs(CFMX-Java) compatibility.
>
>> Is there value to the Java developer (new or
>> experienced) to inline
>> code -- Yes,
>
> I understand your need. A while ago, we looked at the generated Java
> code(Real
> Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm
> TYPES
> to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm).
>
> InLine Java Code.
> If this ever happens, ideally.. CFMX complier should create a helper
> class
> file and let Java Complier, compile it like a Jsp page.. this would be
> excellent.. but again IS'nt CfObject doing the same thing?(seperating
> the
> helper/model class from presentation)...Am trying to relate to "Inline
> Java"..
> So what overall advantage do we get with Inline Java? Any
> Performance...?
> other than coding between CF/Java in templates?
>
> I am not against InLine Java.. just trying to understand the Mechanics.
>
> Joe
>
> On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum <[EMAIL PROTECTED]>
> wrote:
>
>> Joe
>>
>> Your example, does, in fact work.
>>
>> Of course, I needed to modify the Java code to
>> specify a different
>> database --
>> none of the MS databases appear to work on Mac
>> OS X (or and non-win
>> platform) :)
>>
>> This is enough to get me started -- I will add
>> the flexibility to the
>> interface so it
>> will work with any JDBC driver, and any
>> MetaData request.
>>
>> Thanks
>>
>> I have never written a wrapper for a Java
>> program & it helps to start
>> with a
>> working example, and concise instructions.
>>
>> You, likely, saved me several hours of
>> frustration.
>>
>> I think that implementing and deploying this
>> example is a good
>> illustration of the
>> value of inline Java.
>>
>> Someone new to Java, like myself, could take
>> your example and drop it
>> into a simpleCF template,
>> between  tags.  Then they could add the CFML
>> portion in the
>> same template. More likely,
>> you would have provided a complete, standalone
>> CF Template with the
>> Java code, inline.
>>
>> Then they could save and test the template
>> without concern for:
>>
>> 1) Separating your file into its Java and
>> CFML component parts.
>>
>> 2) Where to put the Java source
>>
>> 3) How to compile the Java class
>>
>> 4) Which Java compiler options to use and
>> their proper settings --
>>  things such as:
>>
>> Usage: javac
>> where possible options include:
>>-gGenerate
>> all debugging info
>>-g:none   Generate
>> no debugging info
>>-g:{lines,vars,source}Generate
>> only some debugging info
>>-OOptimize;
>> may hinder debugging or
>> enlarge class file
>>-nowarn   Generate
>> no warnings
>>-verbose  Output
>> messages about what the
>> compiler is doing
>>-deprecation  Output
>> source locations where
>> deprecated APIs are used
>>-classpath  Specify where to
>> find user class
>> files
>>-sourcepath Specify where to
>> find 

Re: Java in CF (CFMX)

2002-11-26 Thread Dick Applebaum
Joe

I  have been modifing with your Java code to return tables and columns  
and I ran into a
weird situation.

for convenience, I put the ,java file in WEB-INF/classes

I recompile the program and get a class file

I run the CF template, but get the old version of the class file

I even deleted the class file -- something is being cached, somewhere  
-- Where?

TIA

Dick




On Tuesday, November 26, 2002, at 01:35 PM, Joe Eugene wrote:

> Dick
>
> No problem, i got the same solution working with MM,MS-SQL and Oracle  
> drivers
> without any problem.
>> You, likely, saved me several hours of
>> frustration.
> Now the ideal solution would be to return Complex
> Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to  
> play
> with Structs(CFMX-Java) compatibility.
>
>> Is there value to the Java developer (new or
>> experienced) to inline
>> code -- Yes,
>
> I understand your need. A while ago, we looked at the generated Java  
> code(Real
> Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm  
> TYPES
> to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm).
>
> InLine Java Code.
> If this ever happens, ideally.. CFMX complier should create a helper  
> class
> file and let Java Complier, compile it like a Jsp page.. this would be
> excellent.. but again IS'nt CfObject doing the same thing?(seperating  
> the
> helper/model class from presentation)...Am trying to relate to "Inline  
> Java"..
> So what overall advantage do we get with Inline Java? Any  
> Performance...?
> other than coding between CF/Java in templates?
>
> I am not against InLine Java.. just trying to understand the Mechanics.
>
> Joe
>
> On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum <[EMAIL PROTECTED]>  
> wrote:
>
>> Joe
>>
>> Your example, does, in fact work.
>>
>> Of course, I needed to modify the Java code to
>> specify a different
>> database --
>> none of the MS databases appear to work on Mac
>> OS X (or and non-win
>> platform) :)
>>
>> This is enough to get me started -- I will add
>> the flexibility to the
>> interface so it
>> will work with any JDBC driver, and any
>> MetaData request.
>>
>> Thanks
>>
>> I have never written a wrapper for a Java
>> program & it helps to start
>> with a
>> working example, and concise instructions.
>>
>> You, likely, saved me several hours of
>> frustration.
>>
>> I think that implementing and deploying this
>> example is a good
>> illustration of the
>> value of inline Java.
>>
>> Someone new to Java, like myself, could take
>> your example and drop it
>> into a simpleCF template,
>> between  tags.  Then they could add the CFML
>> portion in the
>> same template. More likely,
>> you would have provided a complete, standalone
>> CF Template with the
>> Java code, inline.
>>
>> Then they could save and test the template
>> without concern for:
>>
>> 1) Separating your file into its Java and
>> CFML component parts.
>>
>> 2) Where to put the Java source
>>
>> 3) How to compile the Java class
>>
>> 4) Which Java compiler options to use and
>> their proper settings --
>>  things such as:
>>
>> Usage: javac
>> where possible options include:
>>-gGenerate
>> all debugging info
>>-g:none   Generate
>> no debugging info
>>-g:{lines,vars,source}Generate
>> only some debugging info
>>-OOptimize;
>> may hinder debugging or
>> enlarge class file
>>-nowarn   Generate
>> no warnings
>>-verbose  Output
>> messages about what the
>> compiler is doing
>>-deprecation  Output
>> source locations where
>> deprecated APIs are used
>>-classpath  Specify where to
>> find user class
>> files
>>-sourcepath Specify where to
>> find input source
>> files
>>-bootclasspath  Override
>> location of bootstrap
>> class files
>>-extdirsOverride
>> location of installed
>> extensions
>>-d Specify where to
>> place generated
>> class files
>>-encoding   Specify character
>> encoding used by
>> source files
>>-target  Generate class
>> files for specific
>> VM version
>>
>> 5) Figuring out the command line interface
>> or some Java IDE, just to
>> be able to compile the Java program.
>>
>> 6) Where to put the Java class
>>
>> 7) Where to get a Java compiler if one
>> isn't installed on their
>> platform (Mac OS X comes,
>> standard, with a JDK, but many
>> platforms do not).
>>
>> Sure, these are things that the new Java person
>> will need to learn
>> eventually.  But, is it necessary to
>> overload the new Java user with all this
>> minutiae, just to try a simple
>> Java example -- I think not!
>>
>> Is there value to the Java developer (new or
>> experienced) to inline
>> code -- Yes, I've n

Re: Java in CF (CFMX)

2002-11-26 Thread Joe Eugene
Dick

No problem, i got the same solution working with MM,MS-SQL and Oracle drivers
without any problem.
> You, likely, saved me several hours of
> frustration.
Now the ideal solution would be to return Complex
Objects/Types(Structs,ResultSets) back to CFMX. Havent had a chance to play
with Structs(CFMX-Java) compatibility.

> Is there value to the Java developer (new or
> experienced) to inline  
> code -- Yes, 

I understand your need. A while ago, we looked at the generated Java code(Real
Ugly!) from a *.cfm page. A lot of ugly wrappers coverting loose *.cfm TYPES
to strong Java Types..(Result..Slow pages)(Topic Jsp vs Cfm).

InLine Java Code.
If this ever happens, ideally.. CFMX complier should create a helper class
file and let Java Complier, compile it like a Jsp page.. this would be
excellent.. but again IS'nt CfObject doing the same thing?(seperating the
helper/model class from presentation)...Am trying to relate to "Inline Java"..
So what overall advantage do we get with Inline Java? Any Performance...?
other than coding between CF/Java in templates?

I am not against InLine Java.. just trying to understand the Mechanics.

Joe

On Tue, 26 Nov 2002 07:10:11 -0800 Dick Applebaum <[EMAIL PROTECTED]> wrote:

> Joe
> 
> Your example, does, in fact work.
> 
> Of course, I needed to modify the Java code to
> specify a different  
> database --
> none of the MS databases appear to work on Mac
> OS X (or and non-win  
> platform) :)
> 
> This is enough to get me started -- I will add
> the flexibility to the  
> interface so it
> will work with any JDBC driver, and any
> MetaData request.
> 
> Thanks
> 
> I have never written a wrapper for a Java
> program & it helps to start  
> with a
> working example, and concise instructions.
> 
> You, likely, saved me several hours of
> frustration.
> 
> I think that implementing and deploying this
> example is a good  
> illustration of the
> value of inline Java.
> 
> Someone new to Java, like myself, could take
> your example and drop it  
> into a simpleCF template,
> between  tags.  Then they could add the CFML
> portion in the  
> same template. More likely,
> you would have provided a complete, standalone
> CF Template with the  
> Java code, inline.
> 
> Then they could save and test the template
> without concern for:
> 
> 1) Separating your file into its Java and
> CFML component parts.
> 
> 2) Where to put the Java source
> 
> 3) How to compile the Java class
> 
> 4) Which Java compiler options to use and
> their proper settings --
>  things such as:
> 
> Usage: javac  
> where possible options include:
>-gGenerate
> all debugging info
>-g:none   Generate
> no debugging info
>-g:{lines,vars,source}Generate
> only some debugging info
>-OOptimize;
> may hinder debugging or  
> enlarge class file
>-nowarn   Generate
> no warnings
>-verbose  Output
> messages about what the  
> compiler is doing
>-deprecation  Output
> source locations where  
> deprecated APIs are used
>-classpath  Specify where to
> find user class  
> files
>-sourcepath Specify where to
> find input source  
> files
>-bootclasspath  Override
> location of bootstrap  
> class files
>-extdirsOverride
> location of installed  
> extensions
>-d Specify where to
> place generated  
> class files
>-encoding   Specify character
> encoding used by  
> source files
>-target  Generate class
> files for specific  
> VM version
> 
> 5) Figuring out the command line interface
> or some Java IDE, just to  
> be able to compile the Java program.
> 
> 6) Where to put the Java class
> 
> 7) Where to get a Java compiler if one
> isn't installed on their  
> platform (Mac OS X comes,
> standard, with a JDK, but many
> platforms do not).
> 
> Sure, these are things that the new Java person
> will need to learn  
> eventually.  But, is it necessary to
> overload the new Java user with all this
> minutiae, just to try a simple  
> Java example -- I think not!
> 
> Is there value to the Java developer (new or
> experienced) to inline  
> code -- Yes, I've noted some
> advantages to the lay person.  But, Joe, who is
> experienced with Java,  
> could have benefitted from
> inline Java too.  I suspect he would have saved
> time preparing/testing  
> his example and the instructions
> how to deploy it :
> 
> 1) He, simply, could have provided a single
> CF template with the  
> Java inline; rather than a Java
>  program and a separate CF template.
> 
> 2) He could have avoided typing the
> instructions to compile and
>  deploy the Java program
> 
> 3) The flow of the example, likely, would
> be bette

RE: Java in CF (CFMX)

2002-11-26 Thread Rob Rohan
I think someone at MM should look up BSF.

Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Jeffrey Polaski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 10:50 AM
To: CF-Talk
Subject: RE: Java in CF (CFMX)


Personally, I'd like to see CF Script expanded to deal with strongly typed
code. It would be extremely cool to be able to run code from a different
languages in a cfscript block (kinda' like MS's Scripting Host).

I can see a couple of other benefits to having inline Java code:

Stronger types for variables. (well, stronger types for /values/).
Sometimes it's extremely useful to have strong types. For example, I worked
on using native COM datasets in CF a few years back and we had a lot of
problems converting the native COM dataset into a CF query. was a huge
performance hit for a CF script to loop over each field, convert it, and
stuff it in a CF query. If CF could (optionally) deal with different types I
think it would have been a lot easier to do, and a cfscript block would be a
great place for this. Also, it would be *great* to be able to pass functions
around as values--that alone would certainly simplify my code in places.

One of CF's great benefits is it's simplicity, but sometimes it's
important to be able to get out of the simple tag-based techniques of CF and
into more "advanced" techniques. When I'm developing, sometimes I want to be
able to just dump some code on a page and thrash away. It gets in the way to
have to develop separate components. After I'm done thrashing out some code,
I want to make sure it's clean and maintainable, and put it into components,
though. It's just nice to have the option.

I know basically nothing about the actual behind-the-scenes architecture of
CF, so take this with a grain of salt, but I don't see why CF couldn't just
automatically compile a cfscript block as a separate class if you added a
keyword to it, like: . There is already a lot of
code generation going on when CF creates the class files from a CF page.

Well, just my $0.02...








   Jeff Polaski
   "The cow is of the bovine ilk;
One end is moo, the other, milk."
   -- Ogden Nash




-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 23, 2002 9:30 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


I am really late to this thread -- been doin' other interesting stuff.

There are one (or two, or forty) reasons that have not been mentioned,
that make inline Java code a benefit.

1) Where needed in an app, you can get strong typing and nulls -- say
you want to communicate with a JDBC driver and retrieve Table/Column
attributes from a db -- most JDBC drivers provide this info, but you
can't get at it directly form CMFX.

2) Where CFMX can act as a gentle introduction to Java -- certainly
this hybrid code would  not be the best, but it would allow Java
neophytes, like myself, to learn Java gracefully, without having to
learn all the rules first.  -- There is something about the fact that
we can learn our native language, better, by the age of 5, than a
person with 4 years of college courses on that language -- simple
introduction, constant use, familiarity-- a lot of us "Learn by Doing!"

3) This would put /keep CF at the head of the pack -- one more
significant reason to choose CF over the competition -- EasyJava --
choose the language/implementation that makes the most sense for an
application and/or a tier.

Dick

P.S.  while I am asking for things, I'd like to see a ...
tag -- does the same thing (and does not deprecate the  tag--
just a lot easier to type (and pretty self-documenting, and makes a lot
more sense than that <%= crap!)




On Friday, November 22, 2002, at 08:56 AM, Rob Rohan wrote:

> I understand your decision but I have a couple more things to add,
> then I'll
> shut up.
>
> 1) To me CFSCRIPT is to Cold Fusion 5 what CFJAVA would've been to
> CFMX.
>
> 2) I also don't think people would just use a cfjava block to just use
> it.
> There would have to be a need. (I.E. a custom java tag that doesn't
> need to
> be installed)
>
> 3) I would like to play with inner classes / threads on a page and
> casting
> to thing (like a CF list to a hashtable - don't even know if that would
> work, but you get the idea).
>
> 4) There could be performance gains beyond code execution. For
> example, when
> you make a cfm page into a class it adds a bunch of \r\t which is
> necessary
> in almost all cases (but certain blocks could be controlled)
>
> Thanks for listening Phil and all you wacky MM guys
>
> Rob
>
> Certified Organic
> "When you put things in quotes, people think someone actually sai

RE: Java in CF (CFMX)

2002-11-26 Thread Jeffrey Polaski
Personally, I'd like to see CF Script expanded to deal with strongly typed
code. It would be extremely cool to be able to run code from a different
languages in a cfscript block (kinda' like MS's Scripting Host).

I can see a couple of other benefits to having inline Java code:

Stronger types for variables. (well, stronger types for /values/).
Sometimes it's extremely useful to have strong types. For example, I worked
on using native COM datasets in CF a few years back and we had a lot of
problems converting the native COM dataset into a CF query. was a huge
performance hit for a CF script to loop over each field, convert it, and
stuff it in a CF query. If CF could (optionally) deal with different types I
think it would have been a lot easier to do, and a cfscript block would be a
great place for this. Also, it would be *great* to be able to pass functions
around as values--that alone would certainly simplify my code in places.

One of CF's great benefits is it's simplicity, but sometimes it's
important to be able to get out of the simple tag-based techniques of CF and
into more "advanced" techniques. When I'm developing, sometimes I want to be
able to just dump some code on a page and thrash away. It gets in the way to
have to develop separate components. After I'm done thrashing out some code,
I want to make sure it's clean and maintainable, and put it into components,
though. It's just nice to have the option. 

I know basically nothing about the actual behind-the-scenes architecture of
CF, so take this with a grain of salt, but I don't see why CF couldn't just
automatically compile a cfscript block as a separate class if you added a
keyword to it, like: . There is already a lot of
code generation going on when CF creates the class files from a CF page. 

Well, just my $0.02...








   Jeff Polaski
   "The cow is of the bovine ilk; 
One end is moo, the other, milk."
   -- Ogden Nash




-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 23, 2002 9:30 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


I am really late to this thread -- been doin' other interesting stuff.

There are one (or two, or forty) reasons that have not been mentioned,  
that make inline Java code a benefit.

1) Where needed in an app, you can get strong typing and nulls -- say  
you want to communicate with a JDBC driver and retrieve Table/Column  
attributes from a db -- most JDBC drivers provide this info, but you  
can't get at it directly form CMFX.

2) Where CFMX can act as a gentle introduction to Java -- certainly  
this hybrid code would  not be the best, but it would allow Java  
neophytes, like myself, to learn Java gracefully, without having to  
learn all the rules first.  -- There is something about the fact that  
we can learn our native language, better, by the age of 5, than a  
person with 4 years of college courses on that language -- simple  
introduction, constant use, familiarity-- a lot of us "Learn by Doing!"

3) This would put /keep CF at the head of the pack -- one more  
significant reason to choose CF over the competition -- EasyJava --  
choose the language/implementation that makes the most sense for an  
application and/or a tier.

Dick

P.S.  while I am asking for things, I'd like to see a ...  
tag -- does the same thing (and does not deprecate the  tag--  
just a lot easier to type (and pretty self-documenting, and makes a lot  
more sense than that <%= crap!)




On Friday, November 22, 2002, at 08:56 AM, Rob Rohan wrote:

> I understand your decision but I have a couple more things to add,  
> then I'll
> shut up.
>
> 1) To me CFSCRIPT is to Cold Fusion 5 what CFJAVA would've been to  
> CFMX.
>
> 2) I also don't think people would just use a cfjava block to just use  
> it.
> There would have to be a need. (I.E. a custom java tag that doesn't  
> need to
> be installed)
>
> 3) I would like to play with inner classes / threads on a page and  
> casting
> to thing (like a CF list to a hashtable - don't even know if that would
> work, but you get the idea).
>
> 4) There could be performance gains beyond code execution. For  
> example, when
> you make a cfm page into a class it adds a bunch of \r\t which is  
> necessary
> in almost all cases (but certain blocks could be controlled)
>
> Thanks for listening Phil and all you wacky MM guys
>
> Rob
>
> Certified Organic
> "When you put things in quotes, people think someone actually said it."
> http://treebeard.sourceforge.net
> http://ruinworld.sourceforge.net
> Scientia Est Potentia
>
> -Original Message-
> From: Phil Costa [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 6:09 AM
> To: C

Re: Java in CF (CFMX)

2002-11-26 Thread Dick Applebaum
Joe

Your example, does, in fact work.

Of course, I needed to modify the Java code to specify a different  
database --
none of the MS databases appear to work on Mac OS X (or and non-win  
platform) :)

This is enough to get me started -- I will add the flexibility to the  
interface so it
will work with any JDBC driver, and any MetaData request.

Thanks

I have never written a wrapper for a Java program & it helps to start  
with a
working example, and concise instructions.

You, likely, saved me several hours of frustration.

I think that implementing and deploying this example is a good  
illustration of the
value of inline Java.

Someone new to Java, like myself, could take your example and drop it  
into a simpleCF template,
between  tags.  Then they could add the CFML portion in the  
same template. More likely,
you would have provided a complete, standalone CF Template with the  
Java code, inline.

Then they could save and test the template without concern for:

1) Separating your file into its Java and CFML component parts.

2) Where to put the Java source

3) How to compile the Java class

4) Which Java compiler options to use and their proper settings --
 things such as:

Usage: javac  
where possible options include:
   -gGenerate all debugging info
   -g:none   Generate no debugging info
   -g:{lines,vars,source}Generate only some debugging info
   -OOptimize; may hinder debugging or  
enlarge class file
   -nowarn   Generate no warnings
   -verbose  Output messages about what the  
compiler is doing
   -deprecation  Output source locations where  
deprecated APIs are used
   -classpath  Specify where to find user class  
files
   -sourcepath Specify where to find input source  
files
   -bootclasspath  Override location of bootstrap  
class files
   -extdirsOverride location of installed  
extensions
   -d Specify where to place generated  
class files
   -encoding   Specify character encoding used by  
source files
   -target  Generate class files for specific  
VM version

5) Figuring out the command line interface or some Java IDE, just to  
be able to compile the Java program.

6) Where to put the Java class

7) Where to get a Java compiler if one isn't installed on their  
platform (Mac OS X comes,
standard, with a JDK, but many platforms do not).

Sure, these are things that the new Java person will need to learn  
eventually.  But, is it necessary to
overload the new Java user with all this minutiae, just to try a simple  
Java example -- I think not!

Is there value to the Java developer (new or experienced) to inline  
code -- Yes, I've noted some
advantages to the lay person.  But, Joe, who is experienced with Java,  
could have benefitted from
inline Java too.  I suspect he would have saved time preparing/testing  
his example and the instructions
how to deploy it :

1) He, simply, could have provided a single CF template with the  
Java inline; rather than a Java
 program and a separate CF template.

2) He could have avoided typing the instructions to compile and
 deploy the Java program

3) The flow of the example, likely, would be better, better  
understood, and easier
 to explain and document within the code (both CF and Java  
Comments)

4) He'd have a single file, a complete example, with no special  
instructions --
 Just "Save it and Run it" as you would any other CF template.


Is there significant [enough] value, that MM should consider  
implementing inline Java --
I think so -- what it boils down to is this:  inline Java is an  
improved interface to
many Java programs -- much the way that  (and the associated  
, , etc.) tags
are an improvement to many SQL databases.   Here are some advantages to  
MM.

1) The CFMX product could have another productivity advantage for  
developers, and
 resellers... hmm... I wonder if IBM could use this feature

   2) Macromedia could more easily, and more effectively include many  
Java examples
   in the code they distribute,

   3) Inline Java could facilitate writing, testing  and documenting  
wrappers for many
   Java programs (whether deployed inline or not).

   4) It could be easier to reconcile Java constructs of strong typing,  
nulls, etc, with the absence
these constructs in CFML.  In fact. inline Java, could provide a  
very nice means to help
pass data between CFML and Java -- something like
where you could
specify typing, nulls, etc. in a way meaningful to both CFML and  
Java.

   5) If MM were to implement , they could delay (or  
postpone indefinitly) the
   request to add these

RE: Java in CF (CFMX)

2002-11-25 Thread Joe Eugene
> would like to see CFMX be able to pass null to Java correctly but I
> suspect it wouldn't be trivial to do (adding 'null' to a language that

Adding 'null' would be nice, i would also like to have an option to declare
variable types(int, double etc), i think this would have a big impact on
performance.

Joe

> -Original Message-
> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 6:24 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> On Monday, Nov 25, 2002, at 14:32 US/Pacific, Joe Eugene wrote:
> > Here is an Example that works with CFMX. The Java file should be
> > compiled
> > under WEB-INF/classes/
> > ...
> >  if(c.equalsIgnoreCase("null")) cat=null; else cat=c;
> >  if(s.equalsIgnoreCase("null")) schPattern=null; else schPattern=s;
> >  if(t.equalsIgnoreCase("null")) tblNPattern=null; else tblNPattern=t;
>
> But Dick's point is that you cannot natively pass null into Java - you
> are currently forced to write a Java wrapper class as you have done. I
> would like to see CFMX be able to pass null to Java correctly but I
> suspect it wouldn't be trivial to do (adding 'null' to a language that
> doesn't have it has a semantic impact right across the language because
> you have to define in every case what happens in an expression if one
> of your sub-expressions is null).
>
> Sean A Corfield -- Director, Architecture
> Web Technology Group -- Macromedia, Inc.
> tel: (415) 252-2287 -- cell: (415) 717-8473
> aim: seancorfield -- http://www.macromedia.com
> An Architect's View -- http://www.corfield.org/blog/
>
> Introducing Macromedia Contribute. Web publishing for everyone.
> Learn more at http://www.macromedia.com/contribute
>
> 
~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: Java in CF (CFMX)

2002-11-25 Thread Dick Applebaum
This is quite a thread -- it seems to mean something different to each  
of us:

convenience

flexibility

functionality

good design

performance

readable code

development productivity

maintainability

conformance to Java/CF standards and best practices

aid to learning Java

So far, I think that every point made has been valid, even though some  
of them are direct contradictions.

Things like:  (I paraphrase) "If you are on a shared server, this is a  
security risk, and would be crippled".

and the response: "That's true, but if you are on a developer machine  
and/or a dedicated server, inline Java would be quite an advantage".

  Let me reapproach the topic of inline Java, this way:

Since it means so many different things to different people, it seems  
to make sense to include the capability in CF -- just another tool to  
help us
RADD applications.

Worried about security, coding standards, and all the potential  
downsides? -- include the capability to cripple the function with the  
CF Admin.

If it is a major effort to implement (I suspect it isn't), then there  
are likely things of much higher priority.

But, it would be nice to have this capability!

Dick



On Monday, November 25, 2002, at 03:11 PM, Joe Eugene wrote:

> You loose alot of flexibility.. on a shared server.. How many ppl are  
> running
> enterprise CFMX on shared servers?
> Have ever had to call a function/method in CF around 1000 times on a  
> page? Do
> some math with it...CFObject(Java) blows CF..try it.
>
> Joe
>
> On Mon, 25 Nov 2002 23:58:02 +0100 Jochem van Dieten  
> <[EMAIL PROTECTED]>
> wrote:
>
>> Joe Eugene wrote:
>>
 wouldn't need to happen.
>>>
>>> Where do u want it happen?
>>
>> At some MM production facility. As I said,
>> cfobject is a no-go on a
>> shared server.
>>
>> 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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: Java in CF (CFMX)

2002-11-25 Thread Dick Applebaum
Wheee!

On Monday, November 25, 2002, at 03:32 PM, Rob Rohan wrote:

> Bet you could add 'null' if you could do inline java
>
> :)
>
>
> just kidding
> Rob
>
> -Original Message-
> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 3:24 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> On Monday, Nov 25, 2002, at 14:32 US/Pacific, Joe Eugene wrote:
>> Here is an Example that works with CFMX. The Java file should be
>> compiled
>> under WEB-INF/classes/
>> ...
>>  if(c.equalsIgnoreCase("null")) cat=null; else cat=c;
>>  if(s.equalsIgnoreCase("null")) schPattern=null; else schPattern=s;
>>  if(t.equalsIgnoreCase("null")) tblNPattern=null; else tblNPattern=t;
>
> But Dick's point is that you cannot natively pass null into Java - you
> are currently forced to write a Java wrapper class as you have done. I
> would like to see CFMX be able to pass null to Java correctly but I
> suspect it wouldn't be trivial to do (adding 'null' to a language that
> doesn't have it has a semantic impact right across the language because
> you have to define in every case what happens in an expression if one
> of your sub-expressions is null).
>
> Sean A Corfield -- Director, Architecture
> Web Technology Group -- Macromedia, Inc.
> tel: (415) 252-2287 -- cell: (415) 717-8473
> aim: seancorfield -- http://www.macromedia.com
> An Architect's View -- http://www.corfield.org/blog/
>
> Introducing Macromedia Contribute. Web publishing for everyone.
> Learn more at http://www.macromedia.com/contribute
>
>
> 
~|
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



Re: Java in CF (CFMX)

2002-11-25 Thread Jochem van Dieten
Joe Eugene wrote:

> You loose alot of flexibility.. on a shared server.. How many ppl are 
> running enterprise CFMX on shared servers? 

You mean people run shared servers *without* sandbox security?
/me rolles eyes

> Have ever had to call a function/method in CF around 1000 times on a 
> page? Do some math with it...CFObject(Java) blows CF..

Needing the performance of Java is an entirely different situation from 
needing the features of Java. If you need the performance of Java, the 
more common upgrade path from shared hosting is to first get a dedicated 
server, then start rewriting CFML code in something faster. If you need 
the features of Java, for instance the ability to access the 
DatabaseMetaData interface, but you don't need the performance, you 
would still be forced to upgrade to a dedicated server because no 
sensible host will allow cfobject on a shared server.

A way in between would be some java custom tag, but it has both the 
disadvantages of a built-in tag, less flexibility, and of something 
custom made, the effort to get it on the host.

> try it.

I hope you are not seriously suggesting I allow anybody but myself 
(administrator) access to cfobject on a shared host.

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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Java in CF (CFMX)

2002-11-25 Thread Rob Rohan
Bet you could add 'null' if you could do inline java

:)


just kidding
Rob

-Original Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 3:24 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


On Monday, Nov 25, 2002, at 14:32 US/Pacific, Joe Eugene wrote:
> Here is an Example that works with CFMX. The Java file should be
> compiled
> under WEB-INF/classes/
> ...
>  if(c.equalsIgnoreCase("null")) cat=null; else cat=c;
>  if(s.equalsIgnoreCase("null")) schPattern=null; else schPattern=s;
>  if(t.equalsIgnoreCase("null")) tblNPattern=null; else tblNPattern=t;

But Dick's point is that you cannot natively pass null into Java - you
are currently forced to write a Java wrapper class as you have done. I
would like to see CFMX be able to pass null to Java correctly but I
suspect it wouldn't be trivial to do (adding 'null' to a language that
doesn't have it has a semantic impact right across the language because
you have to define in every case what happens in an expression if one
of your sub-expressions is null).

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.corfield.org/blog/

Introducing Macromedia Contribute. Web publishing for everyone.
Learn more at http://www.macromedia.com/contribute


~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: Java in CF (CFMX)

2002-11-25 Thread Sean A Corfield
On Monday, Nov 25, 2002, at 14:32 US/Pacific, Joe Eugene wrote:
> Here is an Example that works with CFMX. The Java file should be 
> compiled
> under WEB-INF/classes/
> ...
>  if(c.equalsIgnoreCase("null")) cat=null; else cat=c;
>  if(s.equalsIgnoreCase("null")) schPattern=null; else schPattern=s;
>  if(t.equalsIgnoreCase("null")) tblNPattern=null; else tblNPattern=t;

But Dick's point is that you cannot natively pass null into Java - you 
are currently forced to write a Java wrapper class as you have done. I 
would like to see CFMX be able to pass null to Java correctly but I 
suspect it wouldn't be trivial to do (adding 'null' to a language that 
doesn't have it has a semantic impact right across the language because 
you have to define in every case what happens in an expression if one 
of your sub-expressions is null).

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.corfield.org/blog/

Introducing Macromedia Contribute. Web publishing for everyone.
Learn more at http://www.macromedia.com/contribute

~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: Java in CF (CFMX)

2002-11-25 Thread Dick Applebaum
Rob

You are right!

The thread is/was about inline Java (someone, maybe you started it)

I posted that I would like to see inline Java for several reasons:

to gently learn Java

to get at some capabilities  not available in CF

etc.

Several others posted.

Then, Jochem posted that he thought inline Java was a security exposure  
and
MM should provide some superfunctions, for example getting  
DatabaseMetaData.

I posted that this was one of the things I wanted to do with inline  
Java but would be
prefer a superfunction.  I also said that I had a working Java program  
that accessed
DatabaseMetaData, but could not accomplish the same with CF.

Joe posted asking to see the code

--and you know the rest.

So, the thread changed topic a little --  to how interface CF to a Java  
program to get
DatabaseMateData.

I  haven't  tried Joe's code yet, but it looks like it will work --  
Thanks Joe! (I'll report back, later).

But, Rob, your point was well made -- with inline Java, you wouldn't  
need to have a separate
Java program to interface, maintain, compile, etc.

This could be done entirely in a single CF program, if inline Java were  
available -- and it would
be a lot cleaner and much much more consistent with the "ease-of-use"  
and "self-documenting"
philosophy/strength of CF..

In fact, this is exactly the kind of Java snippet (and justification) I  
had in mind when
I originally posted to this thread.

Dick


On Monday, November 25, 2002, at 02:45 PM, Rob Rohan wrote:

> Thought this thread was still about inline java. Sorry - maybe it was
> another thread.
>
> nevermind.
>
> Rob
>
> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 2:40 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX)
>
>
>> wouldn't need to happen.
> Where do u want it happen?
>
> Joe
>
> On Mon, 25 Nov 2002 14:37:29 -0800 Rob Rohan <[EMAIL PROTECTED]>  
> wrote:
>
>> See though the whole point is
>>
>>> The Java file should be compiled
>>> under WEB-INF/classes/
>>> and you can invoke it with CFObject.
>>
>
>>
>>
>> Rob
>>
>> Certified Organic
>> "When you put things in quotes, people think
>> someone actually said it."
>> http://treebeard.sourceforge.net
>> http://ruinworld.sourceforge.net
>> Scientia Est Potentia
>>
>> -Original Message-
>> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, November 25, 2002 2:33 PM
>> To: CF-Talk
>> Subject: Re: Java in CF (CFMX)
>>
>>
>> Dick,
>> Here is an Example that works with CFMX. The
>> Java file should be compiled
>> under WEB-INF/classes/
>> and you can invoke it with CFObject. Note i am
>> using Macromedia drivers to
>> connect to Sql-Server.
>> This is rough sketch..if you want.. i can
>> improvise this later..to be
>> generic.
>> Dont forget to substitute your Database
>> Name,server name, userid and
>> password.
>> The method call returns a list of table names.
>>
>> /*Java File*/
>>
>> import java.sql.*;
>> import java.util.*;
>>
>> public class MetaData{
>>
>>  String
>> driverName="macromedia.jdbc.MacromediaDriver";
>>  String
>> url="jdbc:macromedia:sqlserver://SqlServer:1433";
>>  String userid="YourUserid";
>>  String pwd="YourPassword";
>>  private String cat,schPattern,tblNPattern;
>>  private String tblTypes[];
>>
>>  public void setParms(String c,String s, String
>> t){
>>  if(c.equalsIgnoreCase("null")) cat=null; else
>> cat=c;
>>  if(s.equalsIgnoreCase("null"))
>> schPattern=null; else schPattern=s;
>>  if(t.equalsIgnoreCase("null"))
>> tblNPattern=null; else tblNPattern=t;
>>  tblTypes=null;
>>  }
>> /*String
>> driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver";
>>  //String
>> url="jdbc:microsoft:sqlserver://SqlServer:1433";
>> */
>>
>>  public String getTablesOnly(){
>>   StringBuffer sb = new StringBuffer();
>>   try{
>>   Class.forName(driverName);
>>   Connection con =
>> DriverManager.getConnection(url,userid,pwd);
>>   DatabaseMetaData md = con.getMetaData();
>>
>> //System.out.println(md.getSQLKeywords()+"\n\n");
>>
>> //System.out.println(md.getNumericFunctions());
>>
>>   //String tbTypes[]={"TABLE","User"};
>>   ResultSet rs =
>> md.getTables(cat,schPattern,tblNPattern,tblTy

Re: Java in CF (CFMX)

2002-11-25 Thread Joe Eugene
You loose alot of flexibility.. on a shared server.. How many ppl are running
enterprise CFMX on shared servers? 
Have ever had to call a function/method in CF around 1000 times on a page? Do
some math with it...CFObject(Java) blows CF..try it.

Joe

On Mon, 25 Nov 2002 23:58:02 +0100 Jochem van Dieten <[EMAIL PROTECTED]>
wrote:

> Joe Eugene wrote:
> 
> > >wouldn't need to happen.
> >
> > Where do u want it happen?
> 
> At some MM production facility. As I said,
> cfobject is a no-go on a 
> shared server.
> 
> 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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Java in CF (CFMX)

2002-11-25 Thread Jim Campbell
True, but have you ever used the cfmodule tag,  or  anything,
?  Why bother using them when you could just write all that code
inline with your current template source?

By encapsulating that function seperately, you not only make the template
code more readable, but leave it available for any other templates, CFCs or
whatever that needs to use it.

- Jim

-Original Message-
From: Rob Rohan [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 4:37 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX)


See though the whole point is

>The Java file should be compiled
>under WEB-INF/classes/
>and you can invoke it with CFObject.

wouldn't need to happen.


Rob

Certified Organic
"When you put things in quotes, people think someone actually said it."
http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 2:33 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Dick,
Here is an Example that works with CFMX. The Java file should be compiled
under WEB-INF/classes/
and you can invoke it with CFObject. Note i am using Macromedia drivers to
connect to Sql-Server.
This is rough sketch..if you want.. i can improvise this later..to be
generic.
Dont forget to substitute your Database Name,server name, userid and
password.
The method call returns a list of table names.

/*Java File*/

import java.sql.*;
import java.util.*;

public class MetaData{

 String driverName="macromedia.jdbc.MacromediaDriver";
 String url="jdbc:macromedia:sqlserver://SqlServer:1433";
 String userid="YourUserid";
 String pwd="YourPassword";
 private String cat,schPattern,tblNPattern;
 private String tblTypes[];

 public void setParms(String c,String s, String t){
 if(c.equalsIgnoreCase("null")) cat=null; else cat=c;
 if(s.equalsIgnoreCase("null")) schPattern=null; else schPattern=s;
 if(t.equalsIgnoreCase("null")) tblNPattern=null; else tblNPattern=t;
 tblTypes=null;
 }
/*String driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver";
 //String url="jdbc:microsoft:sqlserver://SqlServer:1433";
*/

 public String getTablesOnly(){
  StringBuffer sb = new StringBuffer();
  try{
  Class.forName(driverName);
  Connection con = DriverManager.getConnection(url,userid,pwd);
  DatabaseMetaData md = con.getMetaData();
  //System.out.println(md.getSQLKeywords()+"\n\n");
  //System.out.println(md.getNumericFunctions());

  //String tbTypes[]={"TABLE","User"};
  ResultSet rs = md.getTables(cat,schPattern,tblNPattern,tblTypes);

  while(rs.next()){
  sb.append(rs.getString("TABLE_NAME")+',');
  }
  rs.close();
  con.close();
  return sb.toString();
   }catch(Exception e){
return e.toString();
  }

 }//end getTablesOnly

/*
 public static void main(String argv[]){
  MetaData m = new MetaData();
  System.out.println(m.getTablesOnly());
 }
*/
}







Hope this gives you an idea.
Joe



On Mon, 25 Nov 2002 10:56:57 -0800 Dick Applebaum <[EMAIL PROTECTED]>
wrote:

> Joe
>
> Below is the Java source, originally caalled
> DBViewer.
>
> This is working code that I modified to use the
> CFMX cfsnippets db (The
> PointBase
> database shipped with the Linux distro).
>
> I want to accomplish the same thing within
> CFMX, and generalize it a
> bit so it will
> work with any JDBC driver and database,
> remote or local, on any platform.
>
> For remote dbs, there will be a stub program
> that determines the
> platform, CF
> version, etc. and Uses COM objects or the Java
> interface as needed.
> Requests and data are exchanged via WDDX
> packets.
>
> For local dbs the function could be included
> inline (for performance)
> or via the
> stub (for convenience)
>
> The problem statements are shown at:  30, 38,
> and 45.
>
> It is fairly easy to program equivalent CF
> code, but you can't pass
> nulls from CF.
>
> Given more time, I would probably do this:
>
>Use a Java program (similar to this) to do
> the actual manipulation
>of the JDBC driver.
>
>Use a CF routine to interface the Java
> program:  providing input
>paramaters for the desired db request;  and
> presentation of the
>results
>
>Use an alias (such as 'MyNull'), to exchange
> psuedo nulls between
>CF and Java, as necessary
>
> Any help will be greatly appreciated.
>
> TIA
>
> Dick
>
>
>
> 1 //  public abstract ResultSet
> getIndexInfo(String catalog, String
> schema,String table, boolean unique,
> boolean approximate)
> throws SQLException;
> 2 //  public abstract ResultSet
> getColumns(String catalog, String
> schemaPattern, String tableNamePat

Re: Java in CF (CFMX)

2002-11-25 Thread Jochem van Dieten
Joe Eugene wrote:

> >wouldn't need to happen.
>
> Where do u want it happen?

At some MM production facility. As I said, cfobject is a no-go on a 
shared server.

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



RE: Java in CF (CFMX)

2002-11-25 Thread Rob Rohan
Thought this thread was still about inline java. Sorry - maybe it was
another thread.

nevermind.

Rob

-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 2:40 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX)


> wouldn't need to happen.
Where do u want it happen?

Joe

On Mon, 25 Nov 2002 14:37:29 -0800 Rob Rohan <[EMAIL PROTECTED]> wrote:

> See though the whole point is
>
> >The Java file should be compiled
> >under WEB-INF/classes/
> >and you can invoke it with CFObject.
>

>
>
> Rob
>
> Certified Organic
> "When you put things in quotes, people think
> someone actually said it."
> http://treebeard.sourceforge.net
> http://ruinworld.sourceforge.net
> Scientia Est Potentia
>
> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 2:33 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> Dick,
> Here is an Example that works with CFMX. The
> Java file should be compiled
> under WEB-INF/classes/
> and you can invoke it with CFObject. Note i am
> using Macromedia drivers to
> connect to Sql-Server.
> This is rough sketch..if you want.. i can
> improvise this later..to be
> generic.
> Dont forget to substitute your Database
> Name,server name, userid and
> password.
> The method call returns a list of table names.
>
> /*Java File*/
>
> import java.sql.*;
> import java.util.*;
>
> public class MetaData{
>
>  String
> driverName="macromedia.jdbc.MacromediaDriver";
>  String
> url="jdbc:macromedia:sqlserver://SqlServer:1433";
>  String userid="YourUserid";
>  String pwd="YourPassword";
>  private String cat,schPattern,tblNPattern;
>  private String tblTypes[];
>
>  public void setParms(String c,String s, String
> t){
>  if(c.equalsIgnoreCase("null")) cat=null; else
> cat=c;
>  if(s.equalsIgnoreCase("null"))
> schPattern=null; else schPattern=s;
>  if(t.equalsIgnoreCase("null"))
> tblNPattern=null; else tblNPattern=t;
>  tblTypes=null;
>  }
> /*String
> driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver";
>  //String
> url="jdbc:microsoft:sqlserver://SqlServer:1433";
> */
>
>  public String getTablesOnly(){
>   StringBuffer sb = new StringBuffer();
>   try{
>   Class.forName(driverName);
>   Connection con =
> DriverManager.getConnection(url,userid,pwd);
>   DatabaseMetaData md = con.getMetaData();
>
> //System.out.println(md.getSQLKeywords()+"\n\n");
>
> //System.out.println(md.getNumericFunctions());
>
>   //String tbTypes[]={"TABLE","User"};
>   ResultSet rs =
> md.getTables(cat,schPattern,tblNPattern,tblTypes);
>
>   while(rs.next()){
>   sb.append(rs.getString("TABLE_NAME")+',');
>   }
>   rs.close();
>   con.close();
>   return sb.toString();
>}catch(Exception e){
> return e.toString();
>   }
>
>  }//end getTablesOnly
>
> /*
>  public static void main(String argv[]){
>   MetaData m = new MetaData();
>   System.out.println(m.getTablesOnly());
>  }
> */
> }
>
>
>
>
>
>
>
> Hope this gives you an idea.
> Joe
>
>
>
> On Mon, 25 Nov 2002 10:56:57 -0800 Dick
> Applebaum
> wrote:
>
> > Joe
> >
> > Below is the Java source, originally caalled
> > DBViewer.
> >
> > This is working code that I modified to use
> the
> > CFMX cfsnippets db (The
> > PointBase
> > database shipped with the Linux distro).
> >
> > I want to accomplish the same thing within
> > CFMX, and generalize it a
> > bit so it will
> > work with any JDBC driver and database,
> > remote or local, on any platform.
> >
> > For remote dbs, there will be a stub program
> > that determines the
> > platform, CF
> > version, etc. and Uses COM objects or the
> Java
> > interface as needed.
> > Requests and data are exchanged via WDDX
> > packets.
> >
> > For local dbs the function could be included
> > inline (for performance)
> > or via the
> > stub (for convenience)
> >
> > The problem statements are shown at:  30, 38,
> > and 45.
> >
> > It is fairly easy to program equivalent CF
> > code, but you can't pass
> > nulls from CF.
> >
> > Given more time, I would probably do this:
> >
> >Use a Java program (similar to this) to do
> > the actual manipulation
> >of the JDBC driver.
> >
> >Use a CF routine to interface the Java
> 

RE: Java in CF (CFMX)

2002-11-25 Thread Joe Eugene
> wouldn't need to happen.
Where do u want it happen?

Joe

On Mon, 25 Nov 2002 14:37:29 -0800 Rob Rohan <[EMAIL PROTECTED]> wrote:

> See though the whole point is
> 
> >The Java file should be compiled
> >under WEB-INF/classes/
> >and you can invoke it with CFObject.
> 

> 
> 
> Rob
> 
> Certified Organic
> "When you put things in quotes, people think
> someone actually said it."
> http://treebeard.sourceforge.net
> http://ruinworld.sourceforge.net
> Scientia Est Potentia
> 
> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 2:33 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
> 
> 
> Dick,
> Here is an Example that works with CFMX. The
> Java file should be compiled
> under WEB-INF/classes/
> and you can invoke it with CFObject. Note i am
> using Macromedia drivers to
> connect to Sql-Server.
> This is rough sketch..if you want.. i can
> improvise this later..to be
> generic.
> Dont forget to substitute your Database
> Name,server name, userid and
> password.
> The method call returns a list of table names.
> 
> /*Java File*/
> 
> import java.sql.*;
> import java.util.*;
> 
> public class MetaData{
> 
>  String
> driverName="macromedia.jdbc.MacromediaDriver";
>  String
> url="jdbc:macromedia:sqlserver://SqlServer:1433";
>  String userid="YourUserid";
>  String pwd="YourPassword";
>  private String cat,schPattern,tblNPattern;
>  private String tblTypes[];
> 
>  public void setParms(String c,String s, String
> t){
>  if(c.equalsIgnoreCase("null")) cat=null; else
> cat=c;
>  if(s.equalsIgnoreCase("null"))
> schPattern=null; else schPattern=s;
>  if(t.equalsIgnoreCase("null"))
> tblNPattern=null; else tblNPattern=t;
>  tblTypes=null;
>  }
> /*String
> driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver";
>  //String
> url="jdbc:microsoft:sqlserver://SqlServer:1433";
> */
> 
>  public String getTablesOnly(){
>   StringBuffer sb = new StringBuffer();
>   try{
>   Class.forName(driverName);
>   Connection con =
> DriverManager.getConnection(url,userid,pwd);
>   DatabaseMetaData md = con.getMetaData();
>  
> //System.out.println(md.getSQLKeywords()+"\n\n");
>  
> //System.out.println(md.getNumericFunctions());
> 
>   //String tbTypes[]={"TABLE","User"};
>   ResultSet rs =
> md.getTables(cat,schPattern,tblNPattern,tblTypes);
> 
>   while(rs.next()){
>   sb.append(rs.getString("TABLE_NAME")+',');
>   }
>   rs.close();
>   con.close();
>   return sb.toString();
>}catch(Exception e){
> return e.toString();
>   }
> 
>  }//end getTablesOnly
> 
> /*
>  public static void main(String argv[]){
>   MetaData m = new MetaData();
>   System.out.println(m.getTablesOnly());
>  }
> */
> }
> 
> 
> 
> 
> 
> 
> 
> Hope this gives you an idea.
> Joe
> 
> 
> 
> On Mon, 25 Nov 2002 10:56:57 -0800 Dick
> Applebaum 
> wrote:
> 
> > Joe
> >
> > Below is the Java source, originally caalled
> > DBViewer.
> >
> > This is working code that I modified to use
> the
> > CFMX cfsnippets db (The
> > PointBase
> > database shipped with the Linux distro).
> >
> > I want to accomplish the same thing within
> > CFMX, and generalize it a
> > bit so it will
> > work with any JDBC driver and database,
> > remote or local, on any platform.
> >
> > For remote dbs, there will be a stub program
> > that determines the
> > platform, CF
> > version, etc. and Uses COM objects or the
> Java
> > interface as needed.
> > Requests and data are exchanged via WDDX
> > packets.
> >
> > For local dbs the function could be included
> > inline (for performance)
> > or via the
> > stub (for convenience)
> >
> > The problem statements are shown at:  30, 38,
> > and 45.
> >
> > It is fairly easy to program equivalent CF
> > code, but you can't pass
> > nulls from CF.
> >
> > Given more time, I would probably do this:
> >
> >Use a Java program (similar to this) to do
> > the actual manipulation
> >of the JDBC driver.
> >
> >Use a CF routine to interface the Java
> > program:  providing input
> >paramaters for the desired db request; 
> and
> > presentation of the
> >results
> >
> >Use an alias (such as 'MyNull'), to
> exchange

RE: Java in CF (CFMX)

2002-11-25 Thread Rob Rohan
See though the whole point is

>The Java file should be compiled
>under WEB-INF/classes/
>and you can invoke it with CFObject.

wouldn't need to happen.


Rob

Certified Organic
"When you put things in quotes, people think someone actually said it."
http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 2:33 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Dick,
Here is an Example that works with CFMX. The Java file should be compiled
under WEB-INF/classes/
and you can invoke it with CFObject. Note i am using Macromedia drivers to
connect to Sql-Server.
This is rough sketch..if you want.. i can improvise this later..to be
generic.
Dont forget to substitute your Database Name,server name, userid and
password.
The method call returns a list of table names.

/*Java File*/

import java.sql.*;
import java.util.*;

public class MetaData{

 String driverName="macromedia.jdbc.MacromediaDriver";
 String url="jdbc:macromedia:sqlserver://SqlServer:1433";
 String userid="YourUserid";
 String pwd="YourPassword";
 private String cat,schPattern,tblNPattern;
 private String tblTypes[];

 public void setParms(String c,String s, String t){
 if(c.equalsIgnoreCase("null")) cat=null; else cat=c;
 if(s.equalsIgnoreCase("null")) schPattern=null; else schPattern=s;
 if(t.equalsIgnoreCase("null")) tblNPattern=null; else tblNPattern=t;
 tblTypes=null;
 }
/*String driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver";
 //String url="jdbc:microsoft:sqlserver://SqlServer:1433";
*/

 public String getTablesOnly(){
  StringBuffer sb = new StringBuffer();
  try{
  Class.forName(driverName);
  Connection con = DriverManager.getConnection(url,userid,pwd);
  DatabaseMetaData md = con.getMetaData();
  //System.out.println(md.getSQLKeywords()+"\n\n");
  //System.out.println(md.getNumericFunctions());

  //String tbTypes[]={"TABLE","User"};
  ResultSet rs = md.getTables(cat,schPattern,tblNPattern,tblTypes);

  while(rs.next()){
  sb.append(rs.getString("TABLE_NAME")+',');
  }
  rs.close();
  con.close();
  return sb.toString();
   }catch(Exception e){
return e.toString();
  }

 }//end getTablesOnly

/*
 public static void main(String argv[]){
  MetaData m = new MetaData();
  System.out.println(m.getTablesOnly());
 }
*/
}







Hope this gives you an idea.
Joe



On Mon, 25 Nov 2002 10:56:57 -0800 Dick Applebaum <[EMAIL PROTECTED]>
wrote:

> Joe
>
> Below is the Java source, originally caalled
> DBViewer.
>
> This is working code that I modified to use the
> CFMX cfsnippets db (The
> PointBase
> database shipped with the Linux distro).
>
> I want to accomplish the same thing within
> CFMX, and generalize it a
> bit so it will
> work with any JDBC driver and database,
> remote or local, on any platform.
>
> For remote dbs, there will be a stub program
> that determines the
> platform, CF
> version, etc. and Uses COM objects or the Java
> interface as needed.
> Requests and data are exchanged via WDDX
> packets.
>
> For local dbs the function could be included
> inline (for performance)
> or via the
> stub (for convenience)
>
> The problem statements are shown at:  30, 38,
> and 45.
>
> It is fairly easy to program equivalent CF
> code, but you can't pass
> nulls from CF.
>
> Given more time, I would probably do this:
>
>Use a Java program (similar to this) to do
> the actual manipulation
>of the JDBC driver.
>
>Use a CF routine to interface the Java
> program:  providing input
>paramaters for the desired db request;  and
> presentation of the
>results
>
>Use an alias (such as 'MyNull'), to exchange
> psuedo nulls between
>CF and Java, as necessary
>
> Any help will be greatly appreciated.
>
> TIA
>
> Dick
>
>
>
> 1 //  public abstract ResultSet
> getIndexInfo(String catalog, String
> schema,String table, boolean unique,
> boolean approximate)
> throws SQLException;
> 2 //  public abstract ResultSet
> getColumns(String catalog, String
> schemaPattern, String tableNamePattern, String
> columnNamePattern)
> throws SQLException;
>
> 3
> 4 import java.sql.*;
> 5 import java.util.StringTokenizer;
>
> 6 public class DBViewerPB {
>
> 7   final static String jdbcURL =
> "jdbc:pointbase:cfsnippets,database.home=/opt/coldfusionmx/db";
> 8   final static String jdbcDriver =
> "com.pointbase.jdbc.jdbcUniversalDriver";
> 9   final static String username = "PBPUBLIC";
> 10   final static String password = &q

Re: Java in CF (CFMX)

2002-11-25 Thread Joe Eugene
Dick,
Here is an Example that works with CFMX. The Java file should be compiled
under WEB-INF/classes/
and you can invoke it with CFObject. Note i am using Macromedia drivers to
connect to Sql-Server.
This is rough sketch..if you want.. i can improvise this later..to be generic.
Dont forget to substitute your Database Name,server name, userid and password.
The method call returns a list of table names.

/*Java File*/

import java.sql.*;
import java.util.*;

public class MetaData{

 String driverName="macromedia.jdbc.MacromediaDriver";
 String url="jdbc:macromedia:sqlserver://SqlServer:1433";
 String userid="YourUserid";
 String pwd="YourPassword";
 private String cat,schPattern,tblNPattern;
 private String tblTypes[];

 public void setParms(String c,String s, String t){
 if(c.equalsIgnoreCase("null")) cat=null; else cat=c;
 if(s.equalsIgnoreCase("null")) schPattern=null; else schPattern=s;
 if(t.equalsIgnoreCase("null")) tblNPattern=null; else tblNPattern=t;
 tblTypes=null;
 }
/*String driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver";
 //String url="jdbc:microsoft:sqlserver://SqlServer:1433";
*/

 public String getTablesOnly(){
  StringBuffer sb = new StringBuffer();
  try{
  Class.forName(driverName);
  Connection con = DriverManager.getConnection(url,userid,pwd);
  DatabaseMetaData md = con.getMetaData();
  //System.out.println(md.getSQLKeywords()+"\n\n");
  //System.out.println(md.getNumericFunctions());

  //String tbTypes[]={"TABLE","User"};
  ResultSet rs = md.getTables(cat,schPattern,tblNPattern,tblTypes);

  while(rs.next()){
  sb.append(rs.getString("TABLE_NAME")+',');
  }
  rs.close();
  con.close();
  return sb.toString();
   }catch(Exception e){
return e.toString();
  }

 }//end getTablesOnly

/*
 public static void main(String argv[]){
  MetaData m = new MetaData();
  System.out.println(m.getTablesOnly());
 }
*/
}







Hope this gives you an idea.
Joe



On Mon, 25 Nov 2002 10:56:57 -0800 Dick Applebaum <[EMAIL PROTECTED]> wrote:

> Joe
> 
> Below is the Java source, originally caalled
> DBViewer.
> 
> This is working code that I modified to use the
> CFMX cfsnippets db (The  
> PointBase
> database shipped with the Linux distro).
> 
> I want to accomplish the same thing within
> CFMX, and generalize it a  
> bit so it will
> work with any JDBC driver and database,
> remote or local, on any platform.
> 
> For remote dbs, there will be a stub program
> that determines the  
> platform, CF
> version, etc. and Uses COM objects or the Java
> interface as needed.
> Requests and data are exchanged via WDDX
> packets.
> 
> For local dbs the function could be included
> inline (for performance)  
> or via the
> stub (for convenience)
> 
> The problem statements are shown at:  30, 38,
> and 45.
> 
> It is fairly easy to program equivalent CF
> code, but you can't pass  
> nulls from CF.
> 
> Given more time, I would probably do this:
> 
>Use a Java program (similar to this) to do
> the actual manipulation
>of the JDBC driver.
> 
>Use a CF routine to interface the Java
> program:  providing input
>paramaters for the desired db request;  and
> presentation of the
>results
> 
>Use an alias (such as 'MyNull'), to exchange
> psuedo nulls between
>CF and Java, as necessary
> 
> Any help will be greatly appreciated.
> 
> TIA
> 
> Dick
> 
> 
> 
> 1 //  public abstract ResultSet
> getIndexInfo(String catalog, String  
> schema,String table, boolean unique,
> boolean approximate)  
> throws SQLException;
> 2 //  public abstract ResultSet  
> getColumns(String catalog, String  
> schemaPattern, String tableNamePattern, String
> columnNamePattern)  
> throws SQLException;
> 
> 3
> 4 import java.sql.*;
> 5 import java.util.StringTokenizer;
> 
> 6 public class DBViewerPB {
> 
> 7   final static String jdbcURL =  
> "jdbc:pointbase:cfsnippets,database.home=/opt/coldfusionmx/db";
> 8   final static String jdbcDriver =  
> "com.pointbase.jdbc.jdbcUniversalDriver";
> 9   final static String username = "PBPUBLIC";
> 10   final static String password = "PBPUBLIC";
> 
> 11   public static void main(java.lang.String[]
> args) {
> 
> 12 System.out.println("--- Database Viewer
> ---");
> 13
> 14 try {
> 15   Class.forName(jdbcDriver);
> 16   Connection con =
> DriverManager.getConnection(jdbcURL,  
> username, password);
> 
> 17   DatabaseMetaData dbmd =
> con.getMetaData(  );
> 
> 18   System.out.println("Driver Name: " +
> dbmd.getDriverName(  ));
> 19   System.out.println("Database Product:
> " +  
> dbmd.getDatabaseProductName(  ));
> 20   System.out.println("Database Version:
> " +  
> dbmd.getDatabaseProductVersion(  ));
> 21   System.out.println("SQL Keywords
> Supported:");
> 22   //StringTokenizer st = new  
> StringTokenizer(dbmd.getSQLKeywords(  ), ",");
> 23   //while(st.hasMoreTokens(  ))
> 24   //  System.out.println(" " +
> st.nextToken(  ));
> 25
> 26   // Get a ResultSet that contains all
> of the ta

Re: Java in CF (CFMX)

2002-11-25 Thread Dick Applebaum
Joe

Below is the Java source, originally caalled DBViewer.

This is working code that I modified to use the CFMX cfsnippets db (The  
PointBase
database shipped with the Linux distro).

I want to accomplish the same thing within CFMX, and generalize it a  
bit so it will
work with any JDBC driver and database,
remote or local, on any platform.

For remote dbs, there will be a stub program that determines the  
platform, CF
version, etc. and Uses COM objects or the Java interface as needed.
Requests and data are exchanged via WDDX packets.

For local dbs the function could be included inline (for performance)  
or via the
stub (for convenience)

The problem statements are shown at:  30, 38, and 45.

It is fairly easy to program equivalent CF code, but you can't pass  
nulls from CF.

Given more time, I would probably do this:

   Use a Java program (similar to this) to do the actual manipulation
   of the JDBC driver.

   Use a CF routine to interface the Java program:  providing input
   paramaters for the desired db request;  and presentation of the
   results

   Use an alias (such as 'MyNull'), to exchange psuedo nulls between
   CF and Java, as necessary

Any help will be greatly appreciated.

TIA

Dick



1 //  public abstract ResultSet getIndexInfo(String catalog, String  
schema,String table, boolean unique, boolean approximate)  
throws SQLException;
2 //  public abstract ResultSet   getColumns(String catalog, String  
schemaPattern, String tableNamePattern, String columnNamePattern)  
throws SQLException;

3
4 import java.sql.*;
5 import java.util.StringTokenizer;

6 public class DBViewerPB {

7   final static String jdbcURL =  
"jdbc:pointbase:cfsnippets,database.home=/opt/coldfusionmx/db";
8   final static String jdbcDriver =  
"com.pointbase.jdbc.jdbcUniversalDriver";
9   final static String username = "PBPUBLIC";
10   final static String password = "PBPUBLIC";

11   public static void main(java.lang.String[] args) {

12 System.out.println("--- Database Viewer ---");
13
14 try {
15   Class.forName(jdbcDriver);
16   Connection con = DriverManager.getConnection(jdbcURL,  
username, password);

17   DatabaseMetaData dbmd = con.getMetaData(  );

18   System.out.println("Driver Name: " + dbmd.getDriverName(  ));
19   System.out.println("Database Product: " +  
dbmd.getDatabaseProductName(  ));
20   System.out.println("Database Version: " +  
dbmd.getDatabaseProductVersion(  ));
21   System.out.println("SQL Keywords Supported:");
22   //StringTokenizer st = new  
StringTokenizer(dbmd.getSQLKeywords(  ), ",");
23   //while(st.hasMoreTokens(  ))
24   //  System.out.println(" " + st.nextToken(  ));
25
26   // Get a ResultSet that contains all of the tables in this  
database
27   // We specify a table_type of "TABLE" to prevent seeing system  
tables,
28   // views and so forth
29   String[] tableTypes = { "TABLE" };
30   ResultSet allTables =  
dbmd.getTables(null,null,null,tableTypes);
31   while(allTables.next(  )) {
32 String table_name = allTables.getString("TABLE_NAME");
33 System.out.println("Table Name: " + table_name);
34 System.out.println("Table Type:  " +  
allTables.getString("TABLE_TYPE"));
35 System.out.println("Indexes: ");

36 // Get a list of all the columns for this table
37 ResultSet columnList =
38  dbmd.getColumns(null,null,table_name,null);
39 while(columnList.next(  )) {
40   System.out.println(" Column Name:  
"+columnList.getString("COLUMN_NAME"));
41 }
42 columnList.close(  );

43 // Get a list of all the indexes for this table
44 ResultSet indexList =
45   
dbmd.getIndexInfo(null,null,table_name,false,false);
46 while(indexList.next(  )) {
47   System.out.println(" Index Name:  
"+indexList.getString("INDEX_NAME"));
48   System.out.println(" Column Name:  
"+indexList.getString("COLUMN_NAME"));
49 }
50 indexList.close(  );
51   }

52   allTables.close(  );
53   con.close(  );
54 }
55 catch (ClassNotFoundException e) {
56   System.out.println("Unable to load database driver class");
57 }
58 catch (SQLException e) {
59   System.out.println("SQL Exception: " + e.getMessage(  ));
60 }
61   }
62 }


On Monday, November 25, 2002, at 08:42 AM, Joe Eugene wrote:

> Dick,
> Can we see your code? Cant you have a method that converts CF String  
> "null" to
> Java String=null?
>
>> tried to invoke it with cfobject.  We could not
>> make the interface work
>> because we could not pass Nulls between CF and
>> Java.
>
> Here is an example
>
> public class StringType{
>   private String str;
>   public String getString(String s){
>String val="";
>str=s;
>if(str.equals("null")){
>val="Your String was null, setting to null  now";
>str = null;
>val= val+ " " +"Now Java v

Re: Java in CF (CFMX)

2002-11-25 Thread Joe Eugene
Dick,
Can we see your code? Cant you have a method that converts CF String "null" to
Java String=null?

> tried to invoke it with cfobject.  We could not
> make the interface work  
> because we could not pass Nulls between CF and
> Java.

Here is an example

public class StringType{
  private String str;
  public String getString(String s){
   String val="";
   str=s;
   if(str.equals("null")){
   val="Your String was null, setting to null  now";
   str = null;
   val= val+ " " +"Now Java value is : "+ str +"";
   }
   return val;
  }
}

You can invoke it with


#chkNull.getString("null")#


if you can post your code, we can try figure it out. Let me know.

Joe

On Mon, 25 Nov 2002 06:54:03 -0800 Dick Applebaum <[EMAIL PROTECTED]> wrote:

> On Monday, November 25, 2002, at 01:43 AM,
> Jochem van Dieten wrote:
> 
> > Quoting Dave Carabetta :
> >>
> >> While I understand this isn't a feature that
> everybody would use, I
> >> would personally like to see MM focus on
> encapsulating some more Java
> >> features into easy-to-use black-box CF tags
> rather than having to code
> >> my own Java.
> >
> > I agree. For instance, it would be far better
> if CF had a tag to get at
> > the DatabaseMetaData interface instead of
> making it marginally easier  
> > to
> > write it yourself by allowing inline Java.
> 
> This is an excellent example & I expect that
> this will be one of the  
> most-requested capabilities -- to be able to
> get DatabaseMetaData into  
> CF.  I tried to do this, with help from Sean
> Corfield -- without  
> success. I found a working Java program that
> extracts metadata, and  
> tried to invoke it with cfobject.  We could not
> make the interface work  
> because we could not pass Nulls between CF and
> Java.
> 
> This is for a general-purpose developer utility
> that I use to  
> manipulate databases.  It is especially useful
> on remote (shared) sites  
> where  you don't have administrative
> privileges.
> 
> I have been doing this a long time with CF 4.5
> and CF 5 on win  
> platforms using cfobject to manipulate COM
> objects.
> 
> But, I would like to be able to do the same
> thing with CFMX on  
> non-windows platforms.
> 
> Here's the difficulty:
> 
> With CFMX:
> 
> I can get at the equivalent of DatabaseMetaData
> on a remote windows  
> box, using cfobject and COM objects.
> 
> But, I can't get at the DatabaseMetaData on my
> local Unix (Mac OS X)  
> developer machine -- you can't use COM objects
> and can't pass the Nulls  
> to the Java program that gets the
> DatabaseMetaData.
> 
> I suppose there is a way to circumvent the need
> to pass Nulls between  
> CF and Java, but I have not had time to
> investigate this.
> 
> > And especially from the point of view of
> security built-in tags are
> > better. All those JSP tags and Java classes
> are nice, but on a shared
> > server you need to disable them anyway
> because the same mechanism that
> > is used to access them can be used to break
> out of the sandbox.
> >
> 
> Is this true for CFMXJ2ee on JRun, Websphere or
> whatever?
> 
> I thought that one of the advantages of
> CFMXJ2ee on a J2ee-compliant  
> app server, is the ability to interoperate
> between CF and Java programs.
> 
> Will this be possible with Java access
> disabled?
> 
> For the DatabaseMetaData example, I would
> prefer the CF tag approach.
> 
> But, I still think it is valid to use Java,
> where warranted, on a  
> developer machine.
> 
> 
> Dick
> 
> 
> > 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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: Java in CF (CFMX)

2002-11-25 Thread Jochem van Dieten
Dick Applebaum wrote:

> On Monday, November 25, 2002, at 01:43 AM, Jochem van Dieten wrote:
> >
> >And especially from the point of view of security built-in tags are
> >better. All those JSP tags and Java classes are nice, but on a shared
> >server you need to disable them anyway because the same mechanism 
> >that is used to access them can be used to break out of the sandbox.
>
> Is this true for CFMXJ2ee on JRun, Websphere or whatever?

Depends on the built-in functionality. IIRC when you run JRUN Enterprise 
Edition you can configure multiple websites/applications to run under 
different OS accounts. That would make it possible to do this securely. 
But how many hosting providers would you expect to run JRUN Enterprise + 
CF for J2EE?

> I thought that one of the advantages of CFMXJ2ee on a J2ee-compliant
> app server, is the ability to interoperate between CF and Java programs.

Technically it is possible, but the function CreateObject() and tags 
like cfobject need to be disabled in a shared hosting environment 
because you can't guarantee any security with them. The CF MX 
Administrator is based on these, and allowing them pretty much gives 
administrator priviledges to anybody on the server.

> For the DatabaseMetaData example, I would prefer the CF tag approach.

http://www.macromedia.com/support/email/wishform/?6213=3

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



Re: Java in CF (CFMX)

2002-11-25 Thread Dick Applebaum
On Monday, November 25, 2002, at 01:43 AM, Jochem van Dieten wrote:

> Quoting Dave Carabetta <[EMAIL PROTECTED]>:
>>
>> While I understand this isn't a feature that everybody would use, I
>> would personally like to see MM focus on encapsulating some more Java
>> features into easy-to-use black-box CF tags rather than having to code
>> my own Java.
>
> I agree. For instance, it would be far better if CF had a tag to get at
> the DatabaseMetaData interface instead of making it marginally easier  
> to
> write it yourself by allowing inline Java.

This is an excellent example & I expect that this will be one of the  
most-requested capabilities -- to be able to get DatabaseMetaData into  
CF.  I tried to do this, with help from Sean Corfield -- without  
success. I found a working Java program that extracts metadata, and  
tried to invoke it with cfobject.  We could not make the interface work  
because we could not pass Nulls between CF and Java.

This is for a general-purpose developer utility that I use to  
manipulate databases.  It is especially useful on remote (shared) sites  
where  you don't have administrative privileges.

I have been doing this a long time with CF 4.5 and CF 5 on win  
platforms using cfobject to manipulate COM objects.

But, I would like to be able to do the same thing with CFMX on  
non-windows platforms.

Here's the difficulty:

With CFMX:

I can get at the equivalent of DatabaseMetaData on a remote windows  
box, using cfobject and COM objects.

But, I can't get at the DatabaseMetaData on my local Unix (Mac OS X)  
developer machine -- you can't use COM objects and can't pass the Nulls  
to the Java program that gets the DatabaseMetaData.

I suppose there is a way to circumvent the need to pass Nulls between  
CF and Java, but I have not had time to investigate this.

> And especially from the point of view of security built-in tags are
> better. All those JSP tags and Java classes are nice, but on a shared
> server you need to disable them anyway because the same mechanism that
> is used to access them can be used to break out of the sandbox.
>

Is this true for CFMXJ2ee on JRun, Websphere or whatever?

I thought that one of the advantages of CFMXJ2ee on a J2ee-compliant  
app server, is the ability to interoperate between CF and Java programs.

Will this be possible with Java access disabled?

For the DatabaseMetaData example, I would prefer the CF tag approach.

But, I still think it is valid to use Java, where warranted, on a  
developer machine.


Dick


> 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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: Java in CF (CFMX)

2002-11-25 Thread Jochem van Dieten
Quoting Dave Carabetta <[EMAIL PROTECTED]>:
> 
> While I understand this isn't a feature that everybody would use, I
> would personally like to see MM focus on encapsulating some more Java
> features into easy-to-use black-box CF tags rather than having to code
> my own Java.

I agree. For instance, it would be far better if CF had a tag to get at
the DatabaseMetaData interface instead of making it marginally easier to
write it yourself by allowing inline Java.
And especially from the point of view of security built-in tags are
better. All those JSP tags and Java classes are nice, but on a shared
server you need to disable them anyway because the same mechanism that
is used to access them can be used to break out of the sandbox.

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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: Java in CF (CFMX) - MM Drivers

2002-11-24 Thread Sean A Corfield
On Sunday, Nov 24, 2002, at 20:05 US/Pacific, Joe Eugene wrote:
> Thanks Sean once again for pointing out the license thing, anyways i 
> got
> it working with SQL Server Drivers.

Yes, those would not be protected by the Macromedia license I guess.

> On windows, this is what worked for me.
> "java -cp .;G:\CFusionMX\lib\macromedia_drivers.jar JavaFileName"
> The semi colon was whats missing...Picky! Even the ClassPath setting 
> had
> to include ".;" at the begining.

Ah, that's makes sense... On Windows, ':' is a valid part of a file 
path. On Unix it isn't so it can be used as a separator (which is also 
how it works on the Mac since that uses a Unix shell underneath). 
Windows requires ';' instead. The '.;' is '.' (current directory) ';' 
(separator) to tell Java to search the current directory (for your 
SpoDiscParts class file)...

> Thanks for your help and sorry for taking a lot of your time on IM, the
> other day.

Not a problem... Sorry I didn't pick up on the difference in path 
separators on Windows... Not much of a Windows user, I'm afraid...

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.corfield.org/blog/

Introducing Macromedia Contribute. Web publishing for everyone.
Learn more at http://www.macromedia.com/contribute

~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: Java in CF (CFMX) - MM Drivers

2002-11-24 Thread Joe Eugene
Thanks Sean once again for pointing out the license thing, anyways i got
it working with SQL Server Drivers.

> really puzzled since I got it to work on my Mac and we seemed to be
> typing the same commands (modulo you using Windows).

Yes.. it was really frustrating.. i couldnt get it to work with the same
commands..
On windows, this is what worked for me.
"java -cp .;G:\CFusionMX\lib\macromedia_drivers.jar JavaFileName"
The semi colon was whats missing...Picky! Even the ClassPath setting had
to include ".;" at the begining.

Thanks for your help and sorry for taking a lot of your time on IM, the
other day.

Joe


> -Original Message-
> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 8:45 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX) - MM Drivers
>
>
> On Sunday, Nov 24, 2002, at 14:23 US/Pacific, Joe Eugene wrote:
> > I got this partially resolved... Sean helped out.. Thanks Sean.
>
> Glad to hear you got it working after we'd been chatting on IM. I was
> really puzzled since I got it to work on my Mac and we seemed to be
> typing the same commands (modulo you using Windows).
>
> > I get an Exception..
> > "macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An
> > Enterprise
> > license
> > is needed to use the Macromedia JDBC Drivers on the DB2, Oracle,
> > Sybase and
> > Info
> > rmix servers."
>
> Yes, I was a little surprised that this was not the error you were
> getting when you originally posted and I expected you'd run into this
> once you'd got the drivers loaded... sorry! :)
>
> > I am running CFMX Enterprise version(6,0,0,48097).  I have the same
> > connection working fine in JSP Pages under CFMX.
> > Are CFMX Enterprise drivers protected from usage in Java
> > Applications(Console/Swing)?
>
> Yes, basically. When you attempt to run the Macromedia driver classes,
> they check that a valid CFMX Enterprise license is present in the
> runtime environment. That means you can invoke them from CF, you can
> invoke them from JSP running on CFMX but you cannot invoke them outside
> the CFMX environment (unless you can figure out how to persuade a
> standalone Java application to 'find' the CFMX license of course...
> which would probably involve violating your CFMX license agreement!).
>
> Sean A Corfield -- Director, Architecture
> Web Technology Group -- Macromedia, Inc.
> tel: (415) 252-2287 -- cell: (415) 717-8473
> aim: seancorfield -- http://www.macromedia.com
> An Architect's View -- http://www.corfield.org/blog/
>
> Introducing Macromedia Contribute. Web publishing for everyone.
> Learn more at http://www.macromedia.com/contribute
>
> 
~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: Java in CF (CFMX)

2002-11-24 Thread Sean A Corfield
On Sunday, Nov 24, 2002, at 17:43 US/Pacific, Kwang Suh wrote:
> I should also mention that tools like Rational Rose will write a ton 
> of code
> for you based on the design you have created - there's a very tight 
> coupling
> in Java between design and implementation.

A better CASE tool, in my opinion, is TogetherSoft's Control Center - 
Borland thought it was such a good product, they just bought the 
company! TogetherSoft generates - and reverse-engineers - code much 
more neatly than Rose and generates better documentation. It's also a 
scriptable, extensible system - I added "Web Diagram" modeling based on 
Jim Conallen's Web Extensions to UML quite easily.

I've been a TogetherSoft user for about five years and always been a 
fan!

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~|
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



Re: Java in CF (CFMX) - MM Drivers

2002-11-24 Thread Sean A Corfield
On Sunday, Nov 24, 2002, at 14:23 US/Pacific, Joe Eugene wrote:
> I got this partially resolved... Sean helped out.. Thanks Sean.

Glad to hear you got it working after we'd been chatting on IM. I was 
really puzzled since I got it to work on my Mac and we seemed to be 
typing the same commands (modulo you using Windows).

> I get an Exception..
> "macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An 
> Enterprise
> license
> is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, 
> Sybase and
> Info
> rmix servers."

Yes, I was a little surprised that this was not the error you were 
getting when you originally posted and I expected you'd run into this 
once you'd got the drivers loaded... sorry! :)

> I am running CFMX Enterprise version(6,0,0,48097).  I have the same
> connection working fine in JSP Pages under CFMX.
> Are CFMX Enterprise drivers protected from usage in Java
> Applications(Console/Swing)?

Yes, basically. When you attempt to run the Macromedia driver classes, 
they check that a valid CFMX Enterprise license is present in the 
runtime environment. That means you can invoke them from CF, you can 
invoke them from JSP running on CFMX but you cannot invoke them outside 
the CFMX environment (unless you can figure out how to persuade a 
standalone Java application to 'find' the CFMX license of course... 
which would probably involve violating your CFMX license agreement!).

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.corfield.org/blog/

Introducing Macromedia Contribute. Web publishing for everyone.
Learn more at http://www.macromedia.com/contribute

~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Java in CF (CFMX)

2002-11-24 Thread Kwang Suh
Yes, I have that book as well and it is quite good.

I should also mention that tools like Rational Rose will write a ton of code
for you based on the design you have created - there's a very tight coupling
in Java between design and implementation.


> -Original Message-
> From: Mike Brunt [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 1:31 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX)
>
>
> Dick, I am reading the "Beginning Java Objects" book by Jacquie
> Barker, you
> can see it shown here with a couple of sample chapters (it is a
> good book).
>
> http://developer.java.sun.com/developer/Books/javaprogramming/begobjects/
>
> I find it very helpful.  I also use Fusebox in the CF
> Applications I create.
> Although Fusebox is not 'OO' the thought processes inherent in
> using Fusebox
> have helped me to move away from the path of pure procedural work, hth.
>
> Kind Regards - Mike Brunt, CTO
> Webapper
> Blog http://www.webapper.net
> Web site http://www.webapper.com
> Downey CA Office
> 562.243.6255
> AIM - webappermb
>
> Web Application Specialists
>
>
> -Original Message-
> From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 12:22 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> Thanks, guys!
>
> I am not quite convinced, but almost...
>
> About 6 years ago, I  attempted to learn Java with a "Teach Yourself"
> book.
>
> I actually had some success, but the system was pretty rough (JDK 1.0.2
> on a Mac II), there was no Swing GUI, and most importantly it was
> difficult  develop desktop applications.
>
> I then discovered the web, and Never got back to Java (although I made
> a few half-hearted attempts).
>
> I was hoping that CF could provide a simple bridge to learning Java a
> little-at-a-time-- maybe that's not practical.
>
> I will take your suggestions, read the referenced items and see where
> that leads ms.
>
> Dick
>
> On Sunday, November 24, 2002, at 09:49 AM, Kwang Suh wrote:
>
> > Yeah, what Sean said :)
> >
> > Further to this, I can't stress just how *easy* Java syntax is.  I
> > haven't
> > coded a Java syntax error in about a month - it's getting that simple
> > for
> > me.  It's everything else about Java that's a PITA.  And, there's *no*
> > way
> > you can just learn Java syntax and then know, for instance, what an
> > EJB is
> > or even *why* someone would even bother to create an EJB.
> >
> > I think even Sun realizes just how easy CF is to use - take a look at
> > JSTL!
> > Import the taglib with a namespace of "cf" and you've got something
> > that
> > even looks like CF!
> >
> >> -Original Message-
> >> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
> >> Sent: Sunday, November 24, 2002 10:14 AM
> >> To: CF-Talk
> >> Subject: Re: Java in CF (CFMX)
> >>
> >>
> >> On Sunday, Nov 24, 2002, at 04:48 US/Pacific, Dick Applebaum wrote:
> >>> What do you mean by "design patterns" -- that is a term that I am
> >>> unfamiliar with?
> >>
> >> http://www.google.com/search?hl=en&ie=ISO-8859-1&q=design+patterns
> >>
> >> The Patterns Home Page (http://hillside.net/patterns) is the first
> >> link
> >> and has lots of good information. The "Gang of Four" Design Patterns
> >> book is also highly recommended:
> >>
> >> http://www.corfield.org/index.php?fuseaction=bookstore.main
> >>
> >> Under "Hot" Technical Books.
> >>
> >> I show how some classic design patterns can be used in ColdFusion
> >> here:
> >>
> >> http://www.macromedia.com/desdev/articles/facades.html
> >>
> >> Shlomy Gantz is working on a Design Patterns for ColdFusion book.
> >>
> >>> I have made several attempts to learn Java.
> >>>
> >>> The biggest deterrent, I have found is the long learning curve.
> >>
> >> I think the biggest deterrent you're really finding is the OO thought
> >> processes. Java has very simple *syntax* but the OO nature can make it
> >> hard to learn for folks with only procedural programming as a
> >> reference
> >> point.
> >>
> >>> I was amazed, after several hours of this, I had a complete CF
> >>> program
> >>> (with CF self documentation and Perl comments) that worked.
> >>
> >> Actually, I'm

RE: Java in CF (CFMX)

2002-11-24 Thread Joe Eugene
Dick,
Jsp - the web presentation tier for Java J2EE applications is quite easy.
Perhaps this
might be a good place to start and then maybe progress into Middle Tier.
A Simple page can look like.

<%@ page language="java" import="java.util.*" contentType="text/html"%>



<%
out.println(new Date());
%>


<%=new Date()%>



Link to the Docs(http://java.sun.com/j2se/1.4.1/docs/api/)
You can gradually start learning the classes... and implementation.
This forms are some of good help too (http://forum.java.sun.com/).

Joe

> -Original Message-
> From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 3:22 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> Thanks, guys!
>
> I am not quite convinced, but almost...
>
> About 6 years ago, I  attempted to learn Java with a "Teach Yourself"
> book.
>
> I actually had some success, but the system was pretty rough (JDK 1.0.2
> on a Mac II), there was no Swing GUI, and most importantly it was
> difficult  develop desktop applications.
>
> I then discovered the web, and Never got back to Java (although I made
> a few half-hearted attempts).
>
> I was hoping that CF could provide a simple bridge to learning Java a
> little-at-a-time-- maybe that's not practical.
>
> I will take your suggestions, read the referenced items and see where
> that leads ms.
>
> Dick
>
> On Sunday, November 24, 2002, at 09:49 AM, Kwang Suh wrote:
>
> > Yeah, what Sean said :)
> >
> > Further to this, I can't stress just how *easy* Java syntax is.  I
> > haven't
> > coded a Java syntax error in about a month - it's getting that simple
> > for
> > me.  It's everything else about Java that's a PITA.  And, there's *no*
> > way
> > you can just learn Java syntax and then know, for instance, what an
> > EJB is
> > or even *why* someone would even bother to create an EJB.
> >
> > I think even Sun realizes just how easy CF is to use - take a look at
> > JSTL!
> > Import the taglib with a namespace of "cf" and you've got something
> > that
> > even looks like CF!
> >
> >> -Original Message-
> >> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
> >> Sent: Sunday, November 24, 2002 10:14 AM
> >> To: CF-Talk
> >> Subject: Re: Java in CF (CFMX)
> >>
> >>
> >> On Sunday, Nov 24, 2002, at 04:48 US/Pacific, Dick Applebaum wrote:
> >>> What do you mean by "design patterns" -- that is a term that I am
> >>> unfamiliar with?
> >>
> >> http://www.google.com/search?hl=en&ie=ISO-8859-1&q=design+patterns
> >>
> >> The Patterns Home Page (http://hillside.net/patterns) is the first
> >> link
> >> and has lots of good information. The "Gang of Four" Design Patterns
> >> book is also highly recommended:
> >>
> >> http://www.corfield.org/index.php?fuseaction=bookstore.main
> >>
> >> Under "Hot" Technical Books.
> >>
> >> I show how some classic design patterns can be used in ColdFusion
> >> here:
> >>
> >> http://www.macromedia.com/desdev/articles/facades.html
> >>
> >> Shlomy Gantz is working on a Design Patterns for ColdFusion book.
> >>
> >>> I have made several attempts to learn Java.
> >>>
> >>> The biggest deterrent, I have found is the long learning curve.
> >>
> >> I think the biggest deterrent you're really finding is the OO thought
> >> processes. Java has very simple *syntax* but the OO nature can make it
> >> hard to learn for folks with only procedural programming as a
> >> reference
> >> point.
> >>
> >>> I was amazed, after several hours of this, I had a complete CF
> >>> program
> >>> (with CF self documentation and Perl comments) that worked.
> >>
> >> Actually, I'm not amazed - this is one of ColdFusion's biggest selling
> >> points: that it is very easy to learn and it's very easy to get your
> >> first CF program running.
> >>
> >>> But, I was able to learn CF, well enough to be comfortable with it,
> >>> in
> >>> a few days.
> >>
> >> Yes, and I would expect most of us here would say the same - CF has
> >> certainly been the easiest language I've ever learned.
> >>
> >>> If CF had inline Java code, it would allow someone learning Java to
> >>> take a segment 

RE: Java in CF (CFMX) - MM Drivers

2002-11-24 Thread Joe Eugene
I got this partially resolved... Sean helped out.. Thanks Sean.
It was a classpath problem. However after i load the
drivers(macromedia.jdbc.MacromediaDriver) which is in the "lib" directory
of your installation(eg. "G:\CFusionMX\lib\macromedia_drivers.jar") and give
it the
connection url..
Connection con =
DriverManager.getConnection("jdbc:macromedia:sqlserver://SqlServerName:1433"
,"userid","Pwd");

I get an Exception..
"macromedia.jdbc.MacromediaDriver$InvalidLicenseException: An Enterprise
license
is needed to use the Macromedia JDBC Drivers on the DB2, Oracle, Sybase and
Info
rmix servers."

I am running CFMX Enterprise version(6,0,0,48097).  I have the same
connection working
fine in JSP Pages under CFMX.
Are CFMX Enterprise drivers protected from usage in Java
Applications(Console/Swing)?
Anybody from MM Product Team can explain this?

Joe


> -Original Message-
> From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 4:11 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX) - MM Drivers
>
>
> I can use the CFMX MM DB drivers in a JSP page..No problem.
> however.. i need
> to use it in a Java Application..tried to load the Driver..
> Class.forName("macromedia.jdbc.MacromediaDriver")
> Keep getting ClassNotFound Error..
> I put the macromedia_driver.jar in the class path.. still not
> loading.. Do i
> need to import something? What am i missing?
>
> Joe
>
> PS:Old Thread.
> I am just catching up on this Thread..
> Isnt the idea to comply with J2EE Architecture?
> Model-View-Controller model
> etc.. Why would some want to write in-line Java..?
> Anyways...
>
>
>
> On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa
> <[EMAIL PROTECTED]> wrote:
>
> > The decision to disallow inline java code was
> > definitely not a cut and dry one. One reason
> > was definitely to enforce a cleaner separation
> > of syntax; the other, which I hadn't mentioned,
> > was to remove some additional complexity from
> > the parsing/compiling process. Because of the
> > differences between typing and syntax, parsing
> > a page that had both Java and CFML/CFScript
> > would have been a bear.
> >
> > Phil
> >
> > -Original Message-
> > From: Jon Hall [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 22, 2002 2:37 AM
> > To: CF-Talk
> > Subject: Re: Java in CF (CFMX)
> >
> >
> > Thursday, November 21, 2002, 11:54:58 PM, you
> > wrote:
> >
> > MT> Jon Hall wrote:
> > >> The case for allowing inline Java is simple,
> > CF developers can use
> > >> Java without having to know everything about
> > Java. Methods and
> > >> classes are easy to get. Compiling,
> > classpath's, and understanding
> > >> the lengths Java goes to, to abstract
> > everything, etc. is not.
> >
> > MT> Knowing just a little about a language as
> > deep/complex as Java can
> > MT> be "dangerous" in a number of ways...
> >
> > MT> It's very easy to run into errors in java
> > if you don't understand
> > MT> how it all works (ex. trying to instantiate
> > an interface).  One of
> > MT> the overriding strengths of CF is that it
> > offers a great deal of
> > MT> power in an easy to use/learn style.  This
> > sort of thing, IMO, goes
> > MT> against that strength.
> >
> > MT> Mixing CFML and Java can very quickly lead
> > to code that is horribly
> > MT> organized and difficult to follow/maintain.
> >  Obviously, anal coders
> > MT> will keep things nice and neat, but others
> > will be mashing CFML,
> > MT> CFScript, Java, and SQL together
> > haphazardly.
> >
> > MT> Then there's the compatibility thing...
> > Java lists != CF lists.
> > MT> Java arrays != CF arrays.  Etc.  Again,
> > this can lead to confusion
> > MT> and cause all kinds of errors.
> >
> > I say let the coders (and the pm's who have a
> > clue ) who write the applications make the
> > decision on what works in their application.
> > I'm not trying to be facetious, but be brutally
> > honest, I couldn't care less that anyone else
> > thinks my hypothetical hybrid Java/CF code is
> > unorganized or difficult to maintain, as long
> > as those that it matters to, like my boss and
> > clients don't care either. So I don't see how
> > the fear of some overwhelming horde of
> > organized code existing somewhere out there,
> > just over the horiz

RE: Java in CF (CFMX)

2002-11-24 Thread Mike Brunt
Dick, I am reading the "Beginning Java Objects" book by Jacquie Barker, you
can see it shown here with a couple of sample chapters (it is a good book).

http://developer.java.sun.com/developer/Books/javaprogramming/begobjects/

I find it very helpful.  I also use Fusebox in the CF Applications I create.
Although Fusebox is not 'OO' the thought processes inherent in using Fusebox
have helped me to move away from the path of pure procedural work, hth.

Kind Regards - Mike Brunt, CTO
Webapper
Blog http://www.webapper.net
Web site http://www.webapper.com
Downey CA Office
562.243.6255
AIM - webappermb

Web Application Specialists


-Original Message-
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 24, 2002 12:22 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Thanks, guys!

I am not quite convinced, but almost...

About 6 years ago, I  attempted to learn Java with a "Teach Yourself"
book.

I actually had some success, but the system was pretty rough (JDK 1.0.2
on a Mac II), there was no Swing GUI, and most importantly it was
difficult  develop desktop applications.

I then discovered the web, and Never got back to Java (although I made
a few half-hearted attempts).

I was hoping that CF could provide a simple bridge to learning Java a
little-at-a-time-- maybe that's not practical.

I will take your suggestions, read the referenced items and see where
that leads ms.

Dick

On Sunday, November 24, 2002, at 09:49 AM, Kwang Suh wrote:

> Yeah, what Sean said :)
>
> Further to this, I can't stress just how *easy* Java syntax is.  I
> haven't
> coded a Java syntax error in about a month - it's getting that simple
> for
> me.  It's everything else about Java that's a PITA.  And, there's *no*
> way
> you can just learn Java syntax and then know, for instance, what an
> EJB is
> or even *why* someone would even bother to create an EJB.
>
> I think even Sun realizes just how easy CF is to use - take a look at
> JSTL!
> Import the taglib with a namespace of "cf" and you've got something
> that
> even looks like CF!
>
>> -Original Message-----
>> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
>> Sent: Sunday, November 24, 2002 10:14 AM
>> To: CF-Talk
>> Subject: Re: Java in CF (CFMX)
>>
>>
>> On Sunday, Nov 24, 2002, at 04:48 US/Pacific, Dick Applebaum wrote:
>>> What do you mean by "design patterns" -- that is a term that I am
>>> unfamiliar with?
>>
>> http://www.google.com/search?hl=en&ie=ISO-8859-1&q=design+patterns
>>
>> The Patterns Home Page (http://hillside.net/patterns) is the first
>> link
>> and has lots of good information. The "Gang of Four" Design Patterns
>> book is also highly recommended:
>>
>> http://www.corfield.org/index.php?fuseaction=bookstore.main
>>
>> Under "Hot" Technical Books.
>>
>> I show how some classic design patterns can be used in ColdFusion
>> here:
>>
>> http://www.macromedia.com/desdev/articles/facades.html
>>
>> Shlomy Gantz is working on a Design Patterns for ColdFusion book.
>>
>>> I have made several attempts to learn Java.
>>>
>>> The biggest deterrent, I have found is the long learning curve.
>>
>> I think the biggest deterrent you're really finding is the OO thought
>> processes. Java has very simple *syntax* but the OO nature can make it
>> hard to learn for folks with only procedural programming as a
>> reference
>> point.
>>
>>> I was amazed, after several hours of this, I had a complete CF
>>> program
>>> (with CF self documentation and Perl comments) that worked.
>>
>> Actually, I'm not amazed - this is one of ColdFusion's biggest selling
>> points: that it is very easy to learn and it's very easy to get your
>> first CF program running.
>>
>>> But, I was able to learn CF, well enough to be comfortable with it,
>>> in
>>> a few days.
>>
>> Yes, and I would expect most of us here would say the same - CF has
>> certainly been the easiest language I've ever learned.
>>
>>> If CF had inline Java code, it would allow someone learning Java to
>>> take a segment of a working CF program and recode that in Java --
>>> without the need to "learn everything about Java", including its
>>> theory, structure, syntax documentation, etc., "all at once"
>>
>> I don't think that would be a good idea. People would not 'learn Java'
>> that way, merely learn a different syntax for something they were
>> already doing. W

Re: Java in CF (CFMX)

2002-11-24 Thread Dick Applebaum
Thanks, guys!

I am not quite convinced, but almost...

About 6 years ago, I  attempted to learn Java with a "Teach Yourself"  
book.

I actually had some success, but the system was pretty rough (JDK 1.0.2  
on a Mac II), there was no Swing GUI, and most importantly it was  
difficult  develop desktop applications.

I then discovered the web, and Never got back to Java (although I made  
a few half-hearted attempts).

I was hoping that CF could provide a simple bridge to learning Java a  
little-at-a-time-- maybe that's not practical.

I will take your suggestions, read the referenced items and see where  
that leads ms.

Dick

On Sunday, November 24, 2002, at 09:49 AM, Kwang Suh wrote:

> Yeah, what Sean said :)
>
> Further to this, I can't stress just how *easy* Java syntax is.  I  
> haven't
> coded a Java syntax error in about a month - it's getting that simple  
> for
> me.  It's everything else about Java that's a PITA.  And, there's *no*  
> way
> you can just learn Java syntax and then know, for instance, what an  
> EJB is
> or even *why* someone would even bother to create an EJB.
>
> I think even Sun realizes just how easy CF is to use - take a look at  
> JSTL!
> Import the taglib with a namespace of "cf" and you've got something  
> that
> even looks like CF!
>
>> -Original Message-
>> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
>> Sent: Sunday, November 24, 2002 10:14 AM
>> To: CF-Talk
>> Subject: Re: Java in CF (CFMX)
>>
>>
>> On Sunday, Nov 24, 2002, at 04:48 US/Pacific, Dick Applebaum wrote:
>>> What do you mean by "design patterns" -- that is a term that I am
>>> unfamiliar with?
>>
>> http://www.google.com/search?hl=en&ie=ISO-8859-1&q=design+patterns
>>
>> The Patterns Home Page (http://hillside.net/patterns) is the first  
>> link
>> and has lots of good information. The "Gang of Four" Design Patterns
>> book is also highly recommended:
>>
>> http://www.corfield.org/index.php?fuseaction=bookstore.main
>>
>> Under "Hot" Technical Books.
>>
>> I show how some classic design patterns can be used in ColdFusion  
>> here:
>>
>> http://www.macromedia.com/desdev/articles/facades.html
>>
>> Shlomy Gantz is working on a Design Patterns for ColdFusion book.
>>
>>> I have made several attempts to learn Java.
>>>
>>> The biggest deterrent, I have found is the long learning curve.
>>
>> I think the biggest deterrent you're really finding is the OO thought
>> processes. Java has very simple *syntax* but the OO nature can make it
>> hard to learn for folks with only procedural programming as a  
>> reference
>> point.
>>
>>> I was amazed, after several hours of this, I had a complete CF  
>>> program
>>> (with CF self documentation and Perl comments) that worked.
>>
>> Actually, I'm not amazed - this is one of ColdFusion's biggest selling
>> points: that it is very easy to learn and it's very easy to get your
>> first CF program running.
>>
>>> But, I was able to learn CF, well enough to be comfortable with it,  
>>> in
>>> a few days.
>>
>> Yes, and I would expect most of us here would say the same - CF has
>> certainly been the easiest language I've ever learned.
>>
>>> If CF had inline Java code, it would allow someone learning Java to
>>> take a segment of a working CF program and recode that in Java --
>>> without the need to "learn everything about Java", including its
>>> theory, structure, syntax documentation, etc., "all at once"
>>
>> I don't think that would be a good idea. People would not 'learn Java'
>> that way, merely learn a different syntax for something they were
>> already doing. What's more, they'd have to learn all the complexities
>> of how to access CF variables etc from Java in order to translate just
>> a small part of their code. Have you looked at the Java code that CFMX
>> generates? It's quite complex - because CF is a much higher-level
>> language that does a lot of things for you.
>>
>>> At some point, you would be proficient enough to write entire  
>>> programs
>>> (or major portions) as Java servlets, applets, beans JSPs or whatever
>>
>> I very much doubt that. Sorry. The whole structure of J2EE  
>> applications
>> is a major learning exercise on its own that has no equivalent in CF
>> that you can 'learn by example'

RE: Java in CF (CFMX)

2002-11-24 Thread Kwang Suh
Yeah, what Sean said :)

Further to this, I can't stress just how *easy* Java syntax is.  I haven't
coded a Java syntax error in about a month - it's getting that simple for
me.  It's everything else about Java that's a PITA.  And, there's *no* way
you can just learn Java syntax and then know, for instance, what an EJB is
or even *why* someone would even bother to create an EJB.

I think even Sun realizes just how easy CF is to use - take a look at JSTL!
Import the taglib with a namespace of "cf" and you've got something that
even looks like CF!

> -Original Message-
> From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 24, 2002 10:14 AM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> On Sunday, Nov 24, 2002, at 04:48 US/Pacific, Dick Applebaum wrote:
> > What do you mean by "design patterns" -- that is a term that I am
> > unfamiliar with?
>
> http://www.google.com/search?hl=en&ie=ISO-8859-1&q=design+patterns
>
> The Patterns Home Page (http://hillside.net/patterns) is the first link
> and has lots of good information. The "Gang of Four" Design Patterns
> book is also highly recommended:
>
> http://www.corfield.org/index.php?fuseaction=bookstore.main
>
> Under "Hot" Technical Books.
>
> I show how some classic design patterns can be used in ColdFusion here:
>
> http://www.macromedia.com/desdev/articles/facades.html
>
> Shlomy Gantz is working on a Design Patterns for ColdFusion book.
>
> > I have made several attempts to learn Java.
> >
> > The biggest deterrent, I have found is the long learning curve.
>
> I think the biggest deterrent you're really finding is the OO thought
> processes. Java has very simple *syntax* but the OO nature can make it
> hard to learn for folks with only procedural programming as a reference
> point.
>
> > I was amazed, after several hours of this, I had a complete CF program
> > (with CF self documentation and Perl comments) that worked.
>
> Actually, I'm not amazed - this is one of ColdFusion's biggest selling
> points: that it is very easy to learn and it's very easy to get your
> first CF program running.
>
> > But, I was able to learn CF, well enough to be comfortable with it, in
> > a few days.
>
> Yes, and I would expect most of us here would say the same - CF has
> certainly been the easiest language I've ever learned.
>
> > If CF had inline Java code, it would allow someone learning Java to
> > take a segment of a working CF program and recode that in Java --
> > without the need to "learn everything about Java", including its
> > theory, structure, syntax documentation, etc., "all at once"
>
> I don't think that would be a good idea. People would not 'learn Java'
> that way, merely learn a different syntax for something they were
> already doing. What's more, they'd have to learn all the complexities
> of how to access CF variables etc from Java in order to translate just
> a small part of their code. Have you looked at the Java code that CFMX
> generates? It's quite complex - because CF is a much higher-level
> language that does a lot of things for you.
>
> > At some point, you would be proficient enough to write entire programs
> > (or major portions) as Java servlets, applets, beans JSPs or whatever
>
> I very much doubt that. Sorry. The whole structure of J2EE applications
> is a major learning exercise on its own that has no equivalent in CF
> that you can 'learn by example' from.
>
> > (I don't know what term applies here, and there are so many of them)
>
> That's exactly my point: nothing in CF can actually let you learn these
> things!
>
> Sean A Corfield -- Director, Architecture
> Web Technology Group -- Macromedia, Inc.
> tel: (415) 252-2287 -- cell: (415) 717-8473
> aim: seancorfield -- http://www.macromedia.com
> An Architect's View -- http://www.corfield.org/blog/
>
> Introducing Macromedia Contribute. Web publishing for everyone.
> Learn more at http://www.macromedia.com/contribute
>
>
> 
~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Java in CF (CFMX)

2002-11-24 Thread Sean A Corfield
On Sunday, Nov 24, 2002, at 04:48 US/Pacific, Dick Applebaum wrote:
> What do you mean by "design patterns" -- that is a term that I am
> unfamiliar with?

http://www.google.com/search?hl=en&ie=ISO-8859-1&q=design+patterns

The Patterns Home Page (http://hillside.net/patterns) is the first link 
and has lots of good information. The "Gang of Four" Design Patterns 
book is also highly recommended:

http://www.corfield.org/index.php?fuseaction=bookstore.main

Under "Hot" Technical Books.

I show how some classic design patterns can be used in ColdFusion here:

http://www.macromedia.com/desdev/articles/facades.html

Shlomy Gantz is working on a Design Patterns for ColdFusion book.

> I have made several attempts to learn Java.
>
> The biggest deterrent, I have found is the long learning curve.

I think the biggest deterrent you're really finding is the OO thought 
processes. Java has very simple *syntax* but the OO nature can make it 
hard to learn for folks with only procedural programming as a reference 
point.

> I was amazed, after several hours of this, I had a complete CF program
> (with CF self documentation and Perl comments) that worked.

Actually, I'm not amazed - this is one of ColdFusion's biggest selling 
points: that it is very easy to learn and it's very easy to get your 
first CF program running.

> But, I was able to learn CF, well enough to be comfortable with it, in
> a few days.

Yes, and I would expect most of us here would say the same - CF has 
certainly been the easiest language I've ever learned.

> If CF had inline Java code, it would allow someone learning Java to
> take a segment of a working CF program and recode that in Java --
> without the need to "learn everything about Java", including its
> theory, structure, syntax documentation, etc., "all at once"

I don't think that would be a good idea. People would not 'learn Java' 
that way, merely learn a different syntax for something they were 
already doing. What's more, they'd have to learn all the complexities 
of how to access CF variables etc from Java in order to translate just 
a small part of their code. Have you looked at the Java code that CFMX 
generates? It's quite complex - because CF is a much higher-level 
language that does a lot of things for you.

> At some point, you would be proficient enough to write entire programs
> (or major portions) as Java servlets, applets, beans JSPs or whatever

I very much doubt that. Sorry. The whole structure of J2EE applications 
is a major learning exercise on its own that has no equivalent in CF 
that you can 'learn by example' from.

> (I don't know what term applies here, and there are so many of them)

That's exactly my point: nothing in CF can actually let you learn these 
things!

Sean A Corfield -- Director, Architecture
Web Technology Group -- Macromedia, Inc.
tel: (415) 252-2287 -- cell: (415) 717-8473
aim: seancorfield -- http://www.macromedia.com
An Architect's View -- http://www.corfield.org/blog/

Introducing Macromedia Contribute. Web publishing for everyone.
Learn more at http://www.macromedia.com/contribute


~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: Java in CF (CFMX)

2002-11-24 Thread Dave Carabetta
> The biggest deterrent, I have found is the long learning curve.

Sure, but I don't think the learning curve isn't as much the syntax as it is
the conceptual differences between procedural and object-oriented
programming. Time and time again I have seen the difference in thought
processes be the "brick wall" that most people run in to, including myself
for the longest time; not necessarily the syntax.

> After this rather long preamble, here's my point:
>
> If CF had inline Java code, it would allow someone learning Java to
> take a segment of a working CF program and recode that in Java --
> without the need to "learn everything about Java", including its
> theory, structure, syntax documentation, etc., "all at once"
>
> You would have the familiar CF infrastructure supporting your "Java
> segment".
>
> You would have the advantage of starting with familiar, working code --
> and tasked with developing the working Java equivalent.
>
> You likely would comment out the CF code,  and replace it with the Java
> -- you'd have a side-by-side comparison to ponder.
>
> You would likely begin with infrequently-used segments of programs
> where "less than optimum Java programming" would not be a severe
> penalty.
>
> As you applied this technique, you would have more and more questions
> about Java and you would find the answers (of necessity) and your
> search would reveal more of the Java approach.

Dick, I don't necessarily disagree with what you're suggesting, in concept.
However, I just think that it's one thing to have Perl and CF side-by-side
(procedural vs. procedural) for learning purposes, but it's an entirely
different thing to have Java and CF side-by-side (OO vs. procedural) in the
manner you propose. It's two completely different thought processes. While I
understand this isn't a feature that everybody would use, I would personally
like to see MM focus on encapsulating some more Java features into
easy-to-use black-box CF tags rather than having to code my own Java. I
would also like to see them focus on cleaning up the underlying code/engine
that makes CFMX work to make any performance improvements they can; not
complicate the engine by allowing for new in-line Java. I don't have any
specific gripes about the performance, per se, however I'm sure there are
areas that their engineers would like to go back and tweak. After all, this
was a version 1.0 release, in a matter of speaking.

> Finally, you should ask yourself why a company like IBM wants to
> teach/market ColdFusion along with its enterprise Java offerings -- I
> would speculate that the simple answer is: "because it makes sense --
> Java with CF offers better productivity to a broader audience, than
> Java without CF." -- and  that translates to $.

I think IBM wants to do this because the time-to-market using CF is
drastically smaller than Java. Again, as I did in a another thread, I point
to a ComputerWorld article I read where the major Java vendors are exploring
ways to implement a CFMX-type approach of encapsulating the Java syntax in
easy-to-use tags. The corporate adoption of Java hasn't been as high as
these vendors had foreseen, and with the advent of .NET, they need to keep
ahead of that camp. I think that MM should keep their current focus on using
this approach rather than offering the in-line Java feature.

Regards,
Dave.
~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: Java in CF (CFMX)

2002-11-24 Thread Dick Applebaum
On Sunday, November 24, 2002, at 12:07 AM, Kwang Suh wrote:

>> 2) Where CFMX can act as a gentle introduction to Java -- certainly
>> this hybrid code would  not be the best, but it would allow Java
>> neophytes, like myself, to learn Java gracefully, without having to
>> learn all the rules first.  -- There is something about the fact that
>> we can learn our native language, better, by the age of 5, than a
>> person with 4 years of college courses on that language -- simple
>> introduction, constant use, familiarity-- a lot of us "Learn by 
>> Doing!"
>
> Well, I don't really agree with this.  You'd be better off learning 
> design
> patterns before even touching Java as a programming language.  There's
> _much_ more to "Java" than just writing code.  CF doesn't even come 
> close to
> what Java offers.
>

What do you mean by "design patterns" -- that is a term that I am 
unfamiliar with?

Over the years, I have learned many programming languages -- and taught 
a few.

I have made several attempts to learn Java.

The biggest deterrent, I have found is the long learning curve.

The Java advantages, implied by  your statements (and by Java's 
popularity), likely are real.

But these advantages quickly get blurred in the swirl of definitions 
and rules.

I prefer to learn a language a little at a time, hopefully using it in 
actual productive code.

I learned CF by reading Ben Forta's CFWACK second edition and trying 
the examples on a remote host (I don't own a windows PC). I then wrote 
some small, infrequently-used, utility routines.  Infrequently-used is 
key here -- it was not necessary that these routines be efficient or 
well-written, just that they work.

My first major program, was to take a shopping cart I had written in 
Perl (actually a Perl subset), and to convert it to CF.

I made a copy of the Perl program, then  would <--- ---> comment out a 
section of Perl code and replace it with the equivalent CF code.  Where 
I was unsure, I would make a separate program out of the CF segment to 
test it.

I was amazed, after several hours of this, I had a complete CF program 
(with CF self documentation and Perl comments) that worked.

Was it good CF code -- not even close, but it worked.

Was it more efficient than the Perl equivalent -- it may well have 
been, because the powerful CF tags and functions were likely more 
efficient than the primitive Perl statements needed to accomplish the 
same thing.

It certainly was easier to code, and easier to read the code.

As a practical by-product of this method of learning CF, I was forced, 
by necessity, to learn the CF terminology and documentation so I could 
find (and use) the necessary CF tags and functions.

But, I was able to learn CF, well enough to be comfortable with it, in 
a few days.

I removed the Perl comments/code and had a working CF shopping cart 
that I could refine over time.  That was 1998 -- versions of that cart 
were in use until late last year.

After this rather long preamble, here's my point:

If CF had inline Java code, it would allow someone learning Java to 
take a segment of a working CF program and recode that in Java -- 
without the need to "learn everything about Java", including its 
theory, structure, syntax documentation, etc., "all at once"

You would have the familiar CF infrastructure supporting your "Java 
segment".

You would have the advantage of starting with familiar, working code -- 
and tasked with developing the working Java equivalent.

You likely would comment out the CF code,  and replace it with the Java 
-- you'd have a side-by-side comparison to ponder.

You would likely begin with infrequently-used segments of programs 
where "less than optimum Java programming" would not be a severe 
penalty.

As you applied this technique, you would have more and more questions  
about Java and you would find the answers (of necessity) and your 
search would reveal more of the Java approach.

At some point, you would be proficient enough to write entire programs 
(or major portions) as Java servlets, applets, beans JSPs or whatever 
(I don't know what term applies here, and there are so many of them) -- 
but you would learn what you needed to know, when you needed to learn 
it.

So, CF would help you learn Java, and to, immediately, take advantage 
of that knowledge by putting the Java code segments into production.

Would they be "perfect" Java programs, of course not -- but then, the 
"perfect Java program" has not been written (nor, will it be),

Would you recode all of your programs (or tiers of an application) in 
Java -- likely not -- there are some things that CF does better than 
Java.

But, with inline Java, CF would allow the developer an easy way to 
learn (and use) Java and how to interact with the Java infrastructure.  
So equipped, the developer would be better prepared to choose among 
Java ,  CF  or both, for application development.

Finally, you should ask yourself why a company like IBM wants to 
t

RE: Java in CF (CFMX)

2002-11-24 Thread Kwang Suh
> 2) Where CFMX can act as a gentle introduction to Java -- certainly
> this hybrid code would  not be the best, but it would allow Java
> neophytes, like myself, to learn Java gracefully, without having to
> learn all the rules first.  -- There is something about the fact that
> we can learn our native language, better, by the age of 5, than a
> person with 4 years of college courses on that language -- simple
> introduction, constant use, familiarity-- a lot of us "Learn by Doing!"

Well, I don't really agree with this.  You'd be better off learning design
patterns before even touching Java as a programming language.  There's
_much_ more to "Java" than just writing code.  CF doesn't even come close to
what Java offers.


~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Java in CF (CFMX)

2002-11-23 Thread Dick Applebaum
I am really late to this thread -- been doin' other interesting stuff.

There are one (or two, or forty) reasons that have not been mentioned,  
that make inline Java code a benefit.

1) Where needed in an app, you can get strong typing and nulls -- say  
you want to communicate with a JDBC driver and retrieve Table/Column  
attributes from a db -- most JDBC drivers provide this info, but you  
can't get at it directly form CMFX.

2) Where CFMX can act as a gentle introduction to Java -- certainly  
this hybrid code would  not be the best, but it would allow Java  
neophytes, like myself, to learn Java gracefully, without having to  
learn all the rules first.  -- There is something about the fact that  
we can learn our native language, better, by the age of 5, than a  
person with 4 years of college courses on that language -- simple  
introduction, constant use, familiarity-- a lot of us "Learn by Doing!"

3) This would put /keep CF at the head of the pack -- one more  
significant reason to choose CF over the competition -- EasyJava --  
choose the language/implementation that makes the most sense for an  
application and/or a tier.

Dick

P.S.  while I am asking for things, I'd like to see a ...  
tag -- does the same thing (and does not deprecate the  tag--  
just a lot easier to type (and pretty self-documenting, and makes a lot  
more sense than that <%= crap!)




On Friday, November 22, 2002, at 08:56 AM, Rob Rohan wrote:

> I understand your decision but I have a couple more things to add,  
> then I'll
> shut up.
>
> 1) To me CFSCRIPT is to Cold Fusion 5 what CFJAVA would've been to  
> CFMX.
>
> 2) I also don't think people would just use a cfjava block to just use  
> it.
> There would have to be a need. (I.E. a custom java tag that doesn't  
> need to
> be installed)
>
> 3) I would like to play with inner classes / threads on a page and  
> casting
> to thing (like a CF list to a hashtable - don't even know if that would
> work, but you get the idea).
>
> 4) There could be performance gains beyond code execution. For  
> example, when
> you make a cfm page into a class it adds a bunch of \r\t which is  
> necessary
> in almost all cases (but certain blocks could be controlled)
>
> Thanks for listening Phil and all you wacky MM guys
>
> Rob
>
> Certified Organic
> "When you put things in quotes, people think someone actually said it."
> http://treebeard.sourceforge.net
> http://ruinworld.sourceforge.net
> Scientia Est Potentia
>
> -Original Message-
> From: Phil Costa [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 6:09 AM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX)
>
>
> The decision to disallow inline java code was definitely not a cut and  
> dry
> one. One reason was definitely to enforce a cleaner separation of  
> syntax;
> the other, which I hadn't mentioned, was to remove some additional
> complexity from the parsing/compiling process. Because of the  
> differences
> between typing and syntax, parsing a page that had both Java and
> CFML/CFScript would have been a bear.
>
> Phil
>
> -Original Message-
> From: Jon Hall [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 22, 2002 2:37 AM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> Thursday, November 21, 2002, 11:54:58 PM, you wrote:
>
> MT> Jon Hall wrote:
>>> The case for allowing inline Java is simple, CF developers can use
>>> Java without having to know everything about Java. Methods and
>>> classes are easy to get. Compiling, classpath's, and understanding
>>> the lengths Java goes to, to abstract everything, etc. is not.
>
> MT> Knowing just a little about a language as deep/complex as Java can
> MT> be "dangerous" in a number of ways...
>
> MT> It's very easy to run into errors in java if you don't understand
> MT> how it all works (ex. trying to instantiate an interface).  One of
> MT> the overriding strengths of CF is that it offers a great deal of
> MT> power in an easy to use/learn style.  This sort of thing, IMO, goes
> MT> against that strength.
>
> MT> Mixing CFML and Java can very quickly lead to code that is horribly
> MT> organized and difficult to follow/maintain.  Obviously, anal coders
> MT> will keep things nice and neat, but others will be mashing CFML,
> MT> CFScript, Java, and SQL together haphazardly.
>
> MT> Then there's the compatibility thing... Java lists != CF lists.
> MT> Java arrays != CF arrays.  Etc.  Again, this can lead to confusion
> MT> and cause all kinds of errors.
>
> I say let the coders (and the pm's who have a clue ) who wr

RE: Java in CF (CFMX) - MM Drivers

2002-11-22 Thread Joe Eugene
I can use the CFMX MM DB drivers in a JSP page..No problem. however.. i need
to use it in a Java Application..tried to load the Driver..
Class.forName("macromedia.jdbc.MacromediaDriver")
Keep getting ClassNotFound Error..
I put the macromedia_driver.jar in the class path.. still not loading.. Do i
need to import something? What am i missing?

Joe

PS:Old Thread.
I am just catching up on this Thread..
Isnt the idea to comply with J2EE Architecture? Model-View-Controller model
etc.. Why would some want to write in-line Java..?
Anyways... 



On Fri, 22 Nov 2002 09:09:16 -0500 Phil Costa <[EMAIL PROTECTED]> wrote:

> The decision to disallow inline java code was
> definitely not a cut and dry one. One reason
> was definitely to enforce a cleaner separation
> of syntax; the other, which I hadn't mentioned,
> was to remove some additional complexity from
> the parsing/compiling process. Because of the
> differences between typing and syntax, parsing
> a page that had both Java and CFML/CFScript
> would have been a bear.
> 
> Phil
> 
> -Original Message-
> From: Jon Hall [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, November 22, 2002 2:37 AM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
> 
> 
> Thursday, November 21, 2002, 11:54:58 PM, you
> wrote:
> 
> MT> Jon Hall wrote:
> >> The case for allowing inline Java is simple,
> CF developers can use 
> >> Java without having to know everything about
> Java. Methods and 
> >> classes are easy to get. Compiling,
> classpath's, and understanding 
> >> the lengths Java goes to, to abstract
> everything, etc. is not.
> 
> MT> Knowing just a little about a language as
> deep/complex as Java can 
> MT> be "dangerous" in a number of ways...
> 
> MT> It's very easy to run into errors in java
> if you don't understand 
> MT> how it all works (ex. trying to instantiate
> an interface).  One of 
> MT> the overriding strengths of CF is that it
> offers a great deal of 
> MT> power in an easy to use/learn style.  This
> sort of thing, IMO, goes 
> MT> against that strength.
> 
> MT> Mixing CFML and Java can very quickly lead
> to code that is horribly 
> MT> organized and difficult to follow/maintain.
>  Obviously, anal coders 
> MT> will keep things nice and neat, but others
> will be mashing CFML, 
> MT> CFScript, Java, and SQL together
> haphazardly.
> 
> MT> Then there's the compatibility thing...
> Java lists != CF lists.  
> MT> Java arrays != CF arrays.  Etc.  Again,
> this can lead to confusion 
> MT> and cause all kinds of errors.
> 
> I say let the coders (and the pm's who have a
> clue ) who write the applications make the
> decision on what works in their application.
> I'm not trying to be facetious, but be brutally
> honest, I couldn't care less that anyone else
> thinks my hypothetical hybrid Java/CF code is
> unorganized or difficult to maintain, as long
> as those that it matters to, like my boss and
> clients don't care either. So I don't see how
> the fear of some overwhelming horde of
> organized code existing somewhere out there,
> just over the horizon, really is a valid
> argument against allowing inline Java within CF
> templates.
> 
> >> CFQuery is the perfect example here. If CF
> gives developers the power 
> >> to do whatever they want within cfquery
> tags, then why not java 
> >> within cfjava tags? Seems's inconsistent to
> me. Especially since 
> >> cfquery probably the biggest strength of the
> CF language.
> 
> MT> SQL and CFML serve 2 different purposes,
> database manipulation and 
> MT> application logic.  Java and CFML serve the
> same purpose, 
> MT> application logic.
> 
> That's not entirely true. TSQL and probably
> PLSQL work fine within cfquery tags. Terrible
> as it may sound, if I want to loop over a
> cfquery that manipulates a cursor I can.
> 
> I'm not saying there are not valid reasons for
> disallowing inline Java, I'm just saying that
> limiting the flexibility of CF just because of
> the possibility that nasty code may come into
> existence is not a good enough reason in my
> opinion, but it's the only one that's been put
> forward by both you and Phil. I also don't want
> to start yet another debate about what's good
> and bad for CF, but as you said earlier, I am
> curious as well. Though I suspect it's similar
> reasoning behind not allowing cfscript to call
> tags in the past (not that I ever got the
> reasoning behind that either).
> 
> -- 
> jon
> mailto:[EMAIL PROTECTED]
> 
> 
> 
~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Java in CF (CFMX)

2002-11-22 Thread Rob Rohan
I understand your decision but I have a couple more things to add, then I'll
shut up.

1) To me CFSCRIPT is to Cold Fusion 5 what CFJAVA would've been to CFMX.

2) I also don't think people would just use a cfjava block to just use it.
There would have to be a need. (I.E. a custom java tag that doesn't need to
be installed)

3) I would like to play with inner classes / threads on a page and casting
to thing (like a CF list to a hashtable - don't even know if that would
work, but you get the idea).

4) There could be performance gains beyond code execution. For example, when
you make a cfm page into a class it adds a bunch of \r\t which is necessary
in almost all cases (but certain blocks could be controlled)

Thanks for listening Phil and all you wacky MM guys

Rob

Certified Organic
"When you put things in quotes, people think someone actually said it."
http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Phil Costa [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 22, 2002 6:09 AM
To: CF-Talk
Subject: RE: Java in CF (CFMX)


The decision to disallow inline java code was definitely not a cut and dry
one. One reason was definitely to enforce a cleaner separation of syntax;
the other, which I hadn't mentioned, was to remove some additional
complexity from the parsing/compiling process. Because of the differences
between typing and syntax, parsing a page that had both Java and
CFML/CFScript would have been a bear.

Phil

-Original Message-
From: Jon Hall [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 22, 2002 2:37 AM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Thursday, November 21, 2002, 11:54:58 PM, you wrote:

MT> Jon Hall wrote:
>> The case for allowing inline Java is simple, CF developers can use
>> Java without having to know everything about Java. Methods and
>> classes are easy to get. Compiling, classpath's, and understanding
>> the lengths Java goes to, to abstract everything, etc. is not.

MT> Knowing just a little about a language as deep/complex as Java can
MT> be "dangerous" in a number of ways...

MT> It's very easy to run into errors in java if you don't understand
MT> how it all works (ex. trying to instantiate an interface).  One of
MT> the overriding strengths of CF is that it offers a great deal of
MT> power in an easy to use/learn style.  This sort of thing, IMO, goes
MT> against that strength.

MT> Mixing CFML and Java can very quickly lead to code that is horribly
MT> organized and difficult to follow/maintain.  Obviously, anal coders
MT> will keep things nice and neat, but others will be mashing CFML,
MT> CFScript, Java, and SQL together haphazardly.

MT> Then there's the compatibility thing... Java lists != CF lists.
MT> Java arrays != CF arrays.  Etc.  Again, this can lead to confusion
MT> and cause all kinds of errors.

I say let the coders (and the pm's who have a clue ) who write the
applications make the decision on what works in their application. I'm not
trying to be facetious, but be brutally honest, I couldn't care less that
anyone else thinks my hypothetical hybrid Java/CF code is unorganized or
difficult to maintain, as long as those that it matters to, like my boss and
clients don't care either. So I don't see how the fear of some overwhelming
horde of organized code existing somewhere out there, just over the horizon,
really is a valid argument against allowing inline Java within CF templates.

>> CFQuery is the perfect example here. If CF gives developers the power
>> to do whatever they want within cfquery tags, then why not java
>> within cfjava tags? Seems's inconsistent to me. Especially since
>> cfquery probably the biggest strength of the CF language.

MT> SQL and CFML serve 2 different purposes, database manipulation and
MT> application logic.  Java and CFML serve the same purpose,
MT> application logic.

That's not entirely true. TSQL and probably PLSQL work fine within cfquery
tags. Terrible as it may sound, if I want to loop over a cfquery that
manipulates a cursor I can.

I'm not saying there are not valid reasons for disallowing inline Java, I'm
just saying that limiting the flexibility of CF just because of the
possibility that nasty code may come into existence is not a good enough
reason in my opinion, but it's the only one that's been put forward by both
you and Phil. I also don't want to start yet another debate about what's
good and bad for CF, but as you said earlier, I am curious as well. Though I
suspect it's similar reasoning behind not allowing cfscript to call tags in
the past (not that I ever got the reasoning behind that either).

--
jon
mailto:[EMAIL PROTECTED]



~~~

RE: Java in CF (CFMX)

2002-11-22 Thread Phil Costa
The decision to disallow inline java code was definitely not a cut and dry one. One 
reason was definitely to enforce a cleaner separation of syntax; the other, which I 
hadn't mentioned, was to remove some additional complexity from the parsing/compiling 
process. Because of the differences between typing and syntax, parsing a page that had 
both Java and CFML/CFScript would have been a bear.

Phil

-Original Message-
From: Jon Hall [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 22, 2002 2:37 AM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


Thursday, November 21, 2002, 11:54:58 PM, you wrote:

MT> Jon Hall wrote:
>> The case for allowing inline Java is simple, CF developers can use 
>> Java without having to know everything about Java. Methods and 
>> classes are easy to get. Compiling, classpath's, and understanding 
>> the lengths Java goes to, to abstract everything, etc. is not.

MT> Knowing just a little about a language as deep/complex as Java can 
MT> be "dangerous" in a number of ways...

MT> It's very easy to run into errors in java if you don't understand 
MT> how it all works (ex. trying to instantiate an interface).  One of 
MT> the overriding strengths of CF is that it offers a great deal of 
MT> power in an easy to use/learn style.  This sort of thing, IMO, goes 
MT> against that strength.

MT> Mixing CFML and Java can very quickly lead to code that is horribly 
MT> organized and difficult to follow/maintain.  Obviously, anal coders 
MT> will keep things nice and neat, but others will be mashing CFML, 
MT> CFScript, Java, and SQL together haphazardly.

MT> Then there's the compatibility thing... Java lists != CF lists.  
MT> Java arrays != CF arrays.  Etc.  Again, this can lead to confusion 
MT> and cause all kinds of errors.

I say let the coders (and the pm's who have a clue ) who write the applications 
make the decision on what works in their application. I'm not trying to be facetious, 
but be brutally honest, I couldn't care less that anyone else thinks my hypothetical 
hybrid Java/CF code is unorganized or difficult to maintain, as long as those that it 
matters to, like my boss and clients don't care either. So I don't see how the fear of 
some overwhelming horde of organized code existing somewhere out there, just over the 
horizon, really is a valid argument against allowing inline Java within CF templates.

>> CFQuery is the perfect example here. If CF gives developers the power 
>> to do whatever they want within cfquery tags, then why not java 
>> within cfjava tags? Seems's inconsistent to me. Especially since 
>> cfquery probably the biggest strength of the CF language.

MT> SQL and CFML serve 2 different purposes, database manipulation and 
MT> application logic.  Java and CFML serve the same purpose, 
MT> application logic.

That's not entirely true. TSQL and probably PLSQL work fine within cfquery tags. 
Terrible as it may sound, if I want to loop over a cfquery that manipulates a cursor I 
can.

I'm not saying there are not valid reasons for disallowing inline Java, I'm just 
saying that limiting the flexibility of CF just because of the possibility that nasty 
code may come into existence is not a good enough reason in my opinion, but it's the 
only one that's been put forward by both you and Phil. I also don't want to start yet 
another debate about what's good and bad for CF, but as you said earlier, I am curious 
as well. Though I suspect it's similar reasoning behind not allowing cfscript to call 
tags in the past (not that I ever got the reasoning behind that either).

-- 
jon
mailto:[EMAIL PROTECTED]


~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: Java in CF (CFMX)

2002-11-21 Thread Jon Hall
Thursday, November 21, 2002, 11:54:58 PM, you wrote:

MT> Jon Hall wrote:
>> The case for allowing inline Java is simple, CF developers can use
>> Java without having to know everything about Java. Methods and classes
>> are easy to get. Compiling, classpath's, and understanding the lengths
>> Java goes to, to abstract everything, etc. is not.

MT> Knowing just a little about a language as deep/complex as Java can be
MT> "dangerous" in a number of ways...

MT> It's very easy to run into errors in java if you don't understand how it all
MT> works (ex. trying to instantiate an interface).  One of the overriding
MT> strengths of CF is that it offers a great deal of power in an easy to
MT> use/learn style.  This sort of thing, IMO, goes against that strength.

MT> Mixing CFML and Java can very quickly lead to code that is horribly
MT> organized and difficult to follow/maintain.  Obviously, anal coders will
MT> keep things nice and neat, but others will be mashing CFML, CFScript, Java,
MT> and SQL together haphazardly.

MT> Then there's the compatibility thing... Java lists != CF lists.  Java arrays
MT> != CF arrays.  Etc.  Again, this can lead to confusion and cause all kinds
MT> of errors.

I say let the coders (and the pm's who have a clue ) who write the
applications make the decision on what works in their application. I'm
not trying to be facetious, but be brutally honest, I couldn't care
less that anyone else thinks my hypothetical hybrid Java/CF code is
unorganized or difficult to maintain, as long as those that it matters
to, like my boss and clients don't care either. So I don't see how the
fear of some overwhelming horde of organized code existing somewhere
out there, just over the horizon, really is a valid argument against
allowing inline Java within CF templates.

>> CFQuery is the perfect example here. If CF gives developers the power
>> to do whatever they want within cfquery tags, then why not java within
>> cfjava tags? Seems's inconsistent to me. Especially since cfquery
>> probably the biggest strength of the CF language.

MT> SQL and CFML serve 2 different purposes, database manipulation and
MT> application logic.  Java and CFML serve the same purpose, application logic.

That's not entirely true. TSQL and probably PLSQL work fine within
cfquery tags. Terrible as it may sound, if I want to loop over a
cfquery that manipulates a cursor I can.

I'm not saying there are not valid reasons for disallowing inline
Java, I'm just saying that limiting the flexibility of CF just because
of the possibility that nasty code may come into existence is not a
good enough reason in my opinion, but it's the only one that's been
put forward by both you and Phil.
I also don't want to start yet another debate about what's good and
bad for CF, but as you said earlier, I am curious as well. Though I
suspect it's similar reasoning behind not allowing cfscript to call
tags in the past (not that I ever got the reasoning behind that
either).

-- 
jon
mailto:[EMAIL PROTECTED]

~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Java in CF (CFMX)

2002-11-21 Thread Mosh Teitelbaum
Jon Hall wrote:
> The case for allowing inline Java is simple, CF developers can use
> Java without having to know everything about Java. Methods and classes
> are easy to get. Compiling, classpath's, and understanding the lengths
> Java goes to, to abstract everything, etc. is not.

Knowing just a little about a language as deep/complex as Java can be
"dangerous" in a number of ways...

It's very easy to run into errors in java if you don't understand how it all
works (ex. trying to instantiate an interface).  One of the overriding
strengths of CF is that it offers a great deal of power in an easy to
use/learn style.  This sort of thing, IMO, goes against that strength.

Mixing CFML and Java can very quickly lead to code that is horribly
organized and difficult to follow/maintain.  Obviously, anal coders will
keep things nice and neat, but others will be mashing CFML, CFScript, Java,
and SQL together haphazardly.

Then there's the compatibility thing... Java lists != CF lists.  Java arrays
!= CF arrays.  Etc.  Again, this can lead to confusion and cause all kinds
of errors.

> CFQuery is the perfect example here. If CF gives developers the power
> to do whatever they want within cfquery tags, then why not java within
> cfjava tags? Seems's inconsistent to me. Especially since cfquery
> probably the biggest strength of the CF language.

SQL and CFML serve 2 different purposes, database manipulation and
application logic.  Java and CFML serve the same purpose, application logic.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/

~|
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



Re: Java in CF (CFMX)

2002-11-21 Thread Jon Hall
Interesting, sounds like the same reasoning that has kept CF tags from
being able to be used in cfscript all those years, another "design
decision", even though many people asked for it.

The case for allowing inline Java is simple, CF developers can use
Java without having to know everything about Java. Methods and classes
are easy to get. Compiling, classpath's, and understanding the lengths
Java goes to, to abstract everything, etc. is not.
CFQuery is the perfect example here. If CF gives developers the power
to do whatever they want within cfquery tags, then why not java within
cfjava tags? Seems's inconsistent to me. Especially since cfquery
probably the biggest strength of the CF language.

If disallowing Java is just a design decision, I would disagree with
it. If it's something that would take some time to implement, then I
can understand, because as you say, the Java integration is pretty
solid as it is.

-- 
jon
mailto:[EMAIL PROTECTED]

Thursday, November 21, 2002, 8:19:04 PM, you wrote:

PC> We made a design decision not to allow inline Java code. This was done to keep the 
code more organized and rational, and because we felt the many methods for calling out 
covered the basees.

PC> You can integrate with java code that lives in another file pretty easily -- 
include/forward to JSPs/servlets, instantiate and invoke Java objects, or import JSP 
tag libraries and invoke them in
PC> your page.

PC> Under the covers, what happens is that the class created from your CFM file calls 
the other class represented by your JSP page or Java class.

PC> If there's a use case you've got for writing Java in the page itself that wouldn't 
be covered by the methods noted above, I'd be interested in it.

PC> Phil Costa
PC> Macromedia


PC> -Original Message-
PC> From: Jim Campbell [mailto:[EMAIL PROTECTED]] 
PC> Sent: Thursday, November 21, 2002 4:50 PM
PC> To: CF-Talk
PC> Subject: Re: Java in CF (CFMX)


PC> That's an interesting idea - sort of like a  tag - anything between is 
directly interpreted Java code.  It would probably be pretty hairy though, since there 
would have to be an
PC> impressive kludge to get something like...

PC> System.out.println(#variables.HelloWorld#);

PC> . to work and still be even marginally recognizable by CF coders.

PC> - Jim

PC> - Original Message -
PC> From: "Rob Rohan" <[EMAIL PROTECTED]>
PC> To: "CF-Talk" <[EMAIL PROTECTED]>
PC> Sent: Thursday, November 21, 2002 3:40 PM
PC> Subject: RE: Java in CF (CFMX)


>> There is no need. I was just wondering. Since all cfm pages get 
>> complied into classes, I was thinking I could write some code blocks 
>> that would be faster using pure java (give direct access to the 
>> class).
>>
>> Somewhat like using ASM in C.
>>
>> It was just a thought.
>>
>> Thanks
>> Rob
>>
>> Scientia Est Potentia
>>
>> -Original Message-
>> From: Jim Campbell [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, November 21, 2002 1:37 PM
>> To: CF-Talk
>> Subject: Re: Java in CF (CFMX)
>>
>>
>> I guess not.  Would using the Java CFX API, or even just custom 
>> classes
PC> you
>> call from a CFMX template not meet your needs?
>>
>> - Jim
>>
>> - Original Message -
>> From: "Rob Rohan" <[EMAIL PROTECTED]>
>> To: "CF-Talk" <[EMAIL PROTECTED]>
>> Sent: Thursday, November 21, 2002 3:20 PM
>> Subject: RE: Java in CF (CFMX)
>>
>>
>> > So, judging by the lack of comments - this cannot be done.
>> >
>> > Rob
>> >
>> > Scientia Est Potentia
>> >
>> > -Original Message-
>> > From: Rob Rohan [mailto:[EMAIL PROTECTED]]
>> > Sent: Thursday, November 21, 2002 12:37 PM
>> > To: CF-Talk
>> > Subject: Java in CF (CFMX)
>> >
>> >
>> > is there a way to do something like
>> > 
>> > //actual java code not cfscript
>> > 
>> >
>> > in cfmx? Like JSP in line - how do you make a jsp block?
>> >
>> > Thanks,
>> > Rob
>> >
>> > Scientia Est Potentia
>> >
>> >
>>
>> 

PC> 
~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Java in CF (CFMX)

2002-11-21 Thread Erik Yowell
What I'd love to see is some sort of BSF Engine-like implementation for
Cold Fusion. Instead of hardcore java, what about making CFScript more
akin to JavaScript, heck I think the Netscape ECMA interpreter is in the
new CFMX Base, is it not? Switching channels from traditional coder ECMA
syntax to CFScript is a bit of a pain, and probably one of the many
reasons that "hard core traditional" programmers scoff at it. Which
really is kinda silly, I mean - interpreted code is just interpreted
code, is it not? If all of those zealots are so concerned with their
friggin' syntax, why don't they just write websites in assembly? :) 

Erik Yowell
[EMAIL PROTECTED]
http://www.shortfusemedia.com


-Original Message-
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 21, 2002 5:39 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX)

While I personally agree with the decision you all made to not allow
inline
Java code, I'm a bit curious as to why you made that decision.  Why can
you
mix CFML and CFScript but not Java?

As to why someone might want to inline the Java code... one less degree
of
separation.  If, instead of using CF lists (which are really just parsed
strings) I wanted to use Java Lists (or Sets or ... ) it'd probably be
nice
to be able to do something like:


List jList = new LinkedList();

jList.add(FORM.optionList);


I suspect that parsing this would be something of a bitch but I could
see
where it'd be easier/cleaner to do the above than to have to resort to:




Anyway, like I said, I agree with your decision but I'm still curious.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Phil Costa [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 8:19 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX)
>
>
> We made a design decision not to allow inline Java code. This was
> done to keep the code more organized and rational, and because we
> felt the many methods for calling out covered the basees.
>
> You can integrate with java code that lives in another file
> pretty easily -- include/forward to JSPs/servlets, instantiate
> and invoke Java objects, or import JSP tag libraries and invoke
> them in your page.
>
> Under the covers, what happens is that the class created from
> your CFM file calls the other class represented by your JSP page
> or Java class.
>
> If there's a use case you've got for writing Java in the page
> itself that wouldn't be covered by the methods noted above, I'd
> be interested in it.
>
> Phil Costa
> Macromedia
>
>
> -----Original Message-
> From: Jim Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 4:50 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> That's an interesting idea - sort of like a  tag -
> anything between is directly interpreted Java code.  It would
> probably be pretty hairy though, since there would have to be an
> impressive kludge to get something like...
>
> System.out.println(#variables.HelloWorld#);
>
> . to work and still be even marginally recognizable by CF coders.
>
> - Jim
>
> - Original Message -
> From: "Rob Rohan" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, November 21, 2002 3:40 PM
> Subject: RE: Java in CF (CFMX)
>
>
> > There is no need. I was just wondering. Since all cfm pages get
> > complied into classes, I was thinking I could write some code blocks
> > that would be faster using pure java (give direct access to the
> > class).
> >
> > Somewhat like using ASM in C.
> >
> > It was just a thought.
> >
> > Thanks
> > Rob
> >
> > Scientia Est Potentia
> >
> > -Original Message-
> > From: Jim Campbell [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 21, 2002 1:37 PM
> > To: CF-Talk
> > Subject: Re: Java in CF (CFMX)
> >
> >
> > I guess not.  Would using the Java CFX API, or even just custom
> > classes
> you
> > call from a CFMX template not meet your needs?
> >
> > - Jim
> >
> > - Original Message -
> > From: "Rob Rohan" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 21, 2002 3:20 PM
> > Subject: RE: Java in CF (CFMX)
> >
> >
> > > So, judging by the lack of comments - this cannot be done.
> > >
> > > Rob
> > >
> > > Scientia Est Potentia
> > >
> > &

RE: Java in CF (CFMX)

2002-11-21 Thread Mosh Teitelbaum
While I personally agree with the decision you all made to not allow inline
Java code, I'm a bit curious as to why you made that decision.  Why can you
mix CFML and CFScript but not Java?

As to why someone might want to inline the Java code... one less degree of
separation.  If, instead of using CF lists (which are really just parsed
strings) I wanted to use Java Lists (or Sets or ... ) it'd probably be nice
to be able to do something like:


List jList = new LinkedList();

jList.add(FORM.optionList);


I suspect that parsing this would be something of a bitch but I could see
where it'd be easier/cleaner to do the above than to have to resort to:




Anyway, like I said, I agree with your decision but I'm still curious.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -Original Message-
> From: Phil Costa [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 8:19 PM
> To: CF-Talk
> Subject: RE: Java in CF (CFMX)
>
>
> We made a design decision not to allow inline Java code. This was
> done to keep the code more organized and rational, and because we
> felt the many methods for calling out covered the basees.
>
> You can integrate with java code that lives in another file
> pretty easily -- include/forward to JSPs/servlets, instantiate
> and invoke Java objects, or import JSP tag libraries and invoke
> them in your page.
>
> Under the covers, what happens is that the class created from
> your CFM file calls the other class represented by your JSP page
> or Java class.
>
> If there's a use case you've got for writing Java in the page
> itself that wouldn't be covered by the methods noted above, I'd
> be interested in it.
>
> Phil Costa
> Macromedia
>
>
> -Original Message-
> From: Jim Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 4:50 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> That's an interesting idea - sort of like a  tag -
> anything between is directly interpreted Java code.  It would
> probably be pretty hairy though, since there would have to be an
> impressive kludge to get something like...
>
> System.out.println(#variables.HelloWorld#);
>
> . to work and still be even marginally recognizable by CF coders.
>
> - Jim
>
> - Original Message -
> From: "Rob Rohan" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, November 21, 2002 3:40 PM
> Subject: RE: Java in CF (CFMX)
>
>
> > There is no need. I was just wondering. Since all cfm pages get
> > complied into classes, I was thinking I could write some code blocks
> > that would be faster using pure java (give direct access to the
> > class).
> >
> > Somewhat like using ASM in C.
> >
> > It was just a thought.
> >
> > Thanks
> > Rob
> >
> > Scientia Est Potentia
> >
> > -Original Message-
> > From: Jim Campbell [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 21, 2002 1:37 PM
> > To: CF-Talk
> > Subject: Re: Java in CF (CFMX)
> >
> >
> > I guess not.  Would using the Java CFX API, or even just custom
> > classes
> you
> > call from a CFMX template not meet your needs?
> >
> > - Jim
> >
> > - Original Message -
> > From: "Rob Rohan" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 21, 2002 3:20 PM
> > Subject: RE: Java in CF (CFMX)
> >
> >
> > > So, judging by the lack of comments - this cannot be done.
> > >
> > > Rob
> > >
> > > Scientia Est Potentia
> > >
> > > -Original Message-
> > > From: Rob Rohan [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, November 21, 2002 12:37 PM
> > > To: CF-Talk
> > > Subject: Java in CF (CFMX)
> > >
> > >
> > > is there a way to do something like
> > > 
> > > //actual java code not cfscript
> > > 
> > >
> > > in cfmx? Like JSP in line - how do you make a jsp block?
> > >
> > > Thanks,
> > > Rob
> > >
> > > Scientia Est Potentia
> > >
> > >
> >
> >
>
> 
~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Java in CF (CFMX)

2002-11-21 Thread Rob Rohan
Its really just a guise to not have to write

for(x=1; x gt 3; x=x+1)

but instead

for(x=1; x > 3; x++)

plus you cant cast to anything but int, String.

It's no big deal it just would make MX more fun and powerful.

Rob

Certified Organic
"When you put things in quotes, people think someone actually said it."
http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Phil Costa [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 5:19 PM
To: CF-Talk
Subject: RE: Java in CF (CFMX)


We made a design decision not to allow inline Java code. This was done to
keep the code more organized and rational, and because we felt the many
methods for calling out covered the basees.

You can integrate with java code that lives in another file pretty easily --
include/forward to JSPs/servlets, instantiate and invoke Java objects, or
import JSP tag libraries and invoke them in your page.

Under the covers, what happens is that the class created from your CFM file
calls the other class represented by your JSP page or Java class.

If there's a use case you've got for writing Java in the page itself that
wouldn't be covered by the methods noted above, I'd be interested in it.

Phil Costa
Macromedia


-Original Message-
From: Jim Campbell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 4:50 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


That's an interesting idea - sort of like a  tag - anything between
is directly interpreted Java code.  It would probably be pretty hairy
though, since there would have to be an impressive kludge to get something
like...

System.out.println(#variables.HelloWorld#);

 to work and still be even marginally recognizable by CF coders.

- Jim

- Original Message -
From: "Rob Rohan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 3:40 PM
Subject: RE: Java in CF (CFMX)


> There is no need. I was just wondering. Since all cfm pages get
> complied into classes, I was thinking I could write some code blocks
> that would be faster using pure java (give direct access to the
> class).
>
> Somewhat like using ASM in C.
>
> It was just a thought.
>
> Thanks
> Rob
>
> Scientia Est Potentia
>
> -Original Message-
> From: Jim Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 1:37 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> I guess not.  Would using the Java CFX API, or even just custom
> classes
you
> call from a CFMX template not meet your needs?
>
> - Jim
>
> - Original Message -
> From: "Rob Rohan" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, November 21, 2002 3:20 PM
> Subject: RE: Java in CF (CFMX)
>
>
> > So, judging by the lack of comments - this cannot be done.
> >
> > Rob
> >
> > Scientia Est Potentia
> >
> > -Original Message-
> > From: Rob Rohan [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 21, 2002 12:37 PM
> > To: CF-Talk
> > Subject: Java in CF (CFMX)
> >
> >
> > is there a way to do something like
> > 
> > //actual java code not cfscript
> > 
> >
> > in cfmx? Like JSP in line - how do you make a jsp block?
> >
> > Thanks,
> > Rob
> >
> > Scientia Est Potentia
> >
> >
>
>


~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Java in CF (CFMX)

2002-11-21 Thread Phil Costa
We made a design decision not to allow inline Java code. This was done to keep the 
code more organized and rational, and because we felt the many methods for calling out 
covered the basees.

You can integrate with java code that lives in another file pretty easily -- 
include/forward to JSPs/servlets, instantiate and invoke Java objects, or import JSP 
tag libraries and invoke them in your page.

Under the covers, what happens is that the class created from your CFM file calls the 
other class represented by your JSP page or Java class.

If there's a use case you've got for writing Java in the page itself that wouldn't be 
covered by the methods noted above, I'd be interested in it.

Phil Costa
Macromedia


-Original Message-
From: Jim Campbell [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 21, 2002 4:50 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


That's an interesting idea - sort of like a  tag - anything between is 
directly interpreted Java code.  It would probably be pretty hairy though, since there 
would have to be an impressive kludge to get something like...

System.out.println(#variables.HelloWorld#);

. to work and still be even marginally recognizable by CF coders.

- Jim

- Original Message -
From: "Rob Rohan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 3:40 PM
Subject: RE: Java in CF (CFMX)


> There is no need. I was just wondering. Since all cfm pages get 
> complied into classes, I was thinking I could write some code blocks 
> that would be faster using pure java (give direct access to the 
> class).
>
> Somewhat like using ASM in C.
>
> It was just a thought.
>
> Thanks
> Rob
>
> Scientia Est Potentia
>
> -Original Message-
> From: Jim Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 1:37 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> I guess not.  Would using the Java CFX API, or even just custom 
> classes
you
> call from a CFMX template not meet your needs?
>
> - Jim
>
> - Original Message -
> From: "Rob Rohan" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, November 21, 2002 3:20 PM
> Subject: RE: Java in CF (CFMX)
>
>
> > So, judging by the lack of comments - this cannot be done.
> >
> > Rob
> >
> > Scientia Est Potentia
> >
> > -Original Message-
> > From: Rob Rohan [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 21, 2002 12:37 PM
> > To: CF-Talk
> > Subject: Java in CF (CFMX)
> >
> >
> > is there a way to do something like
> > 
> > //actual java code not cfscript
> > 
> >
> > in cfmx? Like JSP in line - how do you make a jsp block?
> >
> > Thanks,
> > Rob
> >
> > Scientia Est Potentia
> >
> >
>
> 

~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: Java in CF (CFMX)

2002-11-21 Thread Jim Campbell
That's an interesting idea - sort of like a  tag - anything between
is directly interpreted Java code.  It would probably be pretty hairy
though, since there would have to be an impressive kludge to get something
like...

System.out.println(#variables.HelloWorld#);

.. to work and still be even marginally recognizable by CF coders.

- Jim

- Original Message -
From: "Rob Rohan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 3:40 PM
Subject: RE: Java in CF (CFMX)


> There is no need. I was just wondering. Since all cfm pages get complied
> into classes, I was thinking I could write some code blocks that would be
> faster using pure java (give direct access to the class).
>
> Somewhat like using ASM in C.
>
> It was just a thought.
>
> Thanks
> Rob
>
> Scientia Est Potentia
>
> -Original Message-
> From: Jim Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 1:37 PM
> To: CF-Talk
> Subject: Re: Java in CF (CFMX)
>
>
> I guess not.  Would using the Java CFX API, or even just custom classes
you
> call from a CFMX template not meet your needs?
>
> - Jim
>
> - Original Message -
> From: "Rob Rohan" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, November 21, 2002 3:20 PM
> Subject: RE: Java in CF (CFMX)
>
>
> > So, judging by the lack of comments - this cannot be done.
> >
> > Rob
> >
> > Scientia Est Potentia
> >
> > -Original Message-
> > From: Rob Rohan [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 21, 2002 12:37 PM
> > To: CF-Talk
> > Subject: Java in CF (CFMX)
> >
> >
> > is there a way to do something like
> > 
> > //actual java code not cfscript
> > 
> >
> > in cfmx? Like JSP in line - how do you make a jsp block?
> >
> > Thanks,
> > Rob
> >
> > Scientia Est Potentia
> >
> >
>
> 
~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Java in CF (CFMX)

2002-11-21 Thread Douglas.Knudsen
you can import jsp libraries and use them in a CF page via CFIMPORT in CFMX.

Doug

>-Original Message-
>From: Rob Rohan [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, November 21, 2002 4:41 PM
>To: CF-Talk
>Subject: RE: Java in CF (CFMX)
>
>
>There is no need. I was just wondering. Since all cfm pages 
>get complied
>into classes, I was thinking I could write some code blocks 
>that would be
>faster using pure java (give direct access to the class).
>
>Somewhat like using ASM in C.
>
>It was just a thought.
>
>Thanks
>Rob
>
>Scientia Est Potentia
>
>-Original Message-
>From: Jim Campbell [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, November 21, 2002 1:37 PM
>To: CF-Talk
>Subject: Re: Java in CF (CFMX)
>
>
>I guess not.  Would using the Java CFX API, or even just 
>custom classes you
>call from a CFMX template not meet your needs?
>
>- Jim
>
>- Original Message -
>From: "Rob Rohan" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Thursday, November 21, 2002 3:20 PM
>Subject: RE: Java in CF (CFMX)
>
>
>> So, judging by the lack of comments - this cannot be done.
>>
>> Rob
>>
>> Scientia Est Potentia
>>
>> -Original Message-
>> From: Rob Rohan [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, November 21, 2002 12:37 PM
>> To: CF-Talk
>> Subject: Java in CF (CFMX)
>>
>>
>> is there a way to do something like
>> 
>> //actual java code not cfscript
>> 
>>
>> in cfmx? Like JSP in line - how do you make a jsp block?
>>
>> Thanks,
>> Rob
>>
>> Scientia Est Potentia
>>
>>
>
>
~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Java in CF (CFMX)

2002-11-21 Thread Rob Rohan
There is no need. I was just wondering. Since all cfm pages get complied
into classes, I was thinking I could write some code blocks that would be
faster using pure java (give direct access to the class).

Somewhat like using ASM in C.

It was just a thought.

Thanks
Rob

Scientia Est Potentia

-Original Message-
From: Jim Campbell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 1:37 PM
To: CF-Talk
Subject: Re: Java in CF (CFMX)


I guess not.  Would using the Java CFX API, or even just custom classes you
call from a CFMX template not meet your needs?

- Jim

- Original Message -
From: "Rob Rohan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 3:20 PM
Subject: RE: Java in CF (CFMX)


> So, judging by the lack of comments - this cannot be done.
>
> Rob
>
> Scientia Est Potentia
>
> -Original Message-
> From: Rob Rohan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 12:37 PM
> To: CF-Talk
> Subject: Java in CF (CFMX)
>
>
> is there a way to do something like
> 
> //actual java code not cfscript
> 
>
> in cfmx? Like JSP in line - how do you make a jsp block?
>
> Thanks,
> Rob
>
> Scientia Est Potentia
>
>

~|
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
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: Java in CF (CFMX)

2002-11-21 Thread Jim Campbell
I guess not.  Would using the Java CFX API, or even just custom classes you
call from a CFMX template not meet your needs?

- Jim

- Original Message -
From: "Rob Rohan" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 3:20 PM
Subject: RE: Java in CF (CFMX)


> So, judging by the lack of comments - this cannot be done.
>
> Rob
>
> Scientia Est Potentia
>
> -Original Message-
> From: Rob Rohan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 21, 2002 12:37 PM
> To: CF-Talk
> Subject: Java in CF (CFMX)
>
>
> is there a way to do something like
> 
> //actual java code not cfscript
> 
>
> in cfmx? Like JSP in line - how do you make a jsp block?
>
> Thanks,
> Rob
>
> Scientia Est Potentia
>
> 
~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: Java in CF (CFMX)

2002-11-21 Thread jon hall
Not to my knowledge...if there is, I haven't seen it documented. You
can of course instantiate classes and read/set properties and use the
classes methods with standard CF.



-- 
 jon
 mailto:[EMAIL PROTECTED]

Thursday, November 21, 2002, 3:36:54 PM, you wrote:
RR> is there a way to do something like
RR> 
RR> //actual java code not cfscript
RR> 

RR> in cfmx? Like JSP in line - how do you make a jsp block?

RR> Thanks,
RR> Rob

~|
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



RE: Java in CF (CFMX)

2002-11-21 Thread Rob Rohan
So, judging by the lack of comments - this cannot be done.

Rob

Scientia Est Potentia

-Original Message-
From: Rob Rohan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 12:37 PM
To: CF-Talk
Subject: Java in CF (CFMX)


is there a way to do something like

//actual java code not cfscript


in cfmx? Like JSP in line - how do you make a jsp block?

Thanks,
Rob

Scientia Est Potentia

~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Java in CF (CFMX)

2002-11-21 Thread Rob Rohan
is there a way to do something like

//actual java code not cfscript


in cfmx? Like JSP in line - how do you make a jsp block?

Thanks,
Rob

Scientia Est Potentia
~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm