RequestFactory error management

41 Aufrufe
Direkt zur ersten ungelesenen Nachricht

ungarida

ungelesen,
26.09.2011, 10:28:1326.09.11
an google-we...@googlegroups.com
Hi all,
the scenario is:
- I have an ententy with its requestfatory, which manages correctly constraints violations.
- I want also to catch an "SQLException" for a duplicate key and send an error message to the client.

From documentation is specified that onFailure callback "receives general failure notifications".

So I tought that the solution could be to use onSuccess callback putting the entity inside a wrapper RequestResult object.

But Requests can be parameterized with the following types:
  • Built-in value types: BigDecimal, BigInteger, Boolean, Byte, Enum, Character, Date, Double, Float, Integer, Long, Short, String, Void
  • Custom value types: any subclass of ValueProxy
  • Entity types: any subclass of EntityProxy
  • Collections: List<T> or Set<T>, where T is one of the above value or entity types

So my RequestResult should have a proxy interface which extends ValueProxy.

At this point I lost some piece because it seems to be too complicated.

Any ideas? 


Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten