You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2012/05/01 16:18:22 UTC

Re: Running Swing app under Tomcat 6 on Linux

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

DG,

At this point, we're way off-topic but I'll keep playing if you want to ;)

On 4/30/12 12:46 PM, dgchristensen@comcast.net wrote:
> Thanks for the input.  I guess I should give more rationale on why 
> I want to do this.  My webservice(s) use an open source project 
> that acts as a DB engine for retrieving data from the DB (google 
> 'zeidonjoe' if any of you are interested).  The data engine has a 
> browser that lets a developer view all the retrieved data in a 
> structured GUI.  In a way it would be like viewing all your active
>  Hibernate objects, showing data and relationships.  It can be a 
> very powerful tool while debugging.  The browser is dynamically 
> loaded+started by the data engine and it (the browser) has access 
> to the engine's internal objects so that the DB data can be 
> displayed.

This sounds a lot like what jhat does (gives you access to underlying
data in a "browser"). You might consider using the jhat model and
providing a web-based interface for the same data instead of swing.

If the swing interface makes the user experience that much better
(e.g. because you have certain widgets available, etc.) then you can
still use swing... just browsing a web-based interface (say,
delivering XML, binary data, or even serialized Java objects if you
really want to do that kind of thing).

> The browser is written using Swing, originally on Windows, and the
>  users (who are engineers) like it.  Now I'm trying to get it 
> working on Linux.  A better long-term solution would perhaps be to 
> create a JMX API but that's a lot of changes for something that 
> already works on Windows.

I don't think JMX is appropriate, here.

> As always, engineering time is short and I'm looking for the 
> quickest solution that doesn't confine me in the future.  I'm open 
> to any alternative ideas if they are relatively quick to 
> implement.

My suggestion would be to use HTTP as your transport protocol (you
*are* running on an HTTP-based application server so why not?) and
either a pure web-based interface or a swing app that actually runs on
the client and connects "remotely" (even if it's on the same box) to
the server.

At this point, you may be too far down the road to re-tool, but I
think you'll gain more flexibility if your users don't have to be
sitting on localhost in order to browse this data. Plus, you won't
have to go through these crazy hoops to get it to work.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+f8K4ACgkQ9CaO5/Lv0PD43QCdEW5+83VIVBQ/g4997N+IM+zt
ROIAn1mGHEKATUy//HhdyjPYNRHpideI
=BHtV
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Running Swing app under Tomcat 6 on Linux

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

DG,

On 5/1/12 12:44 PM, dgchristensen@comcast.net wrote:
> jhat displays the raw data but the object browser allows the 
> developer to view the data in a structured format.  At the risk of 
> using another lousy analogy, the application data is formated in a 
> sort of high-functioning, hierarchical DOM.  The browser lets the 
> developer peruse (or, uh, browse) the data in this hierarchical 
> format in real-time.  It's sort of like the DOM viewer in Firebug 
> (but better! of course).  The first time developers see their data 
> displayed by the browser there is almost always ooh-ing and
> ahh-ing.

Yeah, I guess jhat was a bad example. I just meant that jhat doesn't
include its own client... you provide your own (web browser).

If your data is hierarchical, it sounds like it would be natural to
express it in XML. It's fairly easy to write an XSL stylesheet that can
convert that into something that can expand/collapse with clicks, etc.

> I agree that some sort of remoting is the best solution.  That
> just takes time and I was hoping for a quick solution.  Woe is
> life. ;)
> 
> If you want to continue this further feel free to contact me 
> directly.  I'm always open to informed opinions.  For the long run 
> I'm looking at http://sites.google.com/site/simpleremoting/home

I wouldn't recommend JSON for large amounts of data, especially when
it's structured and nested in the way you have described. On the other
hand, XML is typically very verbose.

Good luck,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+gT5cACgkQ9CaO5/Lv0PAYbwCcD/RhCQ0D0EaLVlIi6KW883zC
XIYAn2QwWXytJh7HRuGSjRROHgvx6GHC
=dC81
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Running Swing app under Tomcat 6 on Linux

Posted by dg...@comcast.net.
----- Original Message -----
> From: "Christopher Schultz" <ch...@christopherschultz.net>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Tuesday, May 1, 2012 10:18:22 AM
> Subject: Re: Running Swing app under Tomcat 6 on Linux
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> DG,
> 
> At this point, we're way off-topic but I'll keep playing if you want
> to ;)

I appreciate your input.  Hopefully this isn't too far off and annoying other readers. :)

> This sounds a lot like what jhat does (gives you access to underlying
> data in a "browser"). You might consider using the jhat model and
> providing a web-based interface for the same data instead of swing.

jhat displays the raw data but the object browser allows the developer to view the data in a structured format.  At the risk of using another lousy analogy, the application data is formated in a sort of high-functioning, hierarchical DOM.  The browser lets the developer peruse (or, uh, browse) the data in this hierarchical format in real-time.  It's sort of like the DOM viewer in Firebug (but better! of course).  The first time developers see their data displayed by the browser there is almost always ooh-ing and ahh-ing.

> If the swing interface makes the user experience that much better
> (e.g. because you have certain widgets available, etc.) then you can
> still use swing... just browsing a web-based interface (say,
> delivering XML, binary data, or even serialized Java objects if you
> really want to do that kind of thing).
> 
> > The browser is written using Swing, originally on Windows, and the
> >  users (who are engineers) like it. Now I'm trying to get it
> > working on Linux. A better long-term solution would perhaps be to
> > create a JMX API but that's a lot of changes for something that
> > already works on Windows.
> 
> I don't think JMX is appropriate, here.
> 
> > As always, engineering time is short and I'm looking for the
> > quickest solution that doesn't confine me in the future. I'm open
> > to any alternative ideas if they are relatively quick to
> > implement.
> 
> My suggestion would be to use HTTP as your transport protocol (you
> *are* running on an HTTP-based application server so why not?) and
> either a pure web-based interface or a swing app that actually runs on
> the client and connects "remotely" (even if it's on the same box) to
> the server.
> 
> At this point, you may be too far down the road to re-tool, but I
> think you'll gain more flexibility if your users don't have to be
> sitting on localhost in order to browse this data. Plus, you won't
> have to go through these crazy hoops to get it to work.

I agree that some sort of remoting is the best solution.  That just takes time and I was hoping for a quick solution.  Woe is life. ;)

If you want to continue this further feel free to contact me directly.  I'm always open to informed opinions.  For the long run I'm looking at http://sites.google.com/site/simpleremoting/home

DG

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org