Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

JSX-ideas · Ideas on Java Serialization for XML

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 151
  • Category: XML
  • Founded: Jan 10, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 1116 - 1152 of 2221   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1116 From: "egroups_yow" <bren@...>
Date: Wed Feb 27, 2002 4:18 am
Subject: Re: Proposed open source license (non-commercial)
egroups_yow
Send Email Send Email
 
Hi Raimi,

Good to hear from you!

> A free-for-non-comercial-use license would've made me use JSX for
> that uni project, but the GPL made me stay here and have some good
> discussions with Brendan . (the LGPL would've worked, too)

These kind of discussions and support are very important to me -
it's really the camaraderie.

I think this was a factor that I was leaving out of my assessement
of GPL vs proposed license.  Thus, I'm very glad to have suggested
it, and got this response.  Thanks!


Cheers,
Brendan

#1117 From: "egroups_yow" <bren@...>
Date: Wed Feb 27, 2002 4:28 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
egroups_yow
Send Email Send Email
 
Hi Jim,

> I agree with Gary and Raimi. The GPL isn't anti-commercial,
> and does allow other licenses, as you have done here, and as has
> been done by TrollTech.
I agree - I was mistaken to describe it as "anti-commercial".  I
take it back! ;-)

> I don't think that expecting people to move to your license
> is a good thing, especially when most uses of JSX are for
> ancilliary  tasks such as data and configuration storage.
Agreed - it was more of a possibility or option than an expectation.
But for it to be really viable, the proposed license would need
establish an infrastructure.  And that's hard.

> I don't think that that's enough to convince them to switch to a
> new license, especially when it  doesn't have the pedegree that
> the GPL has.
Good point: it's not just that the GPL is well-known and accepted,
but also that it is tried and tested, including Gary's point about
the patents etc.


Cheers,
Brendan

#1118 From: "egroups_yow" <bren@...>
Date: Wed Feb 27, 2002 9:41 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
egroups_yow
Send Email Send Email
 
Hi Mark & Gary,

Hey guys, the vigorous debate is excellent, but let's have a
good clean fight here!  We're all on the same side, even if
we have different points of view, or made some incorrect
assumptions, or mis-interpret someone else, or just have a
different style of talking. If we don't keep a polite tone, the
discussion is less likely to yield valuable insights...

Mark, thanks for your points, especially about JSX not being a
spin-off, and on patents.

> So you convinced your client to open up there software so that they
> would receive additional QA, giving the side-effect of making
> available the code to others, including yourself, for future
> use. JSX being opensource, but not GPL, gives its users
> (developers like you and me) the ability to improve QA, while
> not creating something with a life of its own. How would it
> having a life of its own help Brendan? How would it help me?
> It doesn't. It only help people who come later on who want
> to take some software that others made, for there own. Hence
> the term freeloaders.

I'm not against it having a life of its own - just against
commercial use of it.  I'm happy for people to copy it and use
etc, provided that if they get a commercial benefit from it, that
there is some return to me.

Gary argues that it is sensible to let people use it commercially,
because of the benefits of contributions and viral marketing.
Keeping it under the GPL also keeps me in the "GPL club", and some
camaraderie, discussions and so on.  It is also a tried and tested
license, is well-known, and avoids errors I might make myself in
writing my own.

I think that if a company gets an enormous commercial benefit from
using  GPL code, that they should makes some contribution back.
It's hard to know what the balance is.

That's why I've given up, just stuck with the GPL.  Hopefully, the
poll, and proposed license and discussions will shed more light on
it.

Please, no flaming!  ;-)

Cheers,
Brendan

#1119 From: RAJEEV Kv <rkvfrd@...>
Date: Wed Feb 27, 2002 10:41 am
Subject: Problem of jsx1.0 with jdk1.4
rkvfrd
Send Email Send Email
 
Hi,

I ported my files onto new version of jsx and tested
it with jdk1.4 and jdk1.3 both.

All files work well with jdk1.3 but with jdk1.4 only
small files work well and a big file involved with
some complexities generates problems. It is
deserialized for the first time with an error
statement "We just got an exception when creating
magic14..." but if i again try to deserialize it then
it's not deserialized and gives a Windows 'Application
error' i.e. memory cannot be read.

What should I do to rectify this error? Please help...

Thanks
rkv


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

#1120 From: Gary Lawrence Murphy <garym@...>
Date: Fri Mar 1, 2002 9:06 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
revg
Send Email Send Email
 
>>>>> "M" == Mark Collette <mcollett@...> writes:

     M> Gary Lawrence Murphy wrote:
     >>  Respectfully, and not to pick a fight, but just to be real,
     >> JSX has already _profitted_ from my commercial use of it.

     M> First of all, when you submitted the bug to Brendan, it was
     M> under the agreement that there would be no economic
     M> compensation, so he owes you nothing.

I was just illustrating a point; that point being how free software
benefits all participants in ways that are easily translated into hard
dollars.

     M> If you used JSX in a non-GPL program, then you were in
     M> violation of the commercial license, so you do owe Brendan

Ah, but I didn't ;) As it turned out, in that particular case, the
fuzziness over the future license scared OpenCola away from JSX; that
particular demo was GPL, but their further work was under the same
sort of license that was proposed here.  They haven't gone bust yet,
but they're into their 3rd or 4th round of VC (I've heard rumours
they've since gone pure-proprietary, but those are just rumours)

     M> ...  Several hundred dollars. Your comments in the above
     M> paragraph gloss over the facts in an attempt to rationalize
     M> what sounds like theft [I don't know anything about your
     M> software licensing, so this might not be applicable]. And you
     M> manage to add in a demeaning tone by marginalizing the
     M> royalties.

No, royalties are generally paid per-use, so a 3-day use of software
not-for-resale typically amounts to only a few dollars.  Of course,
I'm being hypothetical since there is no such clause in the 1.0 GPL
license we used; I was basing the comparison of fees on typical
per-unit license fees.

     M> I understand part of what you were saying, in that your
     M> contributions have value. Don't mistake theoretical benefits
     M> with actual dollar value.  Realize that your bugfix had more
     M> value to you than to Brendan.

Did it?  Was no one else interested in null fields?

I do a lot of work for non-profits.  In every case I tell them what I
have learned working 25 years in the non-profit industry: _Every_
contribution, no matter how small, has a dollar value that must be
measured at market rates.  If someone takes a box of garbage across
town to the dump-site, their effort is valued at the rate for cartage.

This is not to say that they must pay their volunteers (which would be
silly, quite apart from being impossible), just that proper accounting
is _everything_.  They need to get receipts for every donation.

Why?  Because of what governments call "matching grants".  If your
non-profit applies for federal or state/provincial money, this money
is often contingent on "matching private donations" ... and you can
probably guess the rest: A few trips to the dump totals a few hundred
dollars pretty fast, and taken across all the volunteers, the
community soon finds that their un-finance-able project actually has a
great deal of equity for barter.

The same is true of "free" software: It is not free beer, it is very
expensive beer.  The total market value to create Linux is an
astronomical sum; if you consider that, it is no surprise Linux can
rival NT.  Microsoft wastes their money on advertising, whereas Linux
spends every volunteer cent on development and QA.

     M> Furthermore there is a sentiment in your post that if you use
     M> software for some small quick job, then the author doesn't
     M> really deserve payment. As a software developer I find that
     M> abhorrant.

This depends, of course, on the license, but I commend you on your
ability to miss a point.

Where a license is on unlimited use, such as with Microsoft Office,
then it's $500 regardless how many times you use it.  Infrastructure
and patented software is typically sold with a hook into the per-use
or per unit sold so the author gets rich in proportion to the
licensee.  Considering this specific application was for high-profile
public display at the NYC Jakobs Center, and in front of a highly
tech-savvy buying audience, I might have negotiated JSX promotion in
lieu of actual money changing hands ;)

My point being, however, that no one, not even Microsoft, can license
any software for more than a tiny, tiny fraction of development costs
unless that software is heavily patented and absolutely vital.  Even
MSOffice can be had for unlimited use for less than a few days wages.

Software costs in medical/scientific equipment can be inflated, as can
controller software for highly specialized devices.  Serializing
objects would be a far more difficult case: JSX was so vital, OpenCola
walked away from it.

     >> _That_, my friend, is how open source works.  We all bring what
     >> we can to make wonderful things happen. Open source is not
     >> about my profiting from your work, it is about software that
     >> helps us _both_ do our jobs

     M> You miss a very important point. Brendan isn't here to make
     M> opensource software. He is here to make a living and considers
     M> opensource a vehicle to that end.

That is, of course, his decision.  I release my software GPL or LGPL,
but I don't _require_ everyone do the same.  I have, however, watched
dozens of projects fail because they are trying to "make money from
free software" and IMHO, based my own experience and those of the
hundreds of interviews I did for RadioWallStreet during the dotcom
boom, this is an ultra-difficult business model.  And that was during
the dotcom _boom_.  Ok, my sample is small, and the impossible happens
every day, but I might have more experience than most in this market
and my experience says it's a red herring, a pipe dream.  Even RedHat
and Mandrake found they could not stay in the black simply selling
free software, and both have broadened their base to begin /using/
that software in their money-making projects.

Very, very few have made the selling-free-software business model
work, and those who do have been very complex components not easily
replicated (Sendmail comes to mind).  Everyone is entitled to their
opinion, and mine is that this approach is highly unlikely to succeed.

The only opensource model which does succeed, hand has a high
probability of success, is the sort you see in XFree, Linux, Apache
and Java: the software is created and maintained by people who need it
to do their day-job.  The work is a community effort, and all expenses
are shared.  This keeps development and QA costs low while all other
revenue models are equal to the closed source competitors -- the math
is quite simple.

     M> If Sun required a license fee for usage of Java then Brendan
     M> would have to pay. They do not, so he owes them nothing, and
     M> therefore won't pay.  Your question shows you lack of
     M> comprehension of basic economics and contract law.

Thank you.

     M> So you convinced your client to open up there software so that
     M> they would receive additional QA

Perhaps you should re-read what I wrote.  There is no implied
expectation in their action.  The QA we received was a gift, and was
unsolicited.  It was nonetheless valuable.

     >> suing _you_ for unpaid royalties.  That's _precisely_ the
     >> meaning of the GPL, and why it is so long and so painfully
     >> precise.

     M> No one else could take JSX and patent it since Brendan has
     M> prior art (JSX itself).

So who is showing lack of comprehension of the basic _realities_ of
the law now?  Who would fund Brendan while he fought this?

Any idea how many European webhosting companies were pushed out of
business by BT's claim to have patented the hyperlink?

     M> I have no idea what activities you've been involved in, so I
     M> can't say what you are, but after reading your post I
     M> immediately though how it nicely sums up the freeloader
     M> problem.

Thank you.  I'll add that to my resume.

And best of luck with your make-money-developing-free-software
business model -- when you do solve it, please do write it up and I'll
make sure it's published in a respected business journal because you
are going to become /ultra/ famous, and /I/ am going to get rich being
your agent ;) Oh, I'll also introduce you to some heavy VC too, the
8-figure kind, because I know some that would just /love/ to meet you.

All kidding aside, the choice is, of course, Brendan's.  He holds the
copyright by virtue of the prior art, and that gives him the right
to change his mind about the license whenever he likes.  From what's
been posted here lately, the whole issue of debate is probably moot.

--
Gary Lawrence Murphy <garym@...> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)

#1121 From: Gary Lawrence Murphy <garym@...>
Date: Fri Mar 1, 2002 9:25 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
revg
Send Email Send Email
 
>>>>> "e" == egroups yow <egroups_yow> writes:

     e> ... If we don't keep a polite tone, the discussion is less
     e> likely to yield valuable insights...

Development is a stressful job, and if we can't vent at collegues,
well then who can we vent on?  I'm sure Mark means no malice, and I
certainly don't, but that doesn't mean he and I should not be
passionate about our beliefs.

Besides, butting heads improves circulation.

     e> I think that if a company gets an enormous commercial benefit
     e> from using GPL code, that they should makes some contribution
     e> back.  It's hard to know what the balance is.

There is a Japanese saying "When a house is filled with rights, there
is no room for gifts" -- I think the $2B IBM has spent on Linux is
the answer to your question: Guilt is far more powerful for forcing
compliance than the law ... otherwise we'd have no need of patent
lawyers.

Or the contributions of SGI, HP, CreativeLabs and others to Linux
(whether or not Linus accepts their patches, their patches are still
available to anyone who needs what they needed)

    The American composer John Cage was fond of collecting stories
    where anarchy was more profitable than the Rule of Law.  One of his
    favourites was when the NYC toll booth operators were on strike and
    the booths actually collected _more_ money because most people did
    not have exact change, there was no operator to give them change,
    so they just tossed in what they had. Never underestimate the
    "freeloaders". Never lose faith in humanity.

     e> That's why I've given up, just stuck with the GPL.  Hopefully,
     e> the poll, and proposed license and discussions will shed more
     e> light on it.

Something struck me yesterday. I've thought of it before, but it
surfaced again yesterday still with no answer: Is it legal to license
Java code under the GPL?  Wouldn't the GPL rules technically require
the Java library (also linked to your code) to be also GPL?  (Isn't
that why the FSF are developing a cleanroom re-implementation of it?)

I don't expect I will every be sued by Sun for releasing my Java work
as GPL, but I do wonder what "linking" means in the Java sense of the
world.  The whole notion of licensing is so fuzzy, I actually find
it riotously amusing, but that's probably because I hung around Cage
and his friends too long ;)

   As a historical footnote, John, in his youth, was giving a recital
   and wanted to use a piece of music by the then-dead composer Erik
   Satie -- he was told he would have to license the work, and being
   a young modern composer in the between-wars California, he barely
   had two pennies he could rub together let alone money to spend on
   an abstraction like a royalty to a dead man.

   So John wrote an original piece, now famous, called Cheap Imitation.
   The work was created by taking the Satie piece and randomly changing
   the pitch of each note while retaining the rhythm and phrasing of
   the original.  John was delighted when a publisher let him copyright
   the work --- John probably hung around Marcel Duchamp way too much.

     e> Please, no flaming!  ;-)

Aww ... just a little?

But no death threats, ok?

--
Gary Lawrence Murphy <garym@...> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)

#1122 From: Gary Lawrence Murphy <garym@...>
Date: Fri Mar 1, 2002 10:00 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
revg
Send Email Send Email
 
>>>>> "e" == egroups yow <egroups_yow> writes:

     e> SUPPORT: I put a tremendous amount of work into JSX, and I
     e> think the on-demand technical support is far superior to what
     e> you would pay for, for many commercial packages.  True?

No.  I do not feel I have the right to phone you up in the middle of
the night and yell at you, and to demand that you fix something
right f*cking now.  Instead, I feel like JSX is a gift, so I show
respect for the gift and graciousness for the support.

In the world of offering service, most customers are polite, but
many are not.  They get unreasonable real fast.  They get your
phone number and you've had it.  Ask anyone who has worked for
technical support hotlines.

What if you do find some use for JSX that is going to pay you a
comfortable income, but has a tight schedule, but then someone
to whom you licensed the software has their own crunch.  yes, they
have no legal right to push you, but that does not mean they won't
try psychological means, intimidation, or anything else.

Hey, even peaceloving me has actually yelled at Microsoft technical
support droogs.  It felt good then, but I felt bad afterward.  That's
what life is like in the service industry.

     e> DELIVERABLES: Regarding scheduled delieverables - (most) bugs
     e> get fixed very quickly, and extra functionality is also added.
     e> You can't say I don't listen to my users!

Again, it's a gift.  So the enjoyment is more.  What if you had the
flu, or whatever.  When money is involved, expectations go way high.

     e> And did JSX help your application?  More importantly, did you
     e> get a bug-fix that helped your application?

Oh yes, but again, it's the difference between a gift and a right.
Did I thank you for the fix?  (Well, I _meant_ to ;)

     e> Bug report or bug fix?  It seems a bit odd to say that it was
     e> "kind" of you to report a bug, if you got a bug-fix out of it
     e> pretty quickly, and for free, don't you think?  ;-)

There's a young man who has joined our SportPage project; he's new
to QA, but that's what he wants to do for a job, so that's what I'm
more than eager to accept from him.  His first tests were a little
naiive, but his second test were much better and his third found
a bug.  I'm grateful for all three.

My point, though, was that I find bugs in Netscape all the time, or
did until I could finally abandon it, but I never reported one.  I
reported it to you because it got in my way, but for that app, I had
no real need of JSX, I could have serialized objects any old way
(I was writing both sides of the connection and it was throw-away
code after the Jakob's display) ... but I wanted OpenCola to think
about JSX and what it could do later in their P2P work.

     e> Obviously, this is a very different case from JSX, which is
     e> eminently reusable - that's what it was designed for.  It's not
     e> a spin-off from some other money-making project.  It *is* the
     e> money- making project.

As much as I wish you success, I remain skeptical of that business
model.  It worked for Sendmail, but it's hard to find good examples
for things that are as hidden as JSX.

     e> Perhaps the question is really for you: "If JSX helps you do
     e> your job, why should you care?"

And that's a very good question.  My correct answer is "it depends" :)
If JSX is the _only_ way to do it, then yes, if the job must be done,
we license it.  Right now, the /only/ licensed code we use in our shop
is QuickBooks and the Windows it runs on because there are /no/ free
alternatives which will handle our accounting needs /and/ interoperate
with the corporate accounting firm who handles our taxes.  If anyone
were to solve that, we'd switch in an instant, but no one is even
close (and I try them all).  I'd even be happy with licensing an
alternative if it just worked under Linux so we could at least get rid
of that last Windows box.

     e> I understand that your business is set-up to use GPL - some
     e> other open source license wouldn't work so well.  Because of
     e> this, it wouldn't really make sense for you to use a non-GPL
     e> JSX, no matter how good it was in terms of value for money.  It
     e> just wouldn't fit in with how you work.

Again, it depends.  Given the choice, I do GPL work.  Given the choice
between work and starvation, I've written my share of proprietary and
even patented code (ISDN switches, OODBMS systems, stuff like that)

     e> However, I do think that money-making is important - I believe
     e> in reward for effort that creates value.  I think it's also a
     e> good example for others.  But perhaps a different model would
     e> be better: - service agreement, for support and documentation.

This was the approach RedHat and Mandrake (and others) thought would
work, but it didn't.  All of them eventually turned to professional
services (ie, doing what I do, applying opensource to solving business
problems)

     e> Another approach is for a specific application to be built on
     e> top of JSX as the engine (or "platform") - if this was really a
     e> very simple, slot-in solution for a specific problem, then it
     e> would be worth a lot to companies

That's what I would do, or rather, what I do.  I can't afford to take
the time off to write such a beast, so I will take a string of
contracts selected because each provides funding for another component
of my plan.  By stringing these together, I can get to the point where
I have a completed thing that I can peddle elsewhere.

     e> Finally - I am thinking of a cheaper license for consultants
     e> who make an application for another company, that will only be
     e> used in-house.  This is distribution, and if it does not
     e> include source code etc, it is not allowed under the GPL.  It
     e> would make sense for this license to include some kind of
     e> service agreement, as a motive to purchase.

Keep in mind that (a) you will likely always know more about JSX than
anyone else and (b) paying their own people to learn what you know is
less cost effective than hiring you.  This gets you into the support
market, which is not a big money maker, but it gets you introductions.

The very best, IMHO, is to have a product which rides on JSX, and to
be able to sell the application of that product to large numbers.
This is where RedHat went, and where Sourceforge, VALinux, and IBM
went with opensource. I'm not there, but after 22 years doing the
professional services bit (where the money stops flowing the instant
the job is complete) I'm convinced the service-industry is
non-sustainable (I have to stop someday) and has to be replaced with
the product model.

It's the old Henry Ford story: Craftsmanship (ie professional
services) is all well and good, but mass production is the means to
sustained wealth.  In the case of JSX, only a handful of people will
understand what it does, and only a handful of those will ever hear of
it, so the market is tiny; the dual-license in that situation cuts the
tiny market even smaller.  Conversely, folded into a consumer item
(like taking onboard computer output from the car and relaying it over
wireless to the service shop) is something millions could buy, and
_that's_ where you want your dual-license to apply, or better still,
you want to own the whole thing.

In that scenario, there is another advantage to GPL: If a commercial
use is also GPL, it's fine and we all win. But .. if someone wants to
mix JSX with non-GPL code, they have to negotiate a new license.  GPL
is your ticket to viral marketing, but _also_ your protection against
exploitation.

For the really big deals, the license probably does not matter: If
Ford does not want Chrysler to have the code, they will want to patent
it, but they cannot without first purchasing the copyright from you --
and in that situation, you will name your own price.

--
Gary Lawrence Murphy <garym@...> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)

#1123 From: JSX-ideas@yahoogroups.com
Date: Fri Mar 1, 2002 12:54 pm
Subject: File - faq.txt
JSX-ideas@yahoogroups.com
Send Email Send Email
 
JSX FAQ - 14 November 2001
=======

JSX instantly XML-enables applications, by re-implementing the Serialization
API for XML.

FAQ Contents:
(1). Background
(2). Using the Serialization API
(3). Using JSX

If your question is not answered here, please try the homepage:
   http://www.csse.monash.edu.au/~bren/JSX/
or mailing list:
   http://groups.yahoo.com/group/JSX-ideas/messages

------------------------------------------------------------------------------


(1). Background
===============

(1.1) JSX stands for...?
Java Serialization to XML

(1.2) What does JOS stand for?
Java Object Serialization (sometimes referred to as "Java's own Serialization")

(1.3) What are the uses of JSX?
  - Long-term persistence - XML can be modified directly.
  - A transparent protocol for communicating between different components,
that is easy to debug, and able to cope with different objects.
  - Configuration files.
  - A debugging tool - dumping object state.

(1.4) What are the benefits of JSX?
  - A human-readable form of normally invisible objects
  - A human-edtiable form, for entering and editing objects
  - A human-comprehendible wire/file protocol for object and data exchange
between other applications and languages

(1.5) What are the goals of JSX?
To be able to instantly XML-enable applications, without needing to change
them at all.
  - to produce a "human comprehendible" XML representation of object graphs,
that is readable and robust under human edits.
  - in the long-term, to help users handle the inevitable evolution of objects

  - a direct JOS replacement.
  - replaceable *by* JOS.  Thus, JSX should not pollute the Serialization API -
and so JSX can only add functionality through its constructors, using the
Config object.





(2). Using the Serialization API
================================

(2.1). Where's a good tutorial?
"Advanced Object Serialization", by John Zukowski (August 2001)
   http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/

(2.2). How do I write my own readObject() and writeObject() methods?
Here's the signatures:
   private void readObject(ObjectInputStream ois)
     throws ClassNotFoundException, IOException {
       //your code here
   }
   private writeObject(ObjectOutputStream oos)
     throws IOException {
       //your code here
   }


(2.3). How do I use GetField?
It can only be used within a readObject() method that you have coded for your
class, and is called by the serialization system.

See example in:
   http://developer.java.sun.com/developer/technicalArticles/ALT/serialization/
It's almost halfway through, under the heading: "Using ObjectStreamField"



(3). Using JSX
==============

(3.1). How do I use Config?

Config is used to configure JSX for both input and output.  You create the
Config object, set it, and then pass it into the constructor of either an
ObjIn or ObjOut.  For example:

   Config cfg = new Config().setNoSuchFieldHandler(handler).setFormatting(false);
   ObjectInputStream in = new ObjIn(cfg); //pass it in

Note that the option setting can be chained.  Check the source code
(Config.java) for more options.

For the above example, "handler" is used like an event handler.  A common
approach is to subclass the default implementation with your own anonymous
class:

   NoSuchFieldHandler handler = new NoSuchFieldHandler() {
     public String noSuchField(Class c, String fieldName) {
       if (c==TheClassName.class && fieldName.equals("theOldFieldName") )
         return "theNewFieldName";
       else
         throw new NoSuchFieldException("No mapping for "+theOldFieldName+" in
"+c);
     }
   };
//NOTE: instead of "if" above, use a Hashtable or HashMap for more complex cases
//Eg. could use two: first tier maps classes to HashMaps, which in turn maps
//old fieldnames to new fieldnames.

#1124 From: Mark Collette <mcollett@...>
Date: Sat Mar 2, 2002 3:41 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
mark_collette
Send Email Send Email
 
Gary Lawrence Murphy wrote:
>
> >>>>> "M" == Mark Collette <mcollett@...> writes:
>
>     M> Gary Lawrence Murphy wrote:
>     >>  Respectfully, and not to pick a fight, but just to be real,
>     >> JSX has already _profitted_ from my commercial use of it.
>
>     M> First of all, when you submitted the bug to Brendan, it was
>     M> under the agreement that there would be no economic
>     M> compensation, so he owes you nothing.
>
> I was just illustrating a point; that point being how free software
> benefits all participants in ways that are easily translated into hard
> dollars.

There is a big difference between showing that effort is equivalent do
money for accounting purposes and saying that someone owes you money so
it's alright to take something from them to compensate yourself.


>     M> ...  Several hundred dollars. Your comments in the above
>     M> paragraph gloss over the facts in an attempt to rationalize
>     M> what sounds like theft [I don't know anything about your
>     M> software licensing, so this might not be applicable]. And you
>     M> manage to add in a demeaning tone by marginalizing the
>     M> royalties.
>
> No, royalties are generally paid per-use, so a 3-day use of software
> not-for-resale typically amounts to only a few dollars.  Of course,
> I'm being hypothetical since there is no such clause in the 1.0 GPL
> license we used; I was basing the comparison of fees on typical
> per-unit license fees.

We're talking about JS which has clear licensing terms, not some
theoretically vague example. JSX is not pay per use, it is pay per
developer.


>     M> I understand part of what you were saying, in that your
>     M> contributions have value. Don't mistake theoretical benefits
>     M> with actual dollar value.  Realize that your bugfix had more
>     M> value to you than to Brendan.
>
> Did it?  Was no one else interested in null fields?
>
> I do a lot of work for non-profits.  In every case I tell them what I
> have learned working 25 years in the non-profit industry: _Every_
> contribution, no matter how small, has a dollar value that must be
> measured at market rates.  If someone takes a box of garbage across
> town to the dump-site, their effort is valued at the rate for cartage.
>
> This is not to say that they must pay their volunteers (which would be
> silly, quite apart from being impossible), just that proper accounting
> is _everything_.  They need to get receipts for every donation.
>
> Why?  Because of what governments call "matching grants".  If your
> non-profit applies for federal or state/provincial money, this money
> is often contingent on "matching private donations" ... and you can
> probably guess the rest: A few trips to the dump totals a few hundred
> dollars pretty fast, and taken across all the volunteers, the
> community soon finds that their un-finance-able project actually has a
> great deal of equity for barter.

Another example of how your line of thinking is valid about something
else, but not for JSX. Brendan is not a not-for-profit seeking
government funding. He is not trying to keep accounting books of market
values of domations. He wants as many royalties as will be paid so that
he can eat and sleep under shelter. The value your bugfix added was
incremental to him, but fixed a show-stopper for you. Do you see the
difference? Bot have value, but not equivalent value.


>     M> Furthermore there is a sentiment in your post that if you use
>     M> software for some small quick job, then the author doesn't
>     M> really deserve payment. As a software developer I find that
>     M> abhorrant.
>
> This depends, of course, on the license, but I commend you on your
> ability to miss a point.
>
> Where a license is on unlimited use, such as with Microsoft Office,
> then it's $500 regardless how many times you use it.  Infrastructure
> and patented software is typically sold with a hook into the per-use
> or per unit sold so the author gets rich in proportion to the
> licensee.  Considering this specific application was for high-profile
> public display at the NYC Jakobs Center, and in front of a highly
> tech-savvy buying audience, I might have negotiated JSX promotion in
> lieu of actual money changing hands ;)
>
> My point being, however, that no one, not even Microsoft, can license
> any software for more than a tiny, tiny fraction of development costs
> unless that software is heavily patented and absolutely vital.  Even
> MSOffice can be had for unlimited use for less than a few days wages.
>
> Software costs in medical/scientific equipment can be inflated, as can
> controller software for highly specialized devices.  Serializing
> objects would be a far more difficult case: JSX was so vital, OpenCola
> walked away from it.

So maybe you disagree with JSX's commercial license? Maybe you think it
should or should not be per use or per developer. These are all valid
considerations for Brendan to mull over, and I'm sure he appreciates
your input. But, what I was getting at was that JSX's license is not the
same as Microsofts or any other thing you just said. It has specific
terms which don't care how many days the software you use it is itself
in use. I didn't like how you connoted that since it was only used for a
few days, then no license fee was due. I don't care what Microsoft's
license is, that's irrelavent to JSX's license.


>     >> _That_, my friend, is how open source works.  We all bring what
>     >> we can to make wonderful things happen. Open source is not
>     >> about my profiting from your work, it is about software that
>     >> helps us _both_ do our jobs
>
>     M> You miss a very important point. Brendan isn't here to make
>     M> opensource software. He is here to make a living and considers
>     M> opensource a vehicle to that end.
>
> That is, of course, his decision.  I release my software GPL or LGPL,
> but I don't _require_ everyone do the same.  I have, however, watched
> dozens of projects fail because they are trying to "make money from
> free software" and IMHO, based my own experience and those of the
> hundreds of interviews I did for RadioWallStreet during the dotcom
> boom, this is an ultra-difficult business model.  And that was during
> the dotcom _boom_.  Ok, my sample is small, and the impossible happens
> every day, but I might have more experience than most in this market
> and my experience says it's a red herring, a pipe dream.  Even RedHat
> and Mandrake found they could not stay in the black simply selling
> free software, and both have broadened their base to begin /using/
> that software in their money-making projects.
>
> Very, very few have made the selling-free-software business model
> work, and those who do have been very complex components not easily
> replicated (Sendmail comes to mind).  Everyone is entitled to their
> opinion, and mine is that this approach is highly unlikely to succeed.

Right. This is why I'm not for the GPL. I have no interest in Brendan's
JSX efforts failing. I'm not arguing for him to give away his software
at all.


>     M> So you convinced your client to open up there software so that
>     M> they would receive additional QA
>
> Perhaps you should re-read what I wrote.  There is no implied
> expectation in their action.  The QA we received was a gift, and was
> unsolicited.  It was nonetheless valuable.

The point was that Brendan has no interest is his project having a life
of its own, apart from him. The rest was explaining the difference. What
your client's motivation was, was not intrinsic to my point.


>     >> suing _you_ for unpaid royalties.  That's _precisely_ the
>     >> meaning of the GPL, and why it is so long and so painfully
>     >> precise.
>
>     M> No one else could take JSX and patent it since Brendan has
>     M> prior art (JSX itself).
>
> So who is showing lack of comprehension of the basic _realities_ of
> the law now?  Who would fund Brendan while he fought this?
>
> Any idea how many European webhosting companies were pushed out of
> business by BT's claim to have patented the hyperlink?

And the GPL would magically protect Brendan, how? Besides hoping that
the EFF would jump in, then it doesn't matter if he uses his license or
the GPL, they are both equally legally binding.


> And best of luck with your make-money-developing-free-software
> business model -- when you do solve it, please do write it up and I'll
> make sure it's published in a respected business journal because you
> are going to become /ultra/ famous, and /I/ am going to get rich being
> your agent ;) Oh, I'll also introduce you to some heavy VC too, the
> 8-figure kind, because I know some that would just /love/ to meet you.

As stated above I have not been endorsing giving away the software for
free, which was why I've attempted  to support an alternative approach
to the GPL. I think you're reading Brendan's ideas into my writing.


Mark Collette

#1125 From: Mark Collette <mcollett@...>
Date: Sat Mar 2, 2002 3:45 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
mark_collette
Send Email Send Email
 
Gary Lawrence Murphy wrote:
>
> >>>>> "e" == egroups yow <egroups_yow> writes:
>
>     e> ... If we don't keep a polite tone, the discussion is less
>     e> likely to yield valuable insights...
>
> Development is a stressful job, and if we can't vent at collegues,
> well then who can we vent on?  I'm sure Mark means no malice, and I
> certainly don't, but that doesn't mean he and I should not be
> passionate about our beliefs.
>
> Besides, butting heads improves circulation.

Absolutely correct. Any harshness in my writing is undoubtedly due to
the stress of my major essay I was writing, while preparing for my final
exam, while buying my condominium, while packing to move, and already
being broke before having to pay for everything. For that, I apoligise.

Mark Collette

#1126 From: JSX-ideas@yahoogroups.com
Date: Sun Mar 3, 2002 2:35 am
Subject: Poll results for JSX-ideas
JSX-ideas@yahoogroups.com
Send Email Send Email
 
The following JSX-ideas poll is now closed.  Here are the
final results:


POLL QUESTION: If JSX was available under a non-GPL
open source license that prevented
commercial use, how would it affect you?

CHOICES AND RESULTS
- I'd stop using JSX, because I need to distribute it as part of my GPL project,
2 votes, 15.38%
- No problem, as long as I can still use it., 0 votes, 0.00%
- No problem, but I'd still want the source code so I can fix bugs, customize
and learn more about it., 3 votes, 23.08%
- I'm using it commercially, so I'd just buy a license., 0 votes, 0.00%
- It would not feel so good. Although it would still be open, it would be less
open, and so I wouldn't like it., 0 votes, 0.00%
- I'd be concerned that there would be fewer bug-reports and contributions., 1
votes, 7.69%
- I contributed some bug reports to JSX, thinking it was GPL. Although it would
still be available non-commercially, I'd feel betrayed., 1 votes, 7.69%
- I'd like it, because it would solve the free-rider problem., 0 votes, 0.00%
- I would be less likely to contribute., 1 votes, 7.69%
- I would be more likely contribute., 0 votes, 0.00%
- I would be less likely to recommend JSX, 2 votes, 15.38%
- I would be more likely to reccommend JSX., 0 votes, 0.00%
- My company is very cautious about the GPL, and so we'd welcome the change, 1
votes, 7.69%
- Our company likes the idea of open source bug reports and peer review, so we'd
be less likely to use it., 2 votes, 15.38%



For more information about this group, please visit
http://groups.yahoo.com/group/JSX-ideas

For help with Yahoo! Groups, please visit
http://help.yahoo.com/help/us/groups/

#1127 From: Gary Lawrence Murphy <garym@...>
Date: Sun Mar 3, 2002 2:44 am
Subject: Re: [JSX] Proposed open source license (non-commercial)
revg
Send Email Send Email
 
>>>>> "M" == Mark Collette <mcollett@...> writes:

     M> And the GPL would magically protect Brendan, how? Besides
     M> hoping that the EFF would jump in, then it doesn't matter if he
     M> uses his license or the GPL, they are both equally legally
     M> binding.

http://www.gnu.org/philosophy/enforcing-gpl.html

--
Gary Lawrence Murphy <garym@...> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)

#1128 From: Mark Collette <mcollett@...>
Date: Sun Mar 3, 2002 8:31 pm
Subject: Re: [JSX] Proposed open source license (non-commercial)
mark_collette
Send Email Send Email
 
Gary Lawrence Murphy wrote:
>
> >>>>> "M" == Mark Collette <mcollett@...> writes:
>
>     M> And the GPL would magically protect Brendan, how? Besides
>     M> hoping that the EFF would jump in, then it doesn't matter if he
>     M> uses his license or the GPL, they are both equally legally
>     M> binding.
>
> http://www.gnu.org/philosophy/enforcing-gpl.html

Perhaps I wan't clear. You were saying that even with Brendan having
copyright and prior art and his own license that he'd still need money
to defend himself in court if someone tried to screw hime over, and so
he should use the GPL. My response was not saying that the GPL in
unenforceable. It was that his own license would be as enforceable, and
neither would magically pay his legal fees, so using the GPL offers no
more protection than his own license.

Mark Collette

#1129 From: Gary Lawrence Murphy <garym@...>
Date: Mon Mar 4, 2002 10:54 pm
Subject: Re: [JSX] Proposed open source license (non-commercial)
revg
Send Email Send Email
 
>>>>> "M" == Mark Collette <mcollett@...> writes:

     M> Perhaps I wan't clear. You were saying that even with Brendan
     M> having copyright and prior art and his own license that he'd
     M> still need money to defend himself in court if someone tried to
     M> screw hime over, and so he should use the GPL.

Yes, that is exactly what I was saying.  You still must go to court,
armed with your prior art proof, and convince a judge.  That costs
money to do.  It does not matter if you are right or wrong.

     M> My response was not saying that the GPL in unenforceable. It
     M> was that his own license would be as enforceable

That page does not only say the GPL is enforceable, it says that the
FSF expend their own resources to enforce the GPL; if just one case of
the GPL were to fail, their entire org would be in jeopardy.  That
page explains that they have yet to need to take it to court, as that
webpage explains, because most often all it takes is a phonecall from
their lawyer.  Would a phonecall from my rural lawyer be taken as
seriously? (I'd still have to pay my lawyer to make the call, and for
his time spent understanding why it is I want him to make it, so that's
maybe about $500 just to get that far!)

My knowledge of the mechanics of IP law comes second hand, from the
writings of Richard Buckminster Fuller, the inventor of the geodesic
dome.  Bucky relates one day receiving a phonecall from a patent
lawyer who said "We cannot find a loophole in your patent, so we'd
like to arrange a license" and that's when it hit Bucky that finding
ways around licensing contracts was the primary _role_ of patent
lawyers.

I read recently of yet another university campus that pulled all music
trading software from their network after a threat of legal action
from a small company of self-appointed IP lawyers who were acting _on_
_behalf_ of Sony.  As in the BT cases (which recently made headlines
again in the UK Times), when faced with the choice of a policy change
or a legal battle, most cave in to the pressure not because they agree
with the suit, but because they cannot afford to fight.

My lawyer is not a big name and is a free agent not aligned with any
partnership.  He costs $150/hr.  Filing papers for the courts
generally costs money, and the actual audience with a judge costs
money.  Life in court is a crapshoot: If the judge likes your
opponents lawyers more than yours, you're looking at paying for an
appeal.

If you can afford to spend thousands to defend yourself in court, that's
great, and more power to you.  I can't, so I depend on the weight of
the FSF to do it for me.

--
Gary Lawrence Murphy <garym@...> TeleDynamics Communications Inc
Business Innovations Through Open Source Systems: http://www.teledyn.com
"Computers are useless.  They can only give you answers."(Pablo Picasso)

#1130 From: <noreply@...>
Date: Wed Mar 6, 2002 11:15 am
Subject: [fmII] Java Serialization for XML 1.0.1 released (Default branch)
noreply@...
Send Email Send Email
 
This email is to inform you of release '1.0.1' of 'Java Serialization for
XML' through freshmeat.net. All URLs and other useful information can be
found at http://freshmeat.net/projects/jsx/

The changes in this release are as follows:
DTDs are now generated. These DTDs can be used by third parties to
validate JSX XML before submitting it to you and may be used for
comparing old and new DTDs to see how your Java classes have changed
(i.e. schema evolution).

Project description:
Java Serialization for XML (JSX) facilitates the upgrading of user
configurations for new versions of applications. JSX allows you to
translate configuration data into XML. The user's configuration can
then be updated by standard tools like XSLT and DOM. Since JSX
automatically translates all Collection objects and object references,
it is the ideal data binder for this task.

If you would like to cancel subscription to releases of this project, login
to freshmeat.net and choose 'home' from the personal menubar at the top of
the page. You'll be presented with a list of projects you're subscribed to
in the right column, which you may cancel by highlighting the project in
question and clicking the 'delete' button.

Sincerely,
freshmeat.net

#1131 From: Kevin Day <kevin@...>
Date: Mon Mar 11, 2002 3:23 pm
Subject: Implementation idea/request
kevin@...
Send Email Send Email
 
Hello-

Just trying out the JSX - very impressive! I will probably be interested in licensing it.

One issue that is keeping me from using it, though, is that it doesn't look like JSX supports the writeReplace and readResolve serialization functions - is this true, or am I doing something wrong? I use these functions quite a bit for the framework I'm developing.

Also, I've been considering OpenSourcing part of my application (sorry, can't do the whole thing...) - I've got a pretty slick persistence engine that I think people could make use of. How has your experience been?

Thanks in advance,

Kevin


Kevin Day
Trumpet, Inc.
www.trumpetinc.com
kevin@...
480-705-6885

------------------------------------------------------------------------------- ------------


#1133 From: Kevin Day <kevin@...>
Date: Mon Mar 11, 2002 9:24 pm
Subject: Bug Report & fix
kevin@...
Send Email Send Email
 
Just did some examination of the source code and figured out why my writeReplace() method was getting ignored.

It turns out that, in the writeReplace() method of XMLSerialize, there were a couple of problems (I've fixed them in the source code below if anyone wants to take advantage of my fixes). The problems, in summary, were:
1. The getDeclaredMethod() method of Class only returns methods for the current class in the hierarchy, not super classes. My writeReplace() method is defined in a super class - thus it wasn't getting called by JSX, while it was being called by the default serialization protocol.
2. An exception was being thrown if the "replaced" object was not compatible with the object being written. This actually IS legal (see the serialization specs), as long as the proxy object restores a compatible object with its readResolve method.

One final question, I am getting a warning "We just got an exception when creating magic14..." in my error console from a call to a static block of code in the MagicClass class. - I've looked at the source code, and it seems that the error is getting handled properly. Can I safely ignore this?

Thanks, much - enjoy the code below (and please let me know if I may have accidentally broken something with my changes :-) ).

- Kevin Day
Trumpet, Inc.
www.trumpetinc.com

/** --------------------------------------------------------------- ------------
* writeReplace
* ------------
* Reflectively invoke the present objects's writeReplace().
* From the perspective of the XML stream, the replacement object (the one
* that this routine returns) is the only one that ever existed.
* "parameterless" = no-arg
* This routine has a pattern that seems *very* similar to readResolve().
* It may be worth factoring something out. Defer until another
* reflexive invocation is required.
**/
Object writeReplace(Object me) throws ObjectStreamException {
try {
Class replacedClass = me.getClass();
// Kevin Day (Trumpet, Inc) - revised the following section to handle writeReplace() methods
// in super classes. This routine will now pick up ANY writeReplace()
// method in the current class (i.e. private, etc...). If it finds
// none, it looks for PUBLIC writeReplace() methods in the super classes.
// If we wanted to find all writeReplace() methods in the super classes,
// we would have to iterate over the class hierarchy, calling getMethod().
// This would probably be slow, and is not needed - the serializable API
// states that this method MUST be public.
Method writeReplaceMethod = null;
try{
writeReplaceMethod = replacedClass.getDeclaredMethod(
"writeReplace", new Class[]{});
}
catch (NoSuchMethodException e){
writeReplaceMethod = replacedClass.getMethod(
"writeReplace", new Class[]{});
}

writeReplaceMethod.setAccessible(
true);
Object newme = writeReplaceMethod.invoke(me,
new Object[]{}); //no arg
// Kevin Day (Trumpet, Inc.) - Removed the following if() statement. It IS legal for
// an object to pass back an object in its writeReplace method
// that is not compatible with itself, as long as the "replaced"
// object deserializes back to a compatible object (i.e. using the
// readReslove() method.
// if ( !(me.getClass().isAssignableFrom(newme.getClass())) ) //ie go back
// throw new ClassCastException("The writeReplace() method of class '"+
// replacedClass.getName() +"' returned an object of type '"+
// newme.getClass().getName() +"'.");
// //would it be more efficient to initialize all these exceptions at
// //load time? Or better to create JIT, only as needed?
return newme;
}
catch (NoSuchMethodException e) {
//Not an error - just means that it doesn't implement readResolve
return me; //if no writeReplace - the object is simply unchanged!
} catch (IllegalAccessException e) {
System.err.println(
"IllegalAccessException - this shouldn't happen, since we did setAccessible(). Perhaps security on the JVM precludes it?");
e.printStackTrace();
return me; //just continue on - what would be a better thing to do?
} catch (InvocationTargetException e) {
System.err.println(
"JSX InvocationTargetException:");
//e.printStackTrace(); //not sure how this should be handled...
//is this the best way to handle it? What does Serialization do?
//Probably best to throw whatever is thrown.
try {
throw (ObjectStreamException) e.getTargetException(); //uncork it
//contract of writeReplace guarantees that it only throws this class
//However, neither the compiler nor ObjectOutputClass checks this.
//Since this is a compile-time kind of thing, it is reasonable that
//ObjectOutputClass does not check it, but only runtime problems...
//Is the situation different for things like readObject() being private?
} catch (ClassCastException f) {
throw new Error("writeReplace() of "+me.getClass()+ " threw an '"+e.getTargetException()+ font style="font-family:'Courier';font-size:9.7pt;" color="#2A00FF">"'. It should only be of type ObjectStreamException");
}
//unreachable - can't to get here.
}
//let all other Exceptions through - esp ClassCastException! - for caller
//to handle.
}



Kevin Day
Trumpet, Inc.
www.trumpetinc.com
kevin@...
480-705-6885

------------------------------------------------------------------------------- ------------


#1134 From: Kevin Day <kevin@...>
Date: Tue Mar 12, 2002 2:43 am
Subject: JSX and writeReplace/readResolve - bug fix
kevin@...
Send Email Send Email
 
OK - final email regarding JSX and writeReplace/readResolve.-

My previous post with the fix for writeReplace is only 1/2 the solution. The readResolve method in XMLDeserialize had a similar issue with it (although it looks like an attempt was made to fix it by beginning a traverse up the class tree - it just didn't go far enough).

Again, the fix below is only kind of consistent with the Java serialization spec - the super class implementation of readResolve could, theoretically, be marked as private, in which case even this code wouldn't get it to work - but it seems that the performance tradeoff of having the walk the entire class hierarchy vs. using a call to getMethod() might be worth it.

I'm open to suggestions and comments!

- Kevin Day
Trumpet, Inc.

/** --------------------------------------------------------------- ------------
* readResolve
* -----------
* Reflectively invoke the present objects's readResolve().
* Return value can be: an object or an exception. We are using an
* Exception to flag the result, instead of trying to encode it in the
* return value itself (by wrapping it, for example - which is sort of how
* Exceptions work, anyway.
* QUESTION: If we checked for it separately, we can choose whether to cache
* or not...
* "parameterless" = no-arg
**/
Object readResolve(Object me, String alias) throws ObjectStreamException {
if (READRESOLVE_DEBUG)
System.err.println(
"entered readResolve, with "+me+" and alias="+alias);
try {
Method readResolveMethod =
null;
try {

readResolveMethod = me.getClass().getDeclaredMethod("readResolve", new Class[]{});

} catch (NoSuchMethodException e) {
//Not an error - just means that it doesn't implement readResolve
if (READRESOLVE_DEBUG)
System.err.println(
"No readResolve() found - checking super");
// Kevin Day (Trumpet, Inc.) - Change getDeclaredMethod to getMethod() if this class does not itself
// specify readResolve. This allows readResolve() to be found in super classes, if it is declared public (which it should be).
try {
readResolveMethod = me.getClass().getMethod(
"readResolve", new Class[]{});
}
catch (NoSuchMethodException e2) { //of super
return me; //forget it - invoke nothing
}
if (!checkSuperMethodAccess(readResolveMethod, me.getClass()))
return me; //forget it - invoke nothing
}//end of super - method is now set correctly
readResolveMethod.se tAccessible(true);
Object newme = readResolveMethod.invoke(me,
new Object[]{}); //no arg
updateAlias(newme, alias); //only need to update if it really is new.
if (READRESOLVE_DEBUG)
System.err.println(
"readResolve returned "+newme);
return newme; //if no readResolve - the object is simply unchanged!

} catch (InvocationTargetException e) {
System.err.println(
"JSX InvocationTargetException:");
//e.printStackTrace(); //not sure how this should be handled...
//is this the best way to handle it? What does Serialization do?
//Probably best to throw whatever is thrown.
try {
throw (ObjectStreamException) e.getTargetException(); //uncork it
//contract of readResolve guarantees that it only throws this class
//I should check that it *does* throw only this kind...
} catch (ClassCastException f) {
throw new Error("readResolve() of "+me.getClass()+ " threw an '"+e.getTargetException()+ font style="font-family:'Courier';font-size:9.7pt;" color="#2A00FF">"'. It should only be of type ObjectStreamException");
}
}
catch (Exception e) {
System.err.println(
"not an InvocationTargetException");
e.printStackTrace();
}
return null; //to signal some error.
}

Kevin Day
Trumpet, Inc.
www.trumpetinc.com
kevin@...
480-705-6885

------------------------------------------------------------------------------- ------------


#1135 From: "egroups_yow" <bren@...>
Date: Wed Mar 13, 2002 4:11 am
Subject: Re: Problem of jsx1.0 with jdk1.4
egroups_yow
Send Email Send Email
 
Hi rkv,

Thanks for your bug report, and sorry to take so long to reply - I
just wanted to let you know that I've seen your post, and hope to be
able to look into it properly soon.  However, there are lots of other
things happening right now, so it may take a while.  I'm sorry about
this - the business side of JSX really needs to expand, to cope with
the workload.

> It is deserialized for the first time with an error
> statement "We just got an exception when creating
> magic14..."
This message is not actually an exception itself, just some debugging
information that was left in the beta.  It is now removed, and so
will not appear in the next release.  You can safely ignore this
message.

> All files work well with jdk1.3 but with jdk1.4 only
> small files work well and a big file involved with
> some complexities generates problems.
It is most probable that your big file contains some classes that
are causing some problems for the 1.4 release.  The best thing for
you to do is to post the exact JSX XML file that causes problems,
including the complete stack trace.


Cheers,
Brendan

#1136 From: "egroups_yow" <bren@...>
Date: Wed Mar 13, 2002 4:25 am
Subject: Re: JSX 1.0 Problem
egroups_yow
Send Email Send Email
 
Hi Steffen,

Thanks a lot for following up on this issues, and I'm really sorry to
have taken so long to respond - especially since you submitted
this bug report before (although I don't remember seeing it).

> 1. JSX barfs on deleted fields (fields which were serialized, but
> are no longer in the deserialized class). It should ignore them
> like the jdk does.
Actually, this one is fixed up - see
    NoSuchFieldHandler.java
    Config.java
The second is used to pass in the NoSuchFieldHandler.

There was also an example on the technical web-site to do with this.
You might need to check back several releases to find it, or check
the "history" page (see link at top of technical page) for when it
was released.

I note that your code uses getField().   This might be the cause.

> 2. JSX doesn't call my readObject() methods. I don't know why.
This is very strange!  Are you sure? Eg have you added in a println,
to see?

Also, checking your code, the whole issue of primitive types
changing doesn't arise in JSX, because JSX automatically converts to
whatever type is required, and throws an exception if it can't be
converted.

Posting the XML generated, and a stack trace could help too.

I hope to have time soon to try out your code.


Cheers,
Brendan

#1137 From: "egroups_yow" <bren@...>
Date: Wed Mar 13, 2002 4:37 am
Subject: Re: JSX and writeReplace/readResolve - bug fix
egroups_yow
Send Email Send Email
 
Hi Kevin,

Thanks a lot for your bug report and subsequent fix!

Thanks especially for your diagnosis of the writeReplace/readResolve
working together, so that the written type need not be
compatible with the expected type.  This makes a lot of sense,
and confused me at the time.  I noticed that the JOS implementation
seemed to contradict the specs, but you made me realize that I
must have misread the specs - or perhaps I was looking at an
incorrect version? ;-)  Probably the former!

Your explanation also makes it possible to customise the JSX
output in a very convenient way, that I had wanted to, but had
thought that the specs forbid.  That is, to substitute one object
with a completely different "persistence" object, provided you had
routines to translate to and from that object.  This persistence
object could be a static inner class, so that it is local to the
translation code.

I think this is a  much better approach that explicitly writing out
custom data, because the fields are named, and not dependent on
order.  If part of the data was a list, it would be better to put
that part into an array, rather than writing it out.


So, thanks very much for your contribution!   I think that walking
the inheritance tree is the best approach, as the time spent there
is insignificant compared with other aspects of serialization.
However, the semantics of overriding writeReplace/readResolve are
*very* weird!  I don't think I ever became entirely clear on
exactly how they worked, because there are several differences from
conventional overriding...

I hope to be able to get back to you on this further, soon.


Cheers,
Brendan

#1138 From: Sergio Gabriel Josiowicz <sjosiowi@...>
Date: Wed Mar 13, 2002 2:35 pm
Subject: initializacion of new data member
sjosiowi@...
Send Email Send Email
 
Hello:
	 I am new in serialization with jsx.  I would like to know if there
is a way to initialize an object during the serialization. A simplified
example of my problem is that I have a class with 2 data member. I
serialized that class. Next I add a new variable and then I deserialized the
class. The problem is that the new added data member is initialized with
null, and I want to initialized that new variable with other value. Is there
a way to do it?

Thank you very much
Sergio Josiowicz

#1139 From: "egroups_yow" <bren@...>
Date: Wed Mar 13, 2002 11:59 pm
Subject: Re: initializacion of new data member
egroups_yow
Send Email Send Email
 
Hi Sergio,

> I would like to know if there
> is a way to initialize an object during the serialization.
Yes - add a "readObject(ObjectInputStream in)" method to
your object.  The first line of that method should be a call to:
   in.defaultReadObject();
That line will do all the standard stuff.

After this line, add your own initialization code.

For details, check the FAQ for JSX (in the "Files" section of the
web-based version of this mailing list, and also at the top of the
JSX technical page.)

You can also check Sun's javadocs for Serialization.  Since JSX
works *exactly* the same, any documentation applies equally well
to JSX.


Cheers,
Brendan

#1142 From: "rjdesilets" <rob@...>
Date: Mon Mar 18, 2002 6:20 am
Subject: JSX Performance
rob@...
Send Email Send Email
 
Hello,

I am in the process of getting my system converted from Java binary
serialization to XML serialization using JSX (and in the process of
purchasing a license for JSX).

When doing some testing, I noticed that a 750K serialized XML file
was taking ~43 seconds to deserialize, many many (many!) times faster
than the native serialization. I read some posts and I understand
that the XML deserialization is slower.

I did some further searching and it seems that if I added
a "Buffered" reader then it would increase my performance
drastically.

I believe that I have implemented the code correctly, but my
deserialization is still at 45 seconds, something that will be
unacceptable to my clients (they are used to 2-3 seconds).

Below is the code I am using to de-serialize. If anyone can tell me
what I am doing wrong, or can write a small example of serializing
and de-serializing an object using buffered objects (or has any other
suggestions), it would be greatly appreciated. I have been working
with Java for a few years (SWING) but this IO stuff still confuses
me ;)

Thanks.

Rob

---

My Code:

FileReader fi = new FileReader(file); // file is just a File object
BufferedReader bin = new BufferedReader(fi);
ObjIn in = new ObjIn(bin);
Contact contact = (Contact) in.readObject();
in.close();
bin.close();
fi.close();

#1143 From: Mark van der Kraan <m.van.der.kraan@...>
Date: Mon Mar 18, 2002 12:18 pm
Subject: RE: [JSX] JSX Performance
linksspringer
Send Email Send Email
 
Hi Rob,
I seem to remember that buffered reader was already
integrated into JSX. On a related note, when I get the
time I plan to test the performance of different XML-parsers
with JSX, for example, Piccolo (LGPL), to see if improvement
in that area is possible. I guess the quickest way to
get a really large test file is to serialize a Swing UI ;-)
Cheers,
Mark


-----Original Message-----
From: rjdesilets
Sent: Monday, March 18, 2002 7:21 AM
To: JSX-ideas@yahoogroups.com
Subject: [JSX] JSX Performance


Hello,

I am in the process of getting my system converted from Java binary
serialization to XML serialization using JSX (and in the process of
purchasing a license for JSX).

When doing some testing, I noticed that a 750K serialized XML file
was taking ~43 seconds to deserialize, many many (many!) times faster
than the native serialization. I read some posts and I understand
that the XML deserialization is slower.

I did some further searching and it seems that if I added
a "Buffered" reader then it would increase my performance
drastically.

I believe that I have implemented the code correctly, but my
deserialization is still at 45 seconds, something that will be
unacceptable to my clients (they are used to 2-3 seconds).

Below is the code I am using to de-serialize. If anyone can tell me
what I am doing wrong, or can write a small example of serializing
and de-serializing an object using buffered objects (or has any other
suggestions), it would be greatly appreciated. I have been working
with Java for a few years (SWING) but this IO stuff still confuses
me ;)

Thanks.

Rob

---

My Code:

FileReader fi = new FileReader(file); // file is just a File object
BufferedReader bin = new BufferedReader(fi);
ObjIn in = new ObjIn(bin);
Contact contact = (Contact) in.readObject();
in.close();
bin.close();
fi.close();

#1144 From: "egroups_yow" <bren@...>
Date: Mon Mar 18, 2002 10:37 pm
Subject: Re: JSX Performance
egroups_yow
Send Email Send Email
 
Hi Rob,

Yes, XML Serialization is slower, but you are right that it
shouldn't be 15-20 times slower...

It sounds like a buffering problem, and yet as Mark says, this is
already integrated into JSX (plus, your code looks fine, anyway).

A couple of things you could do to increase performance:
(1). Turn formatting off
------------------------
   Config cfg = new Config().setFormatted(false);
   ObjIn in = new ObjIn(bin, cfg);
This eliminates the indentation and newlines - depending on the
file, this can make a big difference.  Of course, it's harder to
read in a text editor; but an XML editor will supply its own
indentation.

(2). Turn super version off
---------------------------
   Config cfg = new Config().superVersion(false);
   ObjIn in = new ObjIn(bin, cfg);
This outputs an older, more compact version of JSX.  The
disadvantage is that it won't work for some Swing components - so
whether this helps or not depends on what you are serializing.

The quickest test might be to combine both:
   Config cfg = new Config()().setFormatted(false).superVersion(false);
   ObjIn in = new ObjIn(bin, cfg);

*However* - JSX is probably going to be around 5 times slower than
binary serialization, depending on your objects, no matter what we
do.  This performance might not be adequate for your users.

(3). Use JSX only when needed
-----------------------------
One suggestion is that you could use binary serializaion, and then
switch to JSX only when needed - this depends on why you want to use
XML.

For example, if you want to be able to upgrade deployed configuration
data, you could special-case serializing to XML only when an upgrade
is actually needed.  You would need access to the old classes of
your app, to deserialize the old binary, then serialize to XML,
update the XML for your new classes, then deserialize it with JSX.
Finally, you would serialize again to binary, for the daily version.
I know this is a lot more awkward, but it's a way to resolve the
performance/benefit trade-off.

Please let me know how much these suggestions help, and what
adequate performance (ie how many seconds would your users
tolerate?) - in the meantime maybe I can see other ways to improve
performance.  However, I believe that the best even a complete
optimization of JSX for speed could do would be a factor of 2 or 3.
Which is a pretty good improvement, but would take a while to
develop, and possibly would still be inadequate for your app.

However, using JSX only where it's needed could give you the best of
both worlds.


Cheers,
Brendan


> I believe that I have implemented the code correctly, but my
> deserialization is still at 45 seconds, something that will be
> unacceptable to my clients (they are used to 2-3 seconds).
>
> Below is the code I am using to de-serialize. If anyone can tell me
> what I am doing wrong, or can write a small example of serializing
> and de-serializing an object using buffered objects (or has any
other
> suggestions), it would be greatly appreciated. I have been working
> with Java for a few years (SWING) but this IO stuff still confuses
> me ;)
>
> Thanks.
>
> Rob
>
> ---
>
> My Code:
>
> FileReader fi = new FileReader(file); // file is just a File object
> BufferedReader bin = new BufferedReader(fi);
> ObjIn in = new ObjIn(bin);
> Contact contact = (Contact) in.readObject();
> in.close();
> bin.close();
> fi.close();

#1145 From: <noreply@...>
Date: Wed Mar 20, 2002 3:24 pm
Subject: [fmII] Java Serialization for XML 1.0.1.1 released (Default branch)
noreply@...
Send Email Send Email
 
This email is to inform you of release '1.0.1.1' of 'Java Serialization for
XML' through freshmeat.net. All URLs and other useful information can be
found at http://freshmeat.net/projects/jsx/

The changes in this release are as follows:
Reading has been accelerated up to x10 times for objects containing
very long strings. The DTD generated for application classes now uses
parameter entities, making it shorter and easier to read.

Project description:
Java Serialization for XML (JSX) facilitates the upgrading of user
configurations for new versions of applications. JSX allows you to
translate configuration data into XML. The user's configuration can
then be updated by standard tools like XSLT and DOM. Since JSX
automatically translates all Collection objects and object references,
it is the ideal data binder for this task.

If you would like to cancel subscription to releases of this project, login
to freshmeat.net and choose 'home' from the personal menubar at the top of
the page. You'll be presented with a list of projects you're subscribed to
in the right column, which you may cancel by highlighting the project in
question and clicking the 'delete' button.

Sincerely,
freshmeat.net

#1147 From: Nick Phillips <nwp@...>
Date: Wed Mar 27, 2002 2:59 am
Subject: Revisions of license
nwp@...
Send Email Send Email
 
You seem to be considering a "not for commercial use" license.

Nowhere do you define "commercial".


That's a problem.

Besides, many people think that some new license tha they've dreamed up
will be "best" for their product. In most cases they are mistaken, and
it leads to problems.


In any case, IMHO you are heading up the wrong track. You'd be better off
keeping the GPL for people (commercial or not) who are happy to continue
licensing under the GPL - repaying "in kind" rather than directly, and
introducing another "commercial" license for people who do not wish to be
compelled to distribute source, or comply with other terms of the GPL.

This kind of "dual-licensing" is common, and works a lot better than your
proposed license would.

That license would lead to JSX being dropped from freely-distributable
Linux distributions (such as Debian, for example), as it it just not
practical (or in some cases ethical) for them to include software with
hundreds of different licenses, particularly when those licenses discriminate
between different classes of user. Distributions need to be able to say
"you may do X and Y with this collection of software", and not have to
worry about who "you" are or what you might do with the software.

That in turn would lead to less use being made of JSX etc. etc.

If you want to shoot yourselves in the feet, arms, head, or wherever,
go right ahead ;)
--
Nick Phillips -- nwp@...
Stay away from hurricanes for a while.

#1151 From: "egroups_yow" <bren@...>
Date: Sat Mar 30, 2002 12:10 am
Subject: Re: Revisions of license
egroups_yow
Send Email Send Email
 
Hi Nick,

Thanks for your comments.

> In any case, IMHO you are heading up the wrong track. You'd
> be better off keeping the GPL for people (commercial or not)
> who are happy to continue licensing under the GPL - repaying
> "in kind" rather than directly, and introducing
> another "commercial" license for people who do not wish to
> be compelled to distribute source, or comply with other terms
> of the GPL.

This is exactly what we presently have (have a look at the website).

> This kind of "dual-licensing" is common, and works a lot better
> than your proposed license would.
Well, this was the very issue under discussion!  JSX is now
staying under the GPL.  This benefits the most people - except
for some aspects of business use, and of course for the JSX revenue
itself (in the short term).  The main thing is not "use" so much,
as the contributions of users, which the GPL encourages.

> That license would lead to JSX being dropped from freely-
> distributable Linux distributions (such as Debian, for example),
> as it it just not practical (or in some cases ethical) for them
> to include software with hundreds of different licenses,
> particularly when those licenses discriminate
> between different classes of user. Distributions need to be
> able to say "you may do X and Y with this collection of
> software", and not have to worry about who "you" are or what
> you might do with the software.
Yes, you are perfectly correct - though as far as I know, JSX is
not presently distributed with any Linux distributions.  Are you
sure it is?


> Nick Phillips -- nwp@l...
> Stay away from hurricanes for a while.
Thanks for the reminder! ;-)

Have a great Easter!


Cheers,
Brendan

#1152 From: Nandini V <nand_in_i@...>
Date: Mon Apr 1, 2002 4:35 am
Subject: event recorder
nand_in_i@...
Send Email Send Email
 
I have to develop an event recorder for java .
this has to capture all the keyboard and mouse events
for a particular application and when must be able to
replay the application automatically.
Please send me guidelines.I am still learning java
It should be able to work even in linux command line
mode
Thankyou

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/

Messages 1116 - 1152 of 2221   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help