Re: [one-users] Java OCA: poor choiche of Exception class

2011-04-28 Thread Carlos Martín Sánchez
Hi there,

The RuntimeException looks better to me.

The only thing I'm not sure about is why you deleted the 'throws'
declaration from Client.java.
Doing that, a client application is not forced to catch the connection
problem.
I think it's better to force the coder to be aware of this kind of problems,
and prepare a nice error dialog, or a re-try mechanism.

What do you think about using the RuntimeException and
'public Client() throws OpenNebulaConfigurationError' ?


Best regards,
Carlos.

--
Carlos Martín, MSc
Project Major Contributor
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org  | cmar...@opennebula.org


On Tue, Apr 12, 2011 at 10:10 AM, Gian Uberto Lauri  wrote:

> According to the last update in  issue #572
>
> > "r" == redmine   writes:
>
> r> Issue #572 has been updated by Ruben S. Montero.
>
> r> Target version changed from Release 2.2 to Release 2.4
>
> r> This is initially scheduled for 2.4
>
> does the OpenNebula team plan to  include my contribution in the code,
> and  if  yes, which  kind  of  exception  (the  Error or  the  Runtime
> Exception) ?
>
> I ask  this because I  am working on  a OVF aware  OCCI implementation
> that relies on the OCA API (for Venus-C)  and I wonder if I can use my
> modified code now or this spells trouble.
>
> Zeeshan, your opinion is welcome, too!
>
> --
> ing. Gian Uberto Lauri
> Ricercatore / Reasearcher
> Laboratorio Ricerca e Sviluppo / Research & Development Lab.
> Area Calcolo Distribuito / Distributed Computation Area
>
> gianuberto.la...@eng.it
>
> Engineering Ingegneria Informatica spa
> Corso Stati Uniti 23/C, 35127 Padova (PD)
>
> Tel. +39-049.8283.571 | main(){printf(&unix["\021%six\012\0"],
> Fax  +39-049.8283.569 |(unix)["have"]+"fun"-0x60);}
> Skype: gian.uberto.lauri  |  David Korn, AT&T Bell Labs
> http://www.eng.it |  ioccc best One Liner,
> 1987
> ___
> Users mailing list
> Users@lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] Java OCA: poor choiche of Exception class

2011-04-12 Thread Gian Uberto Lauri
According to the last update in  issue #572

> "r" == redmine   writes:

r> Issue #572 has been updated by Ruben S. Montero.

r> Target version changed from Release 2.2 to Release 2.4

r> This is initially scheduled for 2.4

does the OpenNebula team plan to  include my contribution in the code,
and  if  yes, which  kind  of  exception  (the  Error or  the  Runtime
Exception) ?

I ask  this because I  am working on  a OVF aware  OCCI implementation
that relies on the OCA API (for Venus-C)  and I wonder if I can use my
modified code now or this spells trouble.

Zeeshan, your opinion is welcome, too!

--
ing. Gian Uberto Lauri
Ricercatore / Reasearcher
Laboratorio Ricerca e Sviluppo / Research & Development Lab.
Area Calcolo Distribuito / Distributed Computation Area

gianuberto.la...@eng.it

Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD) 

Tel. +39-049.8283.571 | main(){printf(&unix["\021%six\012\0"], 
Fax  +39-049.8283.569 |(unix)["have"]+"fun"-0x60);}   
Skype: gian.uberto.lauri  |  David Korn, AT&T Bell Labs 

http://www.eng.it |  ioccc best One Liner, 1987 

___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] Java OCA: poor choiche of Exception class

2011-04-11 Thread Gian Uberto Lauri
> "CMS" == Carlos Martín Sánchez  writes:

CMS> Hi Gian Uberto, Thank you for your feedback. As you may know, we
CMS> use mainly our Ruby bindings for external tools and extensions,
CMS> so these comments about the Java API are very welcome.  Please
CMS> feel free to open a ticket in our development portal [1], along
CMS> with any other comments, suggestions or patches.

Ticket #572  has been created.  There are two  version of the  Error I
add. The  firs one uses  java.lang.Error that is more  appropriate but
breaks the  legacy code. A  second version  does not change  the class
name (is  an Error after  all) but extends RuntimeException  since you
should  not write  a  catch  code for  it,  you  should provide  valid
resources for the program to run correctly.

--
ing. Gian Uberto Lauri
Ricercatore / Reasearcher
Laboratorio Ricerca e Sviluppo / Research & Development Lab.
Area Calcolo Distribuito / Distributed Computation Area

gianuberto.la...@eng.it

Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD) 

Tel. +39-049.8283.571 | main(){printf(&unix["\021%six\012\0"], 
Fax  +39-049.8283.569 |(unix)["have"]+"fun"-0x60);}   
Skype: gian.uberto.lauri  |  David Korn, AT&T Bell Labs 

http://www.eng.it |  ioccc best One Liner, 1987 

___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] Java OCA: poor choiche of Exception class

2011-04-11 Thread Carlos Martín Sánchez
Hi Gian Uberto,

Thank you for your feedback. As you may know, we use mainly our Ruby
bindings for external tools and extensions, so these comments about the Java
API are very welcome.
Please feel free to open a ticket in our development portal [1], along with
any other comments, suggestions or patches.

Regards,
Carlos.

[1] http://dev.opennebula.org/

--
Carlos Martín, MSc
Project Major Contributor
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org  | cmar...@opennebula.org


On 4 April 2011 13:12, Gian Uberto Lauri  wrote:

> > "CC" == Gian Uberto Lauri  writes:
>
> CC> Hello, I just started to use OCA and immediately had the bad
> CC> surprise to find an "Exception" thrown by Client class
> CC> instantiation.
>
> One thing I forgot in the previous message:
>
> I  know people  in Apache  Software Foundation  do such  raw Exception
> throwing as  natinal sport, but in  my (again not so)  humble opinion,
> ASF  java  coders  are  next  in  line  after  the  Sirius  Cybernetic
> Corporation Marketing Division.
>
> --
> ing. Gian Uberto Lauri
> Ricercatore / Reasearcher
> Laboratorio Ricerca e Sviluppo / Research & Development Lab.
> Area Calcolo Distribuito / Distributed Computation Area
>
> gianuberto.la...@eng.it
>
> Engineering Ingegneria Informatica spa
> Corso Stati Uniti 23/C, 35127 Padova (PD)
>
> Tel. +39-049.8283.571 | main(){printf(&unix["\021%six\012\0"],
> Fax  +39-049.8283.569 |(unix)["have"]+"fun"-0x60);}
> Skype: gian.uberto.lauri  |  David Korn, AT&T Bell Labs
> http://www.eng.it |  ioccc best One Liner,
> 1987
> ___
> Users mailing list
> Users@lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


Re: [one-users] Java OCA: poor choiche of Exception class

2011-04-04 Thread Gian Uberto Lauri
> "CC" == Gian Uberto Lauri  writes:

CC> Hello, I just started to use OCA and immediately had the bad
CC> surprise to find an "Exception" thrown by Client class
CC> instantiation.

One thing I forgot in the previous message:

I  know people  in Apache  Software Foundation  do such  raw Exception
throwing as  natinal sport, but in  my (again not so)  humble opinion,
ASF  java  coders  are  next  in  line  after  the  Sirius  Cybernetic
Corporation Marketing Division.

--
ing. Gian Uberto Lauri
Ricercatore / Reasearcher
Laboratorio Ricerca e Sviluppo / Research & Development Lab.
Area Calcolo Distribuito / Distributed Computation Area

gianuberto.la...@eng.it

Engineering Ingegneria Informatica spa
Corso Stati Uniti 23/C, 35127 Padova (PD) 

Tel. +39-049.8283.571 | main(){printf(&unix["\021%six\012\0"], 
Fax  +39-049.8283.569 |(unix)["have"]+"fun"-0x60);}   
Skype: gian.uberto.lauri  |  David Korn, AT&T Bell Labs 

http://www.eng.it |  ioccc best One Liner, 1987 

___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org