rachmat | 3 Jan 03:08
Picon

jython jsp connect to mysql, and read, write

i have a problem with my source code, i want to connect jython jsp with
mysql and read, write, update to mysql , can u give me example about it ?

thanks for attention

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Ivan Horvath | 3 Jan 08:50
Picon

Re: jython jsp connect to mysql, and read, write

unfortunately i don't have real example, but making a simple google search found this article.
http://www.informit.com/articles/article.aspx?p=26865&seqNum=9
have you read this?

what error message did you receive?

On Jan 3, 2008 3:08 AM, <rachmat <at> cs.its.ac.id> wrote:
i have a problem with my source code, i want to connect jython jsp with
mysql and read, write, update to mysql , can u give me example about it ?

thanks for attention



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users



--
"De sagittis hungarorum libera nos, Domine!" - "A magyarok nyilaitól ments meg Uram minket!"

http://www.freeweb.hu/pillesoft
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
David Huebel | 8 Jan 23:41
Picon

multiple independent Jython runtimes in one JVM

I would like to run multiple independent Jython runtimes, with
different Python source paths and independent, non-interacting module
namespaces.  Different runtimes will contain modules with the same
name but different content -- slightly different or completely
different.  No settings, caches, data, or anything else that might
vary from one runtime to the next should be shared.

At first glance, it should be possible to achieve this by using a
different classloader to load the Jython classes for each runtime.
Since versions of the same class loaded by different classloaders are
not only independent but type incompatible to boot, a copy of the
Jython library loaded through one classloader should have no
interaction with a copy of the Jython library loaded through another
classloader.

However, this ignores the possibility that the two runtimes might
interact with each other through JRE classes -- there is only one
version of each JRE class, loaded through a single classloader.
(Actually, I don't know if it is necessary in principle, but it is
necessary for other parts of my application to interact with my Jython
code.)  So there could still be conflicts, especially since some
information in Jython gets cached in the current thread state.  As far
as I can tell, though, the thread-local information in Jython is
contained in thread-local variables in instances of classes loaded
from jython.jar and should therefore not result in collisions.  (I.e.,
it is not stored using a pthreads-style key-value mapping stored in a
JRE object somewhere.)  In any case, interactions that result in
Jython class instances from one runtime being passed to the other
should result in ClassCastExceptions, not silent corruption.

With that preamble:

1.  Does anyone happen to know a reason why it would be impossible to
create multiple independent runtimes using Jython?

2.  Is anyone confident that it can be done?

3.  Has anyone actually done it?

I have made a first try at it, but I've hit a problem.  Specifically,
I have two runtimes that both contain a top-level module foo.  Runtime
A contains the module foo.bar, but runtime B contains the module
foo.baz.  Runtime B is initialized first and seems to run okay.  Then,
when I attempt to instantiate the class foo.bar.Bar in runtime A, the
import of Bar succeeds, the Bar constructor runs successfully, but
when the runtime attempts to initialize the proxy, it cannot find bar
in foo.  Debugging reveals that the foo module consulted during the
proxy initialization contains baz, but not bar.  So some kind of
cross-talk is happening between the two runtimes, and no
ClassCastExceptions are thrown.

It might very well be due to a problem in my code, but I have worked
on it far enough that I figured I should ask for input before
proceeding further.  Any information would be much appreciated!

-David

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
David Huebel | 10 Jan 18:09
Picon

parent class loader of proxy class loader

When a class loader is created to load a proxy class, what parent
class loader is used?

-David

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
astigmatik | 11 Jan 09:47
Picon

throwing exceptions

In Java, we have something like this:

new Class() {
       public void someMethod(args) throws BadLocationException {
...

How is this translated to Jython? (I'm referring to the throw exception part)

Regards,
astigmatik

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Brian O'Neill | 11 Jan 19:36
Picon
Favicon

Jython 2.2.1 Interaction with Swing

I have a program that outputs data to a JTable as the program runs.  When I run the program with Jython 2.1, the output became visible while the program ran.  With Jython 2.2 and 2.2.1, none of the output is visible until the program has terminated.  Did something change with how Jython interacts with Swing?  Any suggestions for keeping the output visible while the program runs?

Thanks,
Brian O'Neill
boneill <at> cc.gatech.edu

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users
Charlie Groves | 11 Jan 22:21
Picon
Gravatar

Re: Jython 2.2.1 Interaction with Swing

On Jan 11, 2008 10:36 AM, Brian O'Neill <boneill <at> cc.gatech.edu> wrote:
> I have a program that outputs data to a JTable as the program runs.  When I
> run the program with Jython 2.1, the output became visible while the program
> ran.  With Jython 2.2 and 2.2.1, none of the output is visible until the
> program has terminated.  Did something change with how Jython interacts with
> Swing?  Any suggestions for keeping the output visible while the program
> runs?

Nothing changed that I can think of.  You should make all updates to
the table on the event dispatch thread, but that was as true for 2.1
as for 2.2.  Could you post a small example that shows the problem?

Thanks,
Charlie

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Charlie Groves | 11 Jan 22:24
Picon
Gravatar

Re: throwing exceptions

On Jan 11, 2008 12:47 AM,  <astigmatik <at> gmail.com> wrote:
> In Java, we have something like this:
>
> new Class() {
>        public void someMethod(args) throws BadLocationException {
> ...
>
> How is this translated to Jython? (I'm referring to the throw exception part)

Python doesn't have checked exceptions at all, so there's no way to
declare that a method throws a given exception.  For actually throwing
an exception, you use the raise statement.  If you're inheriting from
a Java class that has a method that throws a checked exception, you
can just raise that checked exception from an overriding method in
Jython.

Charlie

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Charlie Groves | 11 Jan 22:33
Picon
Gravatar

Re: parent class loader of proxy class loader

On Jan 10, 2008 9:09 AM, David Huebel <davidhuebel <at> gmail.com> wrote:
> When a class loader is created to load a proxy class, what parent
> class loader is used?

The classloader of the class being proxied to followed by the
classloaders of any interfaces it implements.

Charlie

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Josh Juneau | 11 Jan 22:53
Picon

Jython Monthly Call for Articles - January 2008

The January 2008 issue of Jython Monthly will be distributed on January 22nd.  Please feel free to add an article or tutorial to the January 2008 article page if you wish. 

Post a link to your content here: http://wiki.python.org/jython/JythonMonthly/Articles/January2008

Thanks for your help!

Josh Juneau

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jython-users mailing list
Jython-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users

Gmane