Seam SVN: r11152 - branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-06-13 20:28:46 -0400 (Sat, 13 Jun 2009)
New Revision: 11152
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Controls.po
branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Jms.po
Log:
Italian translation
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Controls.po
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Controls.po 2009-06-13 00:06:44 UTC (rev 11151)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Controls.po 2009-06-14 00:28:46 UTC (rev 11152)
@@ -5,8 +5,8 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-04-07 12:39+0000\n"
-"PO-Revision-Date: 2009-04-17 11:03+0100\n"
+"POT-Creation-Date: 2009-06-13 23:52+0000\n"
+"PO-Revision-Date: 2009-06-14 02:22+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -79,25 +79,25 @@
#: Controls.xml:397
#: Controls.xml:414
#: Controls.xml:433
-#: Controls.xml:507
-#: Controls.xml:525
-#: Controls.xml:549
-#: Controls.xml:596
-#: Controls.xml:613
-#: Controls.xml:637
-#: Controls.xml:656
-#: Controls.xml:684
-#: Controls.xml:707
-#: Controls.xml:721
-#: Controls.xml:761
-#: Controls.xml:811
-#: Controls.xml:839
-#: Controls.xml:906
-#: Controls.xml:1012
-#: Controls.xml:1052
-#: Controls.xml:1098
-#: Controls.xml:1124
-#: Controls.xml:1256
+#: Controls.xml:512
+#: Controls.xml:530
+#: Controls.xml:554
+#: Controls.xml:601
+#: Controls.xml:618
+#: Controls.xml:642
+#: Controls.xml:661
+#: Controls.xml:689
+#: Controls.xml:712
+#: Controls.xml:726
+#: Controls.xml:766
+#: Controls.xml:816
+#: Controls.xml:844
+#: Controls.xml:911
+#: Controls.xml:1017
+#: Controls.xml:1057
+#: Controls.xml:1103
+#: Controls.xml:1129
+#: Controls.xml:1261
#, no-c-format
msgid "Description"
msgstr "Descrizione"
@@ -122,25 +122,25 @@
#: Controls.xml:403
#: Controls.xml:420
#: Controls.xml:439
-#: Controls.xml:513
-#: Controls.xml:531
-#: Controls.xml:555
-#: Controls.xml:601
-#: Controls.xml:618
-#: Controls.xml:643
-#: Controls.xml:663
-#: Controls.xml:689
-#: Controls.xml:712
-#: Controls.xml:728
-#: Controls.xml:769
-#: Controls.xml:816
-#: Controls.xml:844
-#: Controls.xml:951
-#: Controls.xml:1019
-#: Controls.xml:1063
-#: Controls.xml:1112
-#: Controls.xml:1135
-#: Controls.xml:1261
+#: Controls.xml:518
+#: Controls.xml:536
+#: Controls.xml:560
+#: Controls.xml:606
+#: Controls.xml:623
+#: Controls.xml:648
+#: Controls.xml:668
+#: Controls.xml:694
+#: Controls.xml:717
+#: Controls.xml:733
+#: Controls.xml:774
+#: Controls.xml:821
+#: Controls.xml:849
+#: Controls.xml:956
+#: Controls.xml:1024
+#: Controls.xml:1068
+#: Controls.xml:1117
+#: Controls.xml:1140
+#: Controls.xml:1266
#, no-c-format
msgid "Attributes"
msgstr "Attributi"
@@ -204,24 +204,24 @@
#: Controls.xml:391
#: Controls.xml:408
#: Controls.xml:425
-#: Controls.xml:496
-#: Controls.xml:518
-#: Controls.xml:536
-#: Controls.xml:588
-#: Controls.xml:606
-#: Controls.xml:629
-#: Controls.xml:648
-#: Controls.xml:677
-#: Controls.xml:694
-#: Controls.xml:738
-#: Controls.xml:804
-#: Controls.xml:832
-#: Controls.xml:899
-#: Controls.xml:999
-#: Controls.xml:1043
-#: Controls.xml:1088
-#: Controls.xml:1249
-#: Controls.xml:1273
+#: Controls.xml:501
+#: Controls.xml:523
+#: Controls.xml:541
+#: Controls.xml:593
+#: Controls.xml:611
+#: Controls.xml:634
+#: Controls.xml:653
+#: Controls.xml:682
+#: Controls.xml:699
+#: Controls.xml:743
+#: Controls.xml:809
+#: Controls.xml:837
+#: Controls.xml:904
+#: Controls.xml:1004
+#: Controls.xml:1048
+#: Controls.xml:1093
+#: Controls.xml:1254
+#: Controls.xml:1278
#, no-c-format
msgid "Usage"
msgstr "Utilizzo"
@@ -290,12 +290,12 @@
#: Controls.xml:387
#: Controls.xml:404
#: Controls.xml:421
-#: Controls.xml:514
-#: Controls.xml:532
-#: Controls.xml:602
-#: Controls.xml:644
-#: Controls.xml:690
-#: Controls.xml:713
+#: Controls.xml:519
+#: Controls.xml:537
+#: Controls.xml:607
+#: Controls.xml:649
+#: Controls.xml:695
+#: Controls.xml:718
#, no-c-format
msgid "None."
msgstr "Nessuno."
@@ -451,8 +451,8 @@
#. Tag: emphasis
#: Controls.xml:315
-#: Controls.xml:922
-#: Controls.xml:1058
+#: Controls.xml:927
+#: Controls.xml:1063
#, no-c-format
msgid "Configuration"
msgstr "Configurazione"
@@ -715,56 +715,63 @@
msgid "<literal>message</literal> — Message to show on failure."
msgstr "<literal>message</literal> — Messaggio da mostrare in presenza di errori."
+# rivedere
#. Tag: para
#: Controls.xml:452
#, no-c-format
+msgid "<literal>required</literal> — False will disable a check that a value at all is inputted in fields."
+msgstr "<literal>required</literal> — False disabiliterà un controllo per cui un valore viene inserito nei campi."
+
+#. Tag: para
+#: Controls.xml:457
+#, no-c-format
msgid "<literal>messageId</literal> — Message id to show on failure."
msgstr "<literal>messageId</literal> — L'id del messaggio da mostrare in presenza di errori."
#. Tag: para
-#: Controls.xml:457
+#: Controls.xml:462
#, no-c-format
msgid "<literal>operator</literal> — What operator to use when comparing the values Valid operators are:"
msgstr "<literal>operator</literal> — Quale operatore usare quando si comparano i valori. Gli operatori sono:"
#. Tag: para
-#: Controls.xml:462
+#: Controls.xml:467
#, no-c-format
msgid "<literal>equal</literal> — Validates that value.equals(forValue)"
msgstr "<literal>equal</literal> — Valida che value.equals(forValue)"
#. Tag: para
-#: Controls.xml:467
+#: Controls.xml:472
#, no-c-format
msgid "<literal>not_equal</literal> — Validates that !value.equals(forValue)"
msgstr "<literal>not_equal</literal> — Valida che !value.equals(forValue)"
#. Tag: para
-#: Controls.xml:472
+#: Controls.xml:477
#, no-c-format
msgid "<literal>greater</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue)> 0]]>"
msgstr "<literal>greater</literal> — <![CDATA[Valida che sia ((Comparable)value).compareTo(forValue)> 0]]>"
#. Tag: para
-#: Controls.xml:477
+#: Controls.xml:482
#, no-c-format
msgid "<literal>greater_or_equal</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue)>= 0]]>"
msgstr "<literal>greater_or_equal</literal> — <![CDATA[Valida che sia ((Comparable)value).compareTo(forValue)>= 0]]>"
#. Tag: para
-#: Controls.xml:482
+#: Controls.xml:487
#, no-c-format
msgid "<literal>less</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue) <0]]>"
msgstr "<literal>less</literal> — <![CDATA[Valida che sia ((Comparable)value).compareTo(forValue) <0]]>"
#. Tag: para
-#: Controls.xml:487
+#: Controls.xml:492
#, no-c-format
msgid "<literal>less_or_equal</literal> — <![CDATA[Validates that ((Comparable)value).compareTo(forValue) <= 0]]>"
msgstr "<literal>less_or_equal</literal> — <![CDATA[Valida che sia ((Comparable)value).compareTo(forValue) <= 0]]>"
#. Tag: programlisting
-#: Controls.xml:497
+#: Controls.xml:502
#, no-c-format
msgid ""
"<![CDATA[<h:inputText id=\"name\" value=\"#{bean.name}\"/>\n"
@@ -778,19 +785,19 @@
"</h:inputText>]]>"
#. Tag: literal
-#: Controls.xml:505
+#: Controls.xml:510
#, no-c-format
msgid "<s:validate>"
msgstr "<s:validate>"
#. Tag: para
-#: Controls.xml:508
+#: Controls.xml:513
#, no-c-format
msgid "A non-visual control, validates a JSF input field against the bound property using Hibernate Validator."
msgstr "Un controllo non visuale, valida un campo d'input JSF con la proprietà collegata usando Hibernate Validator."
#. Tag: programlisting
-#: Controls.xml:519
+#: Controls.xml:524
#, no-c-format
msgid ""
"<![CDATA[<h:inputText id=\"userName\" required=\"true\" \n"
@@ -806,19 +813,19 @@
"<h:message for=\"userName\" styleClass=\"error\" />]]>"
#. Tag: literal
-#: Controls.xml:523
+#: Controls.xml:528
#, no-c-format
msgid "<s:validateAll>"
msgstr "<s:validateAll>"
#. Tag: para
-#: Controls.xml:526
+#: Controls.xml:531
#, no-c-format
msgid "A non-visual control, validates all child JSF input fields against their bound properties using Hibernate Validator."
msgstr "Un controllo non visuale, valida tutti i campi d'input JSF con le proprietà collegate usando Hibernate Validator."
#. Tag: programlisting
-#: Controls.xml:537
+#: Controls.xml:542
#, no-c-format
msgid ""
"<![CDATA[<s:validateAll>\n"
@@ -864,49 +871,49 @@
"</s:validateAll>]]>"
#. Tag: title
-#: Controls.xml:544
+#: Controls.xml:549
#, no-c-format
msgid "Formatting"
msgstr "Formattazione"
#. Tag: literal
-#: Controls.xml:547
+#: Controls.xml:552
#, no-c-format
msgid "<s:decorate>"
msgstr "<s:decorate>"
#. Tag: para
-#: Controls.xml:550
+#: Controls.xml:555
#, no-c-format
msgid "\"Decorate\" a JSF input field when validation fails or when <literal>required=\"true\"</literal> is set."
msgstr "\"Decora\" un campo d'input JSF quando la validazione fallisce o quando è impostato <literal>required=\"true\"</literal>."
#. Tag: para
-#: Controls.xml:558
+#: Controls.xml:563
#, no-c-format
msgid "<literal>template</literal> — the facelets template to use to decorate the component"
msgstr "<literal>template</literal> — il template facelets da usare per decorare il componente"
#. Tag: para
-#: Controls.xml:564
+#: Controls.xml:569
#, no-c-format
msgid "<literal>enclose</literal> — if true, the template used to decorate the input field is enclosed by the element specified with the \"element\" attribute. By default this is a div element."
msgstr "<literal>enclose</literal> — se true, il template usato per decorare il campo d'input è racchiuso dall'elemento specificato con l'attributo \"element\". Di default questo è un elemento div."
#. Tag: para
-#: Controls.xml:572
+#: Controls.xml:577
#, no-c-format
msgid "<literal>element</literal> — the element to enclose the template used to decorate the input field. By default, the template is enclosed with a div element."
msgstr "<literal>element</literal> — l'elemento con cui racchiudere il template usato per decorare il campo d'input. Di default, il template è racchiuso con un elemento div."
#. Tag: para
-#: Controls.xml:579
+#: Controls.xml:584
#, no-c-format
msgid "<literal>#{invalid}</literal> and <literal>#{required}</literal> are available inside <literal>s:decorate</literal>; <literal>#{required}</literal> evaluates to <literal>true</literal> if you have set the input component being decorated as required, and <literal>#{invalid}</literal> evaluates to <literal>true</literal> if a validation error occurs."
msgstr "<literal>#{invalid}</literal> e <literal>#{required}</literal> sono disponibili dentro <literal>s:decorate</literal>; <literal>#{required}</literal> valuta <literal>true</literal> se si è impostato il componente input da decorare come richiesto, e <literal>#{invalid}</literal> valuta <literal>true</literal> se avviene un errore di validazione."
#. Tag: programlisting
-#: Controls.xml:589
+#: Controls.xml:594
#, no-c-format
msgid ""
"<![CDATA[<s:decorate template=\"edit.xhtml\">\n"
@@ -920,7 +927,7 @@
" </s:decorate>]]>"
#. Tag: programlisting
-#: Controls.xml:590
+#: Controls.xml:595
#, no-c-format
msgid ""
"<![CDATA[<ui:composition xmlns=\"http://www.w3.org/1999/xhtml\"\n"
@@ -974,19 +981,19 @@
"</ui:composition>]]>"
#. Tag: literal
-#: Controls.xml:594
+#: Controls.xml:599
#, no-c-format
msgid "<s:div>"
msgstr "<s:div>"
#. Tag: para
-#: Controls.xml:597
+#: Controls.xml:602
#, no-c-format
msgid "Render a HTML <literal><div></literal>."
msgstr "Generare un <literal><div></literal> HTML."
#. Tag: programlisting
-#: Controls.xml:607
+#: Controls.xml:612
#, no-c-format
msgid ""
"<![CDATA[<s:div rendered=\"#{selectedMember == null}\">\n"
@@ -998,43 +1005,43 @@
"</s:div>]]>"
#. Tag: literal
-#: Controls.xml:611
+#: Controls.xml:616
#, no-c-format
msgid "<s:span>"
msgstr "<s:span>"
#. Tag: para
-#: Controls.xml:614
+#: Controls.xml:619
#, no-c-format
msgid "Render a HTML <literal><span></literal>."
msgstr "Generare un <literal><span></literal> HTML."
#. Tag: para
-#: Controls.xml:622
+#: Controls.xml:627
#, no-c-format
msgid "<literal>title</literal> — Title for a span."
msgstr "<literal>title</literal> — Fornisce un titolo per uno span."
#. Tag: programlisting
-#: Controls.xml:630
+#: Controls.xml:635
#, no-c-format
msgid "<![CDATA[<s:span styleClass=\"required\" rendered=\"#{required}\" title=\"Small tooltip\">*</s:span>]]>"
msgstr "<![CDATA[<s:span styleClass=\"required\" rendered=\"#{required}\" title=\"Small tooltip\">*</s:span>]]>"
#. Tag: literal
-#: Controls.xml:635
+#: Controls.xml:640
#, no-c-format
msgid "<s:fragment>"
msgstr "<s:fragment>"
#. Tag: para
-#: Controls.xml:638
+#: Controls.xml:643
#, no-c-format
msgid "A non-rendering component useful for enabling/disabling rendering of it's children."
msgstr "Un componente non -rendering utile per abilitare/disabilitare il rendering dei suoi figli."
#. Tag: programlisting
-#: Controls.xml:649
+#: Controls.xml:654
#, no-c-format
msgid ""
"<![CDATA[<s:fragment rendered=\"#{auction.highBidder ne null}\">\n"
@@ -1046,33 +1053,33 @@
"</s:fragment>]]>"
#. Tag: literal
-#: Controls.xml:654
+#: Controls.xml:659
#, no-c-format
msgid "<s:label>"
msgstr "<s:label>"
#. Tag: para
-#: Controls.xml:657
+#: Controls.xml:662
#, no-c-format
msgid "\"Decorate\" a JSF input field with the label. The label is placed inside the HTML <literal><label></literal> tag, and is associated with the nearest JSF input component. It is often used with <literal><s:decorate></literal>."
msgstr "\"Decora\" un campo d'input JSF con l'etichetta. L'etichetta è messa dentro il tag HTML <literal><label></literal>, ed è associato al componente d'input JSF più vicino. E' spesso usato con <literal><s:decorate></literal>."
#. Tag: para
-#: Controls.xml:666
-#: Controls.xml:988
+#: Controls.xml:671
+#: Controls.xml:993
#, no-c-format
msgid "<literal>style</literal> — The control's style"
msgstr "<literal>style</literal> — Lo stile del controllo"
#. Tag: para
-#: Controls.xml:671
-#: Controls.xml:993
+#: Controls.xml:676
+#: Controls.xml:998
#, no-c-format
msgid "<literal>styleClass</literal> — The control's style class"
msgstr "<literal>styleClass</literal> — La classe di stile del controllo"
#. Tag: programlisting
-#: Controls.xml:678
+#: Controls.xml:683
#, no-c-format
msgid ""
"<![CDATA[<s:label styleClass=\"label\">\n"
@@ -1086,19 +1093,19 @@
"<h:inputText value=\"#{location.country}\" required=\"true\"/>]]>"
#. Tag: literal
-#: Controls.xml:682
+#: Controls.xml:687
#, no-c-format
msgid "<s:message>"
msgstr "<s:message>"
#. Tag: para
-#: Controls.xml:685
+#: Controls.xml:690
#, no-c-format
msgid "\"Decorate\" a JSF input field with the validation error message."
msgstr "\"Decora\" un campo d'input JSF con il messaggio d'errore di validazione."
#. Tag: programlisting
-#: Controls.xml:695
+#: Controls.xml:700
#, no-c-format
msgid ""
"<![CDATA[<f:facet name=\"afterInvalidField\">\n"
@@ -1116,91 +1123,91 @@
"</f:facet>]]>"
#. Tag: title
-#: Controls.xml:702
+#: Controls.xml:707
#, no-c-format
msgid "Seam Text"
msgstr "Seam Text"
#. Tag: literal
-#: Controls.xml:705
+#: Controls.xml:710
#, no-c-format
msgid "<s:validateFormattedText>"
msgstr "<s:validateFormattedText>"
#. Tag: para
-#: Controls.xml:708
+#: Controls.xml:713
#, no-c-format
msgid "Checks that the submitted value is valid Seam Text"
msgstr "Controlla che il valore inviato sia un Testo Seam valido."
#. Tag: literal
-#: Controls.xml:719
+#: Controls.xml:724
#, no-c-format
msgid "<s:formattedText>"
msgstr "<s:formattedText>"
#. Tag: para
-#: Controls.xml:722
+#: Controls.xml:727
#, no-c-format
msgid "Outputs <emphasis>Seam Text</emphasis>, a rich text markup useful for blogs, wikis and other applications that might use rich text. See the Seam Text chapter for full usage."
msgstr "Mostra come output <emphasis>Seam Text</emphasis>, un markup di testo utile per blog, wiki ed altre applicazioni che possono usare rich text. Vedere il capitolo di Seam Text per ulteriori informazioni."
#. Tag: para
-#: Controls.xml:731
+#: Controls.xml:736
#, no-c-format
msgid "<literal>value</literal> — an EL expression specifying the rich text markup to render."
msgstr "<literal>value</literal> — un'espressione EL che specifica il markup del testo rich da renderizzare."
#. Tag: programlisting
-#: Controls.xml:739
+#: Controls.xml:744
#, no-c-format
msgid "<![CDATA[<s:formattedText value=\"#{blog.text}\"/>]]>"
msgstr "<![CDATA[<s:formattedText value=\"#{blog.text}\"/>]]>"
#. Tag: emphasis
-#: Controls.xml:741
+#: Controls.xml:746
#, no-c-format
msgid "Example"
msgstr "Esempio"
#. Tag: title
-#: Controls.xml:756
+#: Controls.xml:761
#, no-c-format
msgid "Form support"
msgstr "Supporto per le form"
#. Tag: literal
-#: Controls.xml:759
+#: Controls.xml:764
#, no-c-format
msgid "<s:token>"
msgstr "<s:token>"
#. Tag: para
-#: Controls.xml:762
+#: Controls.xml:767
#, no-c-format
msgid "Produces a random token that is inserted into a hidden form field to help to secure JSF form posts against cross-site request forgery (XSRF) attacks. Note that the browser must have cookies enabled to submit forms that include this component."
msgstr "Produce un token casuale che viene inserito in un campo di form nascosta per aiutare rendere sicuro i post della form JSF contro attacchi cross-site request forgery (XSRF). Si noti che il browser deve avere abilitati i cookie per poter eseguire il submit delle form che includono questo componente."
#. Tag: para
-#: Controls.xml:772
+#: Controls.xml:777
#, no-c-format
msgid "<literal>requireSession</literal> — indicates whether the session id should be included in the form signature, hence binding the token to the session. This value can be set to false if the \"build before restore\" mode of Facelets is activated (the default in JSF 2.0). (default: false)"
msgstr "<literal>requireSession</literal> — indica se l'id di sessione debba essere incluso nella signature della form, da qui il binding del token alla sessione. Questo valore può essere impostato a false se viene attivata la modalità \"build before restore\" dei Facelets (di default in JSF 2.0). (Default: false)"
#. Tag: para
-#: Controls.xml:782
+#: Controls.xml:787
#, no-c-format
msgid "<literal>enableCookieNotice</literal> — indicates that a JavaScript check should be inserted into the page to verify that cookies are enabled in the browser. If cookies are not enabled, present a notice to the user that form posts will not work. (default: false)"
msgstr "<literal>enableCookieNotice</literal> — indica che deve essere inserito nella pagina un check JavaScript per verificare che i cookie siano abilitati nel browser. Se i cookie non sono abilitati, viene presentata all'utente una nota riportante che l'invio della form non è avvenuto. (Default: false)"
#. Tag: para
-#: Controls.xml:791
+#: Controls.xml:796
#, no-c-format
msgid "<literal>allowMultiplePosts</literal> — indicates whether to allow the same form to be submitted multiple times with the same signature (as long as the view does not change). This is a common need if the form is perform Ajax calls but not rerendering itself or, at the very least, the UIToken component. The preferred approach is to have the UIToken component rerendered on any Ajax call where the UIToken component would be processed. (default: false)"
msgstr "<literal>allowMultiplePosts</literal> — indica se consentire che la stessa form venga inviata più volte con la stessa signature (finché non cambia la vista). Questa è una necessità comune se la form esegue chiamate Ajax ma non rigenera se stessa o, almeno, il componente UIToken. L'approccio migliore è avere il componente UIToken rigenerato su ogni chiamata Ajax in cui il componente UIToken viene processato. (Default: false) "
#. Tag: programlisting
-#: Controls.xml:805
+#: Controls.xml:810
#, no-c-format
msgid ""
"<![CDATA[<h:form>\n"
@@ -1214,31 +1221,31 @@
"</h:form>]]>"
#. Tag: literal
-#: Controls.xml:809
+#: Controls.xml:814
#, no-c-format
msgid "<s:enumItem>"
msgstr "<s:enumItem>"
#. Tag: para
-#: Controls.xml:812
+#: Controls.xml:817
#, no-c-format
msgid "Creates a <literal>SelectItem</literal> from an enum value."
msgstr "Crea un <literal>SelectItem</literal> da un valore enum."
#. Tag: para
-#: Controls.xml:819
+#: Controls.xml:824
#, no-c-format
msgid "<literal>enumValue</literal> — the string representation of the enum value."
msgstr "<literal>enumValue</literal> — la rappresentazione stringa di un valore enum."
#. Tag: para
-#: Controls.xml:825
+#: Controls.xml:830
#, no-c-format
msgid "<literal>label</literal> — the label to be used when rendering the <literal>SelectItem</literal>."
msgstr "<literal>label</literal> — l'etichetta da usare per renderizzare il <literal>SelectItem</literal>."
#. Tag: programlisting
-#: Controls.xml:833
+#: Controls.xml:838
#, no-c-format
msgid ""
"<![CDATA[<h:selectOneRadio id=\"radioList\"\n"
@@ -1264,61 +1271,61 @@
"</h:selectOneRadio>]]>"
#. Tag: literal
-#: Controls.xml:837
+#: Controls.xml:842
#, no-c-format
msgid "<s:selectItems>"
msgstr "<s:selectItems>"
#. Tag: para
-#: Controls.xml:840
+#: Controls.xml:845
#, no-c-format
msgid "Creates a <literal>List<SelectItem></literal> from a List, Set, DataModel or Array."
msgstr "Crea una <literal>List<SelectItem></literal> daList, Set, DataModel o Array."
#. Tag: para
-#: Controls.xml:847
+#: Controls.xml:852
#, no-c-format
msgid "<literal>value</literal> — an EL expression specifying the data that backs the <literal>List<SelectItem></literal>"
msgstr "<literal>value</literal> — un'espressione EL che specifica i dati retrostanti a <literal>List<SelectItem></literal>"
#. Tag: para
-#: Controls.xml:854
+#: Controls.xml:859
#, no-c-format
msgid "<literal>var</literal>— defines the name of the local variable that holds the current object during iteration"
msgstr "<literal>var</literal>— definisce il nome della variabile locale che mantiene l'oggetto corrente durante l'iterazione"
#. Tag: para
-#: Controls.xml:860
+#: Controls.xml:865
#, no-c-format
msgid "<literal>label</literal> — the label to be used when rendering the <literal>SelectItem</literal>. Can reference the <literal>var</literal> variable."
msgstr "<literal>label</literal> — l'etichetta da usare per generare <literal>SelectItem</literal>. Può fare riferimento alla variabile <literal>var</literal>."
#. Tag: para
-#: Controls.xml:867
+#: Controls.xml:872
#, no-c-format
msgid "<literal>itemValue</literal> — Value to return to the server if this option is selected. Optional, by default the <literal>var</literal> object is used. Can reference the <literal>var</literal> variable."
msgstr "<literal>itemValue</literal> — Il valore da restituire al server se quest'opzione è selezionata. E' opzionale, di default viene usato l'oggetto <literal>var</literal>. Può fare riferimento alla variabile <literal>var</literal>."
#. Tag: para
-#: Controls.xml:876
+#: Controls.xml:881
#, no-c-format
msgid "<literal>disabled</literal> — if true the <literal>SelectItem</literal> will be rendered disabled. Can reference the <literal>var</literal> variable."
msgstr "<literal>disabled</literal> — se true il <literal>SelectItem</literal> verrà generato disabilitato. Può fare riferimento alla variabile <literal>var</literal>."
#. Tag: para
-#: Controls.xml:884
+#: Controls.xml:889
#, no-c-format
msgid "<literal>noSelectionLabel</literal> — specifies the (optional) label to place at the top of list (if <literal>required=\"true\"</literal> is also specified then selecting this value will cause a validation error)."
msgstr "<literal>noSelectionLabel</literal> — specifica l'etichetta (opzionale) da mettere in cima alla lista (se è specificato anche <literal>required=\"true\"</literal> allora selezionando questo valore può causare una validazione d'errore)."
#. Tag: para
-#: Controls.xml:892
+#: Controls.xml:897
#, no-c-format
msgid "<literal>hideNoSelectionLabel</literal> — if true, the <literal>noSelectionLabel</literal> will be hidden when a value is selected"
msgstr "<literal>hideNoSelectionLabel</literal> — se true, <literal>noSelectionLabel</literal>verrà nascosto quando viene selezionato il valore."
#. Tag: programlisting
-#: Controls.xml:900
+#: Controls.xml:905
#, no-c-format
msgid ""
"<![CDATA[<h:selectOneMenu value=\"#{person.age}\" \n"
@@ -1332,31 +1339,31 @@
"</h:selectOneMenu>]]>"
#. Tag: literal
-#: Controls.xml:904
+#: Controls.xml:909
#, no-c-format
msgid "<s:fileUpload>"
msgstr "<s:fileUpload>"
#. Tag: para
-#: Controls.xml:907
+#: Controls.xml:912
#, no-c-format
msgid "Renders a file upload control. This control must be used within a form with an encoding type of <literal>multipart/form-data</literal>, i.e:"
msgstr "Renderizza un controllo per l'upload del file. Questo controllo deve essere usato dentro la form con tipo di codifica <literal>multipart/form-data</literal>, cioè:"
#. Tag: programlisting
-#: Controls.xml:913
+#: Controls.xml:918
#, no-c-format
msgid "<![CDATA[<h:form enctype=\"multipart/form-data\">]]>"
msgstr "<![CDATA[<h:form enctype=\"multipart/form-data\">]]>"
#. Tag: para
-#: Controls.xml:915
+#: Controls.xml:920
#, no-c-format
msgid "For multipart requests, the Seam Multipart servlet filter must also be configured in <literal>web.xml</literal>:"
msgstr "Per richieste multiple, in <literal>web.xml</literal> deve essere configurato il filtro servlet Seam Multipart :"
#. Tag: programlisting
-#: Controls.xml:920
+#: Controls.xml:925
#, no-c-format
msgid ""
"<![CDATA[<filter>\n"
@@ -1380,31 +1387,31 @@
"</filter-mapping>]]>"
#. Tag: para
-#: Controls.xml:924
+#: Controls.xml:929
#, no-c-format
msgid "The following configuration options for multipart requests may be configured in components.xml:"
msgstr "Le seguenti opzioni di configurazioni per richieste multipart possono essere configurate in components.xml:"
#. Tag: para
-#: Controls.xml:931
+#: Controls.xml:936
#, no-c-format
msgid "<literal>createTempFiles</literal> — if this option is set to true, uploaded files are streamed to a temporary file instead of in memory."
msgstr "<literal>createTempFiles</literal> — se quest'opzione è impostata a true, i file caricati vengono accodati in un file temporaneo invece che in memoria."
#. Tag: para
-#: Controls.xml:938
+#: Controls.xml:943
#, no-c-format
msgid "<literal>maxRequestSize</literal> — the maximum size of a file upload request, in bytes."
msgstr "<literal>maxRequestSize</literal> — dimensione massima della richiesta di upload file, in byte."
#. Tag: para
-#: Controls.xml:945
+#: Controls.xml:950
#, no-c-format
msgid "Here's an example:"
msgstr "Ecco un esempio:"
#. Tag: programlisting
-#: Controls.xml:949
+#: Controls.xml:954
#, no-c-format
msgid ""
"<![CDATA[<component class=\"org.jboss.seam.web.MultipartFilter\">\n"
@@ -1418,37 +1425,37 @@
"</component>]]>"
#. Tag: para
-#: Controls.xml:954
+#: Controls.xml:959
#, no-c-format
msgid "<literal>data</literal> — this value binding receives the binary file data. The receiving field should be declared as a <literal>byte[]</literal> or <literal>InputStream</literal> (required)."
msgstr "<literal>data</literal> — questo value binding riceve i dati binari. Il campo ricevente deve essere dichiarato come <literal>byte[]</literal> o <literal>InputStream</literal> (richiesto)."
#. Tag: para
-#: Controls.xml:962
+#: Controls.xml:967
#, no-c-format
msgid "<literal>contentType</literal> — this value binding receives the file's content type (optional)."
msgstr "<literal>contentType</literal> — questo value binding riceve il contenuto del file (opzionale)."
#. Tag: para
-#: Controls.xml:968
+#: Controls.xml:973
#, no-c-format
msgid "<literal>fileName</literal> — this value binding receives the filename (optional)."
msgstr "<literal>fileName</literal> — questo value binding riceve il nome del file (opzionale)."
#. Tag: para
-#: Controls.xml:974
+#: Controls.xml:979
#, no-c-format
msgid "<literal>fileSize</literal> — this value binding receives the file size (optional)."
msgstr "<literal>fileSize</literal> — questo valore di binding riceve la dimensione del file (opzionale)."
#. Tag: para
-#: Controls.xml:980
+#: Controls.xml:985
#, no-c-format
msgid "<literal>accept</literal> — a comma-separated list of content types to accept, may not be supported by the browser. E.g. <literal>\"images/png,images/jpg\"</literal>, <literal>\"images/*\"</literal>."
msgstr "<literal>accept</literal> — una lista separata da virgola con i tipi di contenuto da accettare, può non essere supportata dal browser. Esempio: <literal>\"images/png,images/jpg\"</literal>, <literal>\"images/*\"</literal>."
#. Tag: programlisting
-#: Controls.xml:1000
+#: Controls.xml:1005
#, no-c-format
msgid ""
"<![CDATA[<s:fileUpload id=\"picture\" data=\"#{register.picture}\" \n"
@@ -1460,43 +1467,43 @@
" contentType=\"#{register.pictureContentType}\" />]]>"
#. Tag: title
-#: Controls.xml:1007
+#: Controls.xml:1012
#, no-c-format
msgid "Other"
msgstr "Altro"
#. Tag: literal
-#: Controls.xml:1010
+#: Controls.xml:1015
#, no-c-format
msgid "<s:cache>"
msgstr "<s:cache>"
#. Tag: para
-#: Controls.xml:1013
+#: Controls.xml:1018
#, no-c-format
msgid "Cache the rendered page fragment using JBoss Cache. Note that <literal><s:cache></literal> actually uses the instance of JBoss Cache managed by the built-in <literal>pojoCache</literal> component."
msgstr "Mette nella cache il frammento di pagina renderizzato usando JBoss Cache. Si noti che <literal><s:cache></literal> in verità usa l'istanza di JBoss Cache gestita dal componente predefinito <literal>pojoCache</literal>."
#. Tag: para
-#: Controls.xml:1022
+#: Controls.xml:1027
#, no-c-format
msgid "<literal>key</literal> — the key to cache rendered content, often a value expression. For example, if we were caching a page fragment that displays a document, we might use <literal>key=\"Document-#{document.id}\"</literal>."
msgstr "<literal>key</literal> — la chiave per memorizzare (cache) il contenuto renderizzato, spesso un'espressione di valore. Per esempio, se si mette nella cache un frammento di pagina che mostra un documento, si può usare <literal>key</literal> —"
#. Tag: para
-#: Controls.xml:1030
+#: Controls.xml:1035
#, no-c-format
msgid "<literal>enabled</literal> — a value expression that determines if the cache should be used."
msgstr "<literal>enabled</literal> — un'espressione di valore che determina se la cache debba essere usata."
#. Tag: para
-#: Controls.xml:1036
+#: Controls.xml:1041
#, no-c-format
msgid "<literal>region</literal> — a JBoss Cache node to use (different nodes can have different expiry policies)."
msgstr "<literal>region</literal> — un node JBoss Cache da usare (nodi differenti possono avere differenti policy di scadenza)."
#. Tag: programlisting
-#: Controls.xml:1044
+#: Controls.xml:1049
#, no-c-format
msgid ""
"<![CDATA[<s:cache key=\"entry-#{blogEntry.id}\" region=\"pageFragments\">\n"
@@ -1532,19 +1539,19 @@
"</s:cache>]]>"
#. Tag: literal
-#: Controls.xml:1050
+#: Controls.xml:1055
#, no-c-format
msgid "<s:resource>"
msgstr "<s:resource>"
#. Tag: para
-#: Controls.xml:1053
+#: Controls.xml:1058
#, no-c-format
msgid "A tag that acts a file download provider. It must be alone in the JSF page. To be able to use this contol, web.xml must be set up as follows."
msgstr "Un tag che agisce come fornitore di download dei file. Deve essere il solo nella pagina JSF. Per essere in grado di usare questo controllo, web.xml deve essere impostato come segue."
#. Tag: programlisting
-#: Controls.xml:1060
+#: Controls.xml:1065
#, no-c-format
msgid ""
"<![CDATA[<servlet>\n"
@@ -1568,37 +1575,37 @@
"]]>"
#. Tag: para
-#: Controls.xml:1066
+#: Controls.xml:1071
#, no-c-format
msgid "<literal>data</literal> — Data that should be downloaded. May be a java.util.File, an InputStream or a byte array."
msgstr "<literal>data</literal> — I dati da downloadare. Può essere java.util.File, InputStream o un byte array."
#. Tag: para
-#: Controls.xml:1072
+#: Controls.xml:1077
#, no-c-format
msgid "<literal>fileName</literal> — Filename of the file to be served"
msgstr "<literal>fileName</literal> — Nome del file da servire"
#. Tag: para
-#: Controls.xml:1077
+#: Controls.xml:1082
#, no-c-format
msgid "<literal>contentType</literal> — content type of the file to be downloaded"
msgstr "<literal>contentType</literal> — tipo di contenuto del file da scaricare"
#. Tag: para
-#: Controls.xml:1082
+#: Controls.xml:1087
#, no-c-format
msgid "<literal>disposition</literal> — disposition to use. Default is inline"
msgstr "<literal>disposition</literal> — disposizione da usare. Di default è inline"
#. Tag: para
-#: Controls.xml:1089
+#: Controls.xml:1094
#, no-c-format
msgid "Here is an example on how to use the tag:"
msgstr "Ecco un esempio su come usare il tag:"
#. Tag: programlisting
-#: Controls.xml:1090
+#: Controls.xml:1095
#, no-c-format
msgid ""
"<![CDATA[<s:resource xmlns=\"http://www.w3.org/1999/xhtml\"\n"
@@ -1616,31 +1623,31 @@
"]]>"
#. Tag: para
-#: Controls.xml:1092
+#: Controls.xml:1097
#, no-c-format
msgid "The bean named <literal>resources</literal> is some backing bean that given some request parameters servers a specific file, see <literal>s:download</literal>."
msgstr "Il bean chiamato <literal>resources</literal> fornisce al file i parametri di richiesta del server, si veda <literal>s:download</literal>."
#. Tag: literal
-#: Controls.xml:1097
+#: Controls.xml:1102
#, no-c-format
msgid "<s:download>"
msgstr "<s:download>"
#. Tag: para
-#: Controls.xml:1099
+#: Controls.xml:1104
#, no-c-format
msgid "Builds a RESTful link to a <literal><s:resource></literal>. Nested <literal>f:param</literal> build up the url."
msgstr "Costruisce un link RESTful a <literal><s:resource></literal>. <literal>f:param</literal> innestati costruiscono l'url."
#. Tag: para
-#: Controls.xml:1106
+#: Controls.xml:1111
#, no-c-format
msgid "<literal>src</literal> — Resource file serving files."
msgstr "<literal>src</literal> — I file che servono al file di risorsa."
#. Tag: programlisting
-#: Controls.xml:1113
+#: Controls.xml:1118
#, no-c-format
msgid ""
"<![CDATA[<s:download src=\"/resources.xhtml\">\n"
@@ -1652,115 +1659,115 @@
"</s:download>]]>"
#. Tag: para
-#: Controls.xml:1115
+#: Controls.xml:1120
#, no-c-format
msgid "Will produce something like: <literal><![CDATA[http://localhost/resources.seam?fileId=1]]></literal>"
msgstr "Genererà qualcosa di simile a: <literal><![CDATA[http://localhost/resources.seam?fileId=1]]></literal>"
#. Tag: literal
-#: Controls.xml:1122
+#: Controls.xml:1127
#, no-c-format
msgid "<s:graphicImage>"
msgstr "<s:graphicImage>"
#. Tag: para
-#: Controls.xml:1125
+#: Controls.xml:1130
#, no-c-format
msgid "An extended <literal><h:graphicImage></literal> that allows the image to be created in a Seam Component; further transforms can be applied to the image."
msgstr "Un <literal><h:graphicImage></literal> esteso che consente all'immagine di essere creata in un componente Seam; possono essere applicate all'immagine altre trasformazioni."
#. Tag: para
-#: Controls.xml:1130
+#: Controls.xml:1135
#, no-c-format
msgid "All attributes for <literal><h:graphicImage></literal> are supported, as well as:"
msgstr "Tutti gli attributi per <literal><h:graphicImage></literal> sono supportati, così come:"
#. Tag: para
-#: Controls.xml:1138
+#: Controls.xml:1143
#, no-c-format
msgid "<literal>value</literal> — image to display. Can be a path <literal>String</literal> (loaded from the classpath), a <literal>byte[]</literal>, a <literal>java.io.File</literal>, a <literal>java.io.InputStream</literal> or a <literal>java.net.URL</literal>. Currently supported image formats are <literal>image/png</literal>, <literal>image/jpeg</literal> and <literal>image/gif</literal>."
msgstr "<literal>value</literal> — immagine da visualizzare. Può essere un path <literal>String</literal> (caricato dal classpath), un <literal>byte[]</literal>, un <literal>java.io.File</literal>, un <literal>java.io.InputStream</literal> o un <literal>java.net.URL</literal>. I formati d'immagine supportati sono <literal>image/png</literal>, <literal>image/jpeg</literal> e <literal>image/gif</literal>."
#. Tag: para
-#: Controls.xml:1151
+#: Controls.xml:1156
#, no-c-format
msgid "<literal>fileName</literal> — if not specified the served image will have a generated file name. If you want to name your file, you should specify it here. This name should be unique"
msgstr "<literal>fileName</literal> — se non specificato l'immagine servita avrà un nome di file generato. Se si vuole nominare il file, occorre specificarlo in questo attributo. Il nome deve essere univoco."
#. Tag: emphasis
-#: Controls.xml:1160
+#: Controls.xml:1165
#, no-c-format
msgid "Transformations"
msgstr "Trasformazioni"
#. Tag: para
-#: Controls.xml:1161
+#: Controls.xml:1166
#, no-c-format
msgid "To apply a transform to the image, you would nest a tag specifying the transform to apply. Seam currently supports these transforms:"
msgstr "Per applicare una trasformazione all'immagine, occorre innestare un tag specificando la trasformazione da applicare. Seam attualmente supporta queste trasformazioni:"
#. Tag: literal
-#: Controls.xml:1169
+#: Controls.xml:1174
#, no-c-format
msgid "<s:transformImageSize>"
msgstr "<s:transformImageSize>"
#. Tag: para
-#: Controls.xml:1174
+#: Controls.xml:1179
#, no-c-format
msgid "<literal>width</literal> — new width of the image"
msgstr "<literal>width</literal> — nuova larghezza dell'immagine"
#. Tag: para
-#: Controls.xml:1180
+#: Controls.xml:1185
#, no-c-format
msgid "<literal>height</literal> — new height of the image"
msgstr "<literal>height</literal> — nuova altezza dell'immagine"
#. Tag: para
-#: Controls.xml:1186
+#: Controls.xml:1191
#, no-c-format
msgid "<literal>maintainRatio</literal> — if <literal>true</literal>, and <emphasis>one</emphasis> of <literal>width</literal>/<literal>height</literal> are specified, the image will be resized with the dimension not specified being calculated to maintain the aspect ratio."
msgstr "<literal>maintainRatio</literal> — se vengono specificati <literal>true</literal>, ed <emphasis>uno</emphasis> fra <literal>width</literal>/<literal>height</literal>, l'immagine sarà ridimensionata con la dimensione non specificata che viene calcolata per mantenere l'aspect ratio."
#. Tag: para
-#: Controls.xml:1197
+#: Controls.xml:1202
#, no-c-format
msgid "<literal>factor</literal> — scale the image by the given factor"
msgstr "<literal>factor</literal> — scala l'immagine col dato fattore "
#. Tag: literal
-#: Controls.xml:1207
+#: Controls.xml:1212
#, no-c-format
msgid "<s:transformImageBlur>"
msgstr "<s:transformImageBlur>"
#. Tag: para
-#: Controls.xml:1212
+#: Controls.xml:1217
#, no-c-format
msgid "<literal>radius</literal> — perform a convolution blur with the given radius"
msgstr "<literal>radius</literal> — esegue una convolution blur con il raggio dato"
#. Tag: literal
-#: Controls.xml:1222
+#: Controls.xml:1227
#, no-c-format
msgid "<s:transformImageType>"
msgstr "<s:transformImageType>"
#. Tag: para
-#: Controls.xml:1227
+#: Controls.xml:1232
#, no-c-format
msgid "<literal>contentType</literal> — alter the type of the image to either <literal>image/jpeg</literal> or <literal>image/png</literal>"
msgstr "<literal>contentType</literal> — modifica il tipo d'immagine in <literal>image/jpeg</literal> o <literal>image/png</literal>"
#. Tag: para
-#: Controls.xml:1239
+#: Controls.xml:1244
#, no-c-format
msgid "It's easy to create your own transform - create a <literal>UIComponent</literal> which implements <literal>org.jboss.seam.ui.graphicImage.ImageTransform</literal>. Inside the <literal>applyTransform()</literal>method use <literal>image.getBufferedImage()</literal> to get the original image and <literal>image.setBufferedImage()</literal> to set your transformed image. Transforms are applied in the order specified in the view."
msgstr "E' facile creare una trasformazione - si crei un <literal>UIComponent</literal> che implementi <literal>org.jboss.seam.ui.graphicImage.ImageTransform</literal>. Dentro il metodo <literal>applyTransform()</literal> si usi <literal>image.getBufferedImage()</literal> per recuperare l'immagine originale e <literal>image.setBufferedImage()</literal> per impostare l'immagine trasformata. Le trasformazioni sono applicare nell'ordine specificato nella vista."
#. Tag: programlisting
-#: Controls.xml:1250
+#: Controls.xml:1255
#, no-c-format
msgid ""
"<![CDATA[<s:graphicImage rendered=\"#{auction.image ne null}\"\n"
@@ -1774,49 +1781,49 @@
"</s:graphicImage>]]>"
#. Tag: literal
-#: Controls.xml:1254
+#: Controls.xml:1259
#, no-c-format
msgid "<s:remote>"
msgstr "<s:remote>"
#. Tag: para
-#: Controls.xml:1257
+#: Controls.xml:1262
#, no-c-format
msgid "Generates the Javascript stubs required to use Seam Remoting."
msgstr "Genera gli stub Javascript richiesti per usare Seam Remoting."
#. Tag: para
-#: Controls.xml:1264
+#: Controls.xml:1269
#, no-c-format
msgid "<literal>include</literal> — a comma-separated list of the component names (or fully qualified class names)for which to generate Seam Remoting Javascript stubs. See <xref linkend=\"remoting\"/> for more details."
msgstr "<literal>include</literal> — una lista separata da virgola di nomi di componenti (o nome pienamente qualificati) per i quali generare stub Seam Remoting Javascript. Si veda <xref linkend=\"remoting\"/> per maggiori dettagli."
#. Tag: programlisting
-#: Controls.xml:1274
+#: Controls.xml:1279
#, no-c-format
msgid "<![CDATA[<s:remote include=\"customerAction,accountAction,com.acme.MyBean\"/>]]>"
msgstr "<![CDATA[<s:remote include=\"customerAction,accountAction,com.acme.MyBean\"/>]]>"
#. Tag: title
-#: Controls.xml:1281
+#: Controls.xml:1286
#, no-c-format
msgid "Annotations"
msgstr "Annotazioni"
#. Tag: para
-#: Controls.xml:1283
+#: Controls.xml:1288
#, no-c-format
msgid "Seam also provides annotations to allow you to use Seam components as JSF converters and validators:"
msgstr "Seam fornisce anche annotazioni che permettono di impiegare i componenti Seam come convertitori JSF e validatori:"
#. Tag: literal
-#: Controls.xml:1291
+#: Controls.xml:1296
#, no-c-format
msgid "@Converter"
msgstr "@Converter"
#. Tag: programlisting
-#: Controls.xml:1294
+#: Controls.xml:1299
#, no-c-format
msgid ""
"<![CDATA[@Name(\"itemConverter\") \n"
@@ -1856,25 +1863,25 @@
"}]]>"
#. Tag: programlisting
-#: Controls.xml:1296
+#: Controls.xml:1301
#, no-c-format
msgid "<![CDATA[<h:inputText value=\"#{shop.item}\" converter=\"itemConverter\" />]]>"
msgstr "<![CDATA[<h:inputText value=\"#{shop.item}\" converter=\"itemConverter\" />]]>"
#. Tag: para
-#: Controls.xml:1298
+#: Controls.xml:1303
#, no-c-format
msgid "Registers the Seam component as a JSF converter. Shown here is a converter which is able to access the JPA EntityManager inside a JTA transaction, when converting the value back to it's object representation."
msgstr "Registra il componente Seam come converter JSF. Qua è mostrato un converter capace di accedere all'EntityManager JPA dentro ad una transazione JTA, quando converte il valore legato alla rappresentazione del suo oggetto."
#. Tag: literal
-#: Controls.xml:1308
+#: Controls.xml:1313
#, no-c-format
msgid "@Validator"
msgstr "@Validator"
#. Tag: programlisting
-#: Controls.xml:1311
+#: Controls.xml:1316
#, no-c-format
msgid ""
"<![CDATA[@Name(\"itemValidator\") \n"
@@ -1908,13 +1915,13 @@
"}]]>"
#. Tag: programlisting
-#: Controls.xml:1313
+#: Controls.xml:1318
#, no-c-format
msgid "<![CDATA[<h:inputText value=\"#{shop.item}\" validator=\"itemValidator\" />]]>"
msgstr "<![CDATA[<h:inputText value=\"#{shop.item}\" validator=\"itemValidator\" />]]>"
#. Tag: para
-#: Controls.xml:1314
+#: Controls.xml:1319
#, no-c-format
msgid "Registers the Seam component as a JSF validator. Shown here is a validator which injects another Seam component; the injected component is used to validate the value."
msgstr "Registra il componente Seam come validatore JSF. Qua è mostrato un validatore che inietta un altro componente Seam; il componente iniettato è usato per validare il valore."
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Jms.po
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Jms.po 2009-06-13 00:06:44 UTC (rev 11151)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/it-IT/Jms.po 2009-06-14 00:28:46 UTC (rev 11152)
@@ -5,8 +5,8 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
-"POT-Creation-Date: 2009-01-18 15:00+0000\n"
-"PO-Revision-Date: 2009-06-05 16:10+0100\n"
+"POT-Creation-Date: 2009-06-13 23:52+0000\n"
+"PO-Revision-Date: 2009-06-14 02:28+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -28,7 +28,7 @@
#. Tag: para
#: Jms.xml:11
#, no-c-format
-msgid "But for many use cases, JMS is overkill. Seam layers a simple asynchronous method and event facility over your choice of <emphasis>dispatchers</emphasis>:"
+msgid "But for cases when you are simply want to use a worker thread, JMS is overkill. Seam layers a simple asynchronous method and event facility over your choice of <emphasis>dispatchers</emphasis>:"
msgstr "Ma per molti casi d'uso, JMS è eccessivo. Seam aggiunge come nuovo layer un semplice metodo asincrono ed un meccanismo d'eventi nella scelta del <emphasis>dispatcher</emphasis>:"
#. Tag: para
@@ -49,68 +49,354 @@
msgid "Quartz"
msgstr "Quartz"
+#. Tag: para
+#: Jms.xml:34
+#, no-c-format
+msgid "This chapter first covers how to leverage Seam to simplify JMS and then explains how to use the simpler asynchronous method and event facility."
+msgstr ""
+
#. Tag: title
-#: Jms.xml:35
+#: Jms.xml:40
#, no-c-format
+msgid "Messaging in Seam"
+msgstr "Messaggistica in Seam"
+
+#. Tag: para
+#: Jms.xml:42
+#, no-c-format
+msgid "Seam makes it easy to send and receive JMS messages to and from Seam components. Both the message publisher and the message receiver can be Seam components."
+msgstr "Seam facilita l'invio e la ricezione di messaggi JMS da e verso componenti Seam. Entrambi il publisher ed il receiver del messaggio possono essere componenti Seam."
+
+#. Tag: para
+#: Jms.xml:48
+#, no-c-format
+msgid "You'll first learn to setup a queue and topic message publisher and then look at an example that illustrates how to perform the message exchange."
+msgstr ""
+
+#. Tag: title
+#: Jms.xml:54
+#, no-c-format
+msgid "Configuration"
+msgstr "Configurazione"
+
+#. Tag: para
+#: Jms.xml:55
+#, no-c-format
+msgid "To configure Seam's infrastructure for sending JMS messages, you need to tell Seam about any topics and queues you want to send messages to, and also tell Seam where to find the <literal>QueueConnectionFactory</literal> and/or <literal>TopicConnectionFactory</literal>."
+msgstr "Per configurare l'infrastruttura di Seam alla spedizione di messaggi JMS, occorre dire a Seam a quali topic e code si vuole spedire i messaggi, ed inoltre serve dire dove trovare <literal>QueueConnectionFactory</literal> e/o <literal>TopicConnectionFactory</literal>."
+
+#. Tag: para
+#: Jms.xml:63
+#, no-c-format
+msgid "Seam defaults to using <literal>UIL2ConnectionFactory</literal> which is the usual connection factory for use with JBossMQ. If you are using some other JMS provider, you need to set one or both of <literal>queueConnection.queueConnectionFactoryJndiName</literal> and <literal>topicConnection.topicConnectionFactoryJndiName</literal> in <literal>seam.properties</literal>, <literal>web.xml</literal> or <literal>components.xml</literal>."
+msgstr "Di default Seam usa <literal>UIL2ConnectionFactory</literal> che è la connection factory consueta per l'uso con JBossMQ. Se si impiegano altri provider JSM, occorre impostare uno o entrambi i <literal>queueConnection.queueConnectionFactoryJndiName</literal> e <literal>topicConnection.topicConnectionFactoryJndiName</literal> in <literal>seam.properties</literal>, <literal>web.xml</literal> o <literal>components.xml</literal>."
+
+#. Tag: para
+#: Jms.xml:73
+#, no-c-format
+msgid "You also need to list topics and queues in <literal>components.xml</literal> to install Seam managed <literal>TopicPublisher</literal>s and <literal>QueueSender</literal>s:"
+msgstr "Inoltre in <literal>components.xml</literal> occorre elencare i topic e le code per installare i <literal>TopicPublisher</literal> ed i <literal>QueueSender</literal> gestiti da Seam:"
+
+#. Tag: programlisting
+#: Jms.xml:79
+#, no-c-format
+msgid ""
+"<![CDATA[<jms:managed-topic-publisher name=\"stockTickerPublisher\" \n"
+" auto-create=\"true\" \n"
+" topic-jndi-name=\"topic/stockTickerTopic\"/>\n"
+"\n"
+"<jms:managed-queue-sender name=\"paymentQueueSender\" \n"
+" auto-create=\"true\" \n"
+" queue-jndi-name=\"queue/paymentQueue\"/>]]>"
+msgstr ""
+"<![CDATA[<jms:managed-topic-publisher name=\"stockTickerPublisher\" \n"
+" auto-create=\"true\" \n"
+" topic-jndi-name=\"topic/stockTickerTopic\"/>\n"
+"\n"
+"<jms:managed-queue-sender name=\"paymentQueueSender\" \n"
+" auto-create=\"true\" \n"
+" queue-jndi-name=\"queue/paymentQueue\"/>]]>"
+
+#. Tag: title
+#: Jms.xml:84
+#, no-c-format
+msgid "Sending messages"
+msgstr "Spedire messaggi"
+
+#. Tag: para
+#: Jms.xml:85
+#, no-c-format
+msgid "Now, you can inject a JMS <literal>TopicPublisher</literal> and <literal>TopicSession</literal> into any Seam component to publish an object to a topic:"
+msgstr "Ora è possibile iniettare in qualsiasi componente un <literal>TopicPublisher</literal> e un <literal>TopicSession</literal> JMS per publicare un oggetto in un topic:"
+
+#. Tag: programlisting
+#: Jms.xml:91
+#, no-c-format
+msgid ""
+"<![CDATA[@Name(\"stockPriceChangeNotifier\")\n"
+"public class StockPriceChangeNotifier\n"
+"{\n"
+" @In private TopicPublisher stockTickerPublisher; \n"
+"\n"
+" @In private TopicSession topicSession;\n"
+"\n"
+" public void publish(StockPrice price)\n"
+" {\n"
+" try\n"
+" {\n"
+" stockTickerPublisher.publish(topicSession.createObjectMessage(price));\n"
+" } \n"
+" catch (Exception ex)\n"
+" {\n"
+" throw new RuntimeException(ex);\n"
+" } \n"
+" }\n"
+"}]]>"
+msgstr ""
+"<![CDATA[@Name(\"stockPriceChangeNotifier\")\n"
+"public class StockPriceChangeNotifier\n"
+"{\n"
+" @In private TopicPublisher stockTickerPublisher; \n"
+"\n"
+" @In private TopicSession topicSession;\n"
+"\n"
+" public void publish(StockPrice price)\n"
+" {\n"
+" try\n"
+" {\n"
+" stockTickerPublisher.publish(topicSession.createObjectMessage(price));\n"
+" } \n"
+" catch (Exception ex)\n"
+" {\n"
+" throw new RuntimeException(ex);\n"
+" } \n"
+" }\n"
+"}]]>"
+
+#. Tag: para
+#: Jms.xml:93
+#, no-c-format
+msgid "or to a queue:"
+msgstr "O ad una coda:"
+
+#. Tag: programlisting
+#: Jms.xml:95
+#, no-c-format
+msgid ""
+"<![CDATA[@Name(\"paymentDispatcher\")\n"
+"public class PaymentDispatcher\n"
+"{\n"
+" @In private QueueSender paymentQueueSender; \n"
+" \n"
+" @In private QueueSession queueSession;\n"
+" \n"
+" public void publish(Payment payment)\n"
+" {\n"
+" try\n"
+" {\n"
+" paymentQueueSender.send(queueSession.createObjectMessage(payment));\n"
+" } \n"
+" catch (Exception ex)\n"
+" {\n"
+" throw new RuntimeException(ex);\n"
+" } \n"
+" }\n"
+"}]]>"
+msgstr ""
+"<![CDATA[@Name(\"paymentDispatcher\")\n"
+"public class PaymentDispatcher\n"
+"{\n"
+" @In private QueueSender paymentQueueSender; \n"
+" \n"
+" @In private QueueSession queueSession;\n"
+" \n"
+" public void publish(Payment payment)\n"
+" {\n"
+" try\n"
+" {\n"
+" paymentQueueSender.send(queueSession.createObjectMessage(payment));\n"
+" } \n"
+" catch (Exception ex)\n"
+" {\n"
+" throw new RuntimeException(ex);\n"
+" } \n"
+" }\n"
+"}]]>"
+
+#. Tag: title
+#: Jms.xml:100
+#, no-c-format
+msgid "Receiving messages using a message-driven bean"
+msgstr "Ricezione dei messaggi usando un bean message-driven"
+
+#. Tag: para
+#: Jms.xml:101
+#, no-c-format
+msgid "You can process messages using any EJB 3 message-driven bean. The MDB can even be a Seam component, in which case it's possible to inject other event- and application- scoped Seam components. Here's an example of the payment receiver, which delegates to a payment processor."
+msgstr "I messaggi possono essere processati usando un qualsiasi bean message driven EJB3. I bean message-drive possono essere anche componenti Seam, in qualcaso è possibile iniettare altri componenti Seam aventi scope evento e applicazione. Ecco un esempio di ricevitore pagamento, che delega ad un payement processor."
+
+#. Tag: para
+#: Jms.xml:108
+#, no-c-format
+msgid "You'll likely need to set the create attribute on the <literal>@In</literal> annotation to true (i.e. create = true) to have Seam create an instance of the component being injected. This isn't necessary if the component supports auto-creation (e.g., it's annotated with <literal>@Autocreate</literal>)."
+msgstr ""
+
+#. Tag: para
+#: Jms.xml:115
+#, no-c-format
+msgid "First, create an MDB to receive the message."
+msgstr ""
+
+#. Tag: programlisting
+#: Jms.xml:119
+#, no-c-format
+msgid ""
+"<![CDATA[@MessageDriven(activationConfig = {\n"
+" @ActivationConfigProperty(\n"
+" propertyName = \"destinationType\",\n"
+" propertyValue = \"javax.jms.Queue\"\n"
+" ),\n"
+" @ActivationConfigProperty(\n"
+" propertyName = \"destination\",\n"
+" propertyValue = \"queue/paymentQueue\"\n"
+" )\n"
+"})\n"
+"@Name(\"paymentReceiver\")\n"
+"public class PaymentReceiver implements MessageListener\n"
+"{\n"
+" @Logger private Log log;\n"
+"\n"
+" @In(create = true) private PaymentProcessor paymentProcessor;\n"
+" \n"
+" @Override\n"
+" public void onMessage(Message message)\n"
+" {\n"
+" try\n"
+" {\n"
+" paymentProcessor.processPayment((Payment) ((ObjectMessage) message).getObject());\n"
+" } \n"
+" catch (JMSException ex)\n"
+" {\n"
+" log.error(\"Message payload did not contain a Payment object\", ex);\n"
+" } \n"
+" }\n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: Jms.xml:121
+#, no-c-format
+msgid "Then, implement the Seam component to which the receiver delegates processing of the payment."
+msgstr ""
+
+#. Tag: programlisting
+#: Jms.xml:125
+#, no-c-format
+msgid ""
+"<![CDATA[@Name(\"paymentProcessor\")\n"
+"public class PaymentProcessor\n"
+"{\n"
+" @In private EntityManager entityManager;\n"
+"\n"
+" public void processPayment(Payment payment)\n"
+" {\n"
+" // perhaps do something more fancy\n"
+" entityManager.persist(payment);\n"
+" }\n"
+"}]]>"
+msgstr ""
+"<![CDATA[@Name(\"paymentProcessor\")\n"
+"public class PaymentProcessor\n"
+"{\n"
+" @In private EntityManager entityManager;\n"
+"\n"
+" public void processPayment(Payment payment)\n"
+" {\n"
+" // fai qualcosa di eccezionale\n"
+" entityManager.persist(payment);\n"
+" }\n"
+"}]]>"
+
+#. Tag: para
+#: Jms.xml:127
+#, no-c-format
+msgid "If you are going to be performing transaction operations in your MDB, you should ensure that you are working with an XA datasource. Otherwise, it won't be possible to rollback database changes if the database transaction commits and a subsequent operation being performed by the message fails."
+msgstr "Se si stanno per eseguire delle operazioni di transazione nel MDB, occorre assicurarsi di lavorare con un datasource XA. Altrimenti non sarà possibile eseguire il rollback dei cambiamenti al database se viene fatto il commit della transazione e fallisce l'operazione successiva eseguita dal messaggio."
+
+#. Tag: title
+#: Jms.xml:136
+#, no-c-format
+msgid "Receiving messages in the client"
+msgstr "Ricezione dei messaggi nel client"
+
+#. Tag: para
+#: Jms.xml:137
+#, no-c-format
+msgid "Seam Remoting lets you subscribe to a JMS topic from client-side JavaScript. This is described in <xref linkend=\"remoting\"/>."
+msgstr "Seam Remoting consente di sottoscrivere un topic JMS lato client JavaScript. Questo viene descritto in <xref linkend=\"remoting\"/>."
+
+#. Tag: title
+#: Jms.xml:146
+#, no-c-format
msgid "Asynchronicity"
msgstr "Asincronicità"
#. Tag: para
-#: Jms.xml:37
+#: Jms.xml:148
#, no-c-format
msgid "Asynchronous events and method calls have the same quality of service expectations as the underlying dispatcher mechanism. The default dispatcher, based upon a <literal>ScheduledThreadPoolExecutor</literal> performs efficiently but provides no support for persistent asynchronous tasks, and hence no guarantee that a task will ever actually be executed. If you're working in an environment that supports EJB 3.0, and add the following line to <literal>components.xml</literal>:"
msgstr "Eventi asincroni e chiamate a metodi hanno le stesse aspettative di qualità di servizio del meccanismo sottostante di dispatcher. Il dispatcher di default, basato su <literal>ScheduledThreadPoolExecutor</literal> opera efficientemente ma non fornisce alcun supporto ai task asincroni di persistenza, e quindi non garantisce che un task verrà effettivamente eseguito. Se si lavora in un ambiente che supporta EJB 3.0 e si aggiunge la seguente linea a <literal>components.xml</literal>:"
#. Tag: programlisting
-#: Jms.xml:46
+#: Jms.xml:157
#, no-c-format
msgid "<![CDATA[<async:timer-service-dispatcher/>]]>"
msgstr "<![CDATA[<async:timer-service-dispatcher/>]]>"
#. Tag: para
-#: Jms.xml:48
+#: Jms.xml:159
#, no-c-format
msgid "then your asynchronous tasks will be processed by the container's EJB timer service. If you're not familiar with the Timer service, don't worry, you don't need to interact with it directly if you want to use asynchronous methods in Seam. The important thing to know is that any good EJB 3.0 implementation will have the option of using persistent timers, which gives some guarantee that the tasks will eventually be processed."
msgstr "allora i task asincroni verranno processati dal servizio EJB timer del container. Se non si è familiari come il servizio Timer, nessuna paura, non si deve interagire direttamente con esso per usare i metodi asincroni in Seam. La cosa importante da sapere è che qualsiasi buona implementazione di EJB 3.0 avrà l'opzione di usare i timer di persistenza, che danno garanzia che i task verranno processati."
#. Tag: para
-#: Jms.xml:56
+#: Jms.xml:167
#, no-c-format
msgid "Another alternative is to use the open source Quartz library to manage asynchronous method. You need to bundle the Quartz library JAR (found in the <literal>lib</literal> directory) in your EAR and declare it as a Java module in <literal>application.xml</literal>. The Quartz dispatcher may be configured by adding a Quartz property file to the classpath. It must be named <literal>seam.quartz.properties</literal>. In addition, you need to add the following line to <literal>components.xml</literal> to install the Quartz dispatcher."
msgstr "Un'altra alternativa è quella di usare la libreria open source Quartz per gestire il metodo asincrono. Occorre incorporare il JAR della libreria Quartz (che si trova nella directory <literal>lib</literal>) nell'EAR e dichiararla come modulo Java in <literal>application.xml</literal>. Il dispatcher Quartz può essere configurato aggiungendo un file di proprietà Quartz al classpath. Deve essere nominato <literal>seam.quartz.properties</literal>. Inoltre occorre aggiungere la seguente linea a <literal>components.xml</literal> per installare il dispatcher Quartz. "
#. Tag: programlisting
-#: Jms.xml:66
+#: Jms.xml:177
#, no-c-format
msgid "<![CDATA[<async:quartz-dispatcher/>]]>"
msgstr "<![CDATA[<async:quartz-dispatcher/>]]>"
#. Tag: para
-#: Jms.xml:68
+#: Jms.xml:179
#, no-c-format
msgid "The Seam API for the default <literal>ScheduledThreadPoolExecutor</literal>, the EJB3 <literal>Timer</literal>, and the Quartz <literal>Scheduler</literal> are largely the same. They can just \"plug and play\" by adding a line to <literal>components.xml</literal>."
msgstr "L'API di Seam per il <literal>ScheduledThreadPoolExecutor</literal> di default, il <literal>Timer</literal> EJB3, e lo <literal>Scheduler</literal> Quartz sono più o meno la stessa cosa. Vengono azionati come \"plug and play\" aggiungendo una linea a <literal>components.xml</literal>."
#. Tag: title
-#: Jms.xml:75
+#: Jms.xml:186
#, no-c-format
msgid "Asynchronous methods"
msgstr "Metodi asincroni"
#. Tag: para
-#: Jms.xml:77
+#: Jms.xml:188
#, no-c-format
msgid "In simplest form, an asynchronous call just lets a method call be processed asynchronously (in a different thread) from the caller. We usually use an asynchronous call when we want to return an immediate response to the client, and let some expensive work be processed in the background. This pattern works very well in applications which use AJAX, where the client can automatically poll the server for the result of the work."
msgstr "Nella forma più semplice, una chiamata asincrona consente che una chiamata di metodo venga processata asincronicamente (in un thread differente) dal chiamante. Solitamente si usa una chiamata asincrona quando si vuole ritornare una risposta immediata al client, e si lascia in background il lavoro dispendioso da processare. Questo pattern funziona molto bene nelle applicazioni che usano AJAX, dove il client può automaticamente interrogare il server per ottenere il risultato del lavoro."
#. Tag: para
-#: Jms.xml:85
+#: Jms.xml:196
#, no-c-format
msgid "For EJB components, we annotate the local interface to specify that a method is processed asynchronously."
msgstr "Per i componenti EJB si annota l'interfaccia locale per specificare che un metodo viene processato asincronicamente."
#. Tag: programlisting
-#: Jms.xml:90
+#: Jms.xml:201
#, no-c-format
msgid ""
"<![CDATA[@Local\n"
@@ -128,19 +414,19 @@
"}]]>"
#. Tag: para
-#: Jms.xml:92
+#: Jms.xml:203
#, no-c-format
msgid "(For JavaBean components we can annotate the component implementation class if we like.)"
msgstr "(Per i componenti JavaBean, se si vuole, si può annotare la classe d'implementazione del componente.)"
#. Tag: para
-#: Jms.xml:96
+#: Jms.xml:207
#, no-c-format
msgid "The use of asynchronicity is transparent to the bean class:"
msgstr "L'uso dell'asincronicità è trasparente alla classe bean:"
#. Tag: programlisting
-#: Jms.xml:100
+#: Jms.xml:211
#, no-c-format
msgid ""
"<![CDATA[@Stateless\n"
@@ -164,13 +450,13 @@
"}]]>"
#. Tag: para
-#: Jms.xml:102
+#: Jms.xml:213
#, no-c-format
msgid "And also transparent to the client:"
msgstr "E è anche trasparente al client:"
#. Tag: programlisting
-#: Jms.xml:106
+#: Jms.xml:217
#, no-c-format
msgid ""
"<![CDATA[@Stateful\n"
@@ -202,19 +488,19 @@
"}]]>"
#. Tag: para
-#: Jms.xml:108
+#: Jms.xml:219
#, no-c-format
msgid "The asynchronous method is processed in a completely new event context and does not have access to the session or conversation context state of the caller. However, the business process context <emphasis>is</emphasis> propagated."
msgstr "Il metodo asincrono viene processato in un contesto eventi completamente nuovo e non ha accesso allo stato del contesto sessione o conversazione del chiamante. Comunque, il contesto di processo di business <emphasis>viene</emphasis> propagato."
#. Tag: para
-#: Jms.xml:114
+#: Jms.xml:225
#, no-c-format
msgid "Asynchronous method calls may be scheduled for later execution using the <literal>@Duration</literal>, <literal>@Expiration</literal> and <literal>@IntervalDuration</literal> annotations."
msgstr "Le chiamate del metodo asincrono possono essere schedulate per un'esecuzione successiva usando le annotazioni <literal>@Duration</literal>, <literal>@Expiration</literal> e <literal>@IntervalDuration</literal>."
#. Tag: programlisting
-#: Jms.xml:120
+#: Jms.xml:231
#, no-c-format
msgid ""
"<![CDATA[@Local\n"
@@ -242,7 +528,7 @@
"}]]>"
#. Tag: programlisting
-#: Jms.xml:122
+#: Jms.xml:233
#, no-c-format
msgid ""
"<![CDATA[@Stateful\n"
@@ -288,13 +574,13 @@
"}]]>"
#. Tag: para
-#: Jms.xml:124
+#: Jms.xml:235
#, no-c-format
msgid "Both client and server may access the <literal>Timer</literal> object associated with the invocation. The <literal>Timer</literal> object shown below is the EJB3 timer when you use the EJB3 dispatcher. For the default <literal>ScheduledThreadPoolExecutor</literal>, the returned object is <literal>Future</literal> from the JDK. For the Quartz dispatcher, it returns <literal>QuartzTriggerHandle</literal>, which we will discuss in the next section."
msgstr "Entrambi il server ed il client possono accedere all'oggetto <literal>Timer</literal> associato all'invocazione. L'oggetto <literal>Timer</literal> mostrato sotto è il timer EJB3 quando viene usato il dispatcher EJB3. Per il <literal>ScheduledThreadPoolExecutor</literal> di default, l'oggetto restituito è <literal>Future</literal> di JDK. Per il dispatcher Quartz, viene ritornato <literal>QuartzTriggerHandle</literal>, che verrà discusso nella prossima sessione."
#. Tag: programlisting
-#: Jms.xml:129
+#: Jms.xml:240
#, no-c-format
msgid ""
"<![CDATA[@Local\n"
@@ -312,7 +598,7 @@
"}]]>"
#. Tag: programlisting
-#: Jms.xml:131
+#: Jms.xml:242
#, no-c-format
msgid ""
"<![CDATA[@Stateless\n"
@@ -346,7 +632,7 @@
"}]]>"
#. Tag: programlisting
-#: Jms.xml:133
+#: Jms.xml:244
#, no-c-format
msgid ""
"<![CDATA[@Stateful\n"
@@ -380,31 +666,31 @@
"}]]>"
#. Tag: para
-#: Jms.xml:135
+#: Jms.xml:246
#, no-c-format
msgid "Asynchronous methods cannot return any other value to the caller."
msgstr "I metodi asincroni non possono ritornare al chiamante alcun altro valore."
#. Tag: title
-#: Jms.xml:142
+#: Jms.xml:253
#, no-c-format
msgid "Asynchronous methods with the Quartz Dispatcher"
msgstr "Metodi asincroni con il Quartz Dispatcher"
#. Tag: para
-#: Jms.xml:144
+#: Jms.xml:255
#, no-c-format
msgid "The Quartz dispatcher (see earlier on how to install it) allows you to use the <literal>@Asynchronous</literal>, <literal>@Duration</literal>, <literal>@Expiration</literal>, and <literal>@IntervalDuration</literal> annotations as above. But it has some powerful additional features. The Quartz dispatcher supports three new annotations."
msgstr "Il dispatcher Quartz (vedere indietro come viene installato) consente di usare le annotazioni <literal>@Asynchronous</literal>, <literal>@Duration</literal>, <literal>@Expiration</literal>, e <literal>@IntervalDuration</literal> come sopra. Ma possiede anche altre potenti caratteristiche. Il dispatcher Quartz supporta tre nuove annotazioni."
#. Tag: para
-#: Jms.xml:148
+#: Jms.xml:259
#, no-c-format
msgid "The <literal>@FinalExpiration</literal> annotation specifies an end date for the recurring task. Note that you can inject the <code>QuartzTriggerHandle</code>."
msgstr "L'annotazione <literal>@FinalExpiration</literal> specifica una data finale per il task ricorrente. Si noti che si può iniettare il <code>QuartzTriggerHandle</code>."
#. Tag: programlisting
-#: Jms.xml:150
+#: Jms.xml:261
#, no-c-format
msgid ""
"<![CDATA[\n"
@@ -452,13 +738,13 @@
"]]>"
#. Tag: para
-#: Jms.xml:152
+#: Jms.xml:263
#, no-c-format
msgid "Note that the method returns the <literal>QuartzTriggerHandle</literal> object, which you can use later to stop, pause, and resume the scheduler. The <literal>QuartzTriggerHandle</literal> object is serializable, so you can save it into the database if you need to keep it around for extended period of time."
msgstr "Si noti che il metodo restituisce l'oggetto <literal>QuartzTriggerHandle</literal>, che si può usare per arrestare, mettere in pausa e ripristinare lo scheduler. L'oggetto <literal>QuartzTriggerHandle</literal> è serializzabile, e quindi può essere salvato nel database se deve essere presente per un periodo di tempo esteso."
#. Tag: programlisting
-#: Jms.xml:154
+#: Jms.xml:265
#, no-c-format
msgid ""
"<![CDATA[QuartzTriggerHandle handle =\n"
@@ -490,13 +776,13 @@
"]]>"
#. Tag: para
-#: Jms.xml:156
+#: Jms.xml:267
#, no-c-format
msgid "The <literal>@IntervalCron</literal> annotation supports Unix cron job syntax for task scheduling. For instance, the following asynchronous method runs at 2:10pm and at 2:44pm every Wednesday in the month of March."
msgstr "L'annotazione <literal>@IntervalCron</literal> supporta la sintassi Unix del cron job per la schedulazione dei task. Per esempio, il seguente metodo asincrono gira alle 2:10pm e alle 2:44pm ogni Mercoledì del mese di Marzo."
#. Tag: programlisting
-#: Jms.xml:159
+#: Jms.xml:270
#, no-c-format
msgid ""
"<![CDATA[\n"
@@ -534,13 +820,13 @@
"]]>"
#. Tag: para
-#: Jms.xml:161
+#: Jms.xml:272
#, no-c-format
msgid "The <literal>@IntervalBusinessDay</literal> annotation supports invocation on the \"nth Business Day\" scenario. For instance, the following asynchronous method runs at 14:00 on the 2nd business day of each month. By default, it excludes all weekends and US federal holidays until 2010 from the business days."
msgstr "L'annotazione <literal>@IntervalBusinessDay</literal> supporta l'invocazione sullo scenario di \"Giorno Lavorativo ennesimo\". Per esempio il seguente metodo asincrono gira alle ore 14.00 del secondo giorno lavorativo di ogni mese. Di default esclude tutti i weekend e le festività federali americane fino al 2010 dai giorni lavorativi."
#. Tag: programlisting
-#: Jms.xml:164
+#: Jms.xml:275
#, no-c-format
msgid ""
"<![CDATA[\n"
@@ -580,13 +866,13 @@
"]]>"
#. Tag: para
-#: Jms.xml:166
+#: Jms.xml:277
#, no-c-format
msgid "The <literal>NthBusinessDay</literal> object contains the configuration of the invocation trigger. You can specify more holidays (e.g., company holidays, non-US holidays etc.) via the <literal>additionalHolidays</literal> property."
msgstr "L'oggetto <literal>NthBusinessDay</literal> contiene la configurazione del trigger d'invocazione. Si possono specificare più vacanze (esempio, vacanze aziendali, festività non-US, ecc.) attraverso la proprietà <literal>additionalHolidays</literal>."
#. Tag: programlisting
-#: Jms.xml:168
+#: Jms.xml:279
#, no-c-format
msgid ""
"<![CDATA[\n"
@@ -640,43 +926,43 @@
"]]>"
#. Tag: para
-#: Jms.xml:170
+#: Jms.xml:281
#, no-c-format
msgid "The <literal>@IntervalDuration</literal>, <literal>@IntervalCron</literal>, and <literal>@IntervalNthBusinessDay</literal> annotations are mutually exclusive. If they are used in the same method, a <literal>RuntimeException</literal> will be thrown."
msgstr "Le annotazioni <literal>@IntervalDuration</literal>, <literal>@IntervalCron</literal>, e <literal>@IntervalNthBusinessDay</literal> sono mutualmente esclusive. Se usate nello stesso metodo, verrà lanciata una <literal>RuntimeException</literal>."
#. Tag: title
-#: Jms.xml:175
+#: Jms.xml:286
#, no-c-format
msgid "Asynchronous events"
msgstr "Eventi asincroni"
#. Tag: para
-#: Jms.xml:176
+#: Jms.xml:287
#, no-c-format
msgid "Component-driven events may also be asynchronous. To raise an event for asynchronous processing, simply call the <literal>raiseAsynchronousEvent()</literal> method of the <literal>Events</literal> class. To schedule a timed event, call the <literal>raiseTimedEvent()</literal> method, passing a <emphasis>schedule</emphasis> object (for the default dispatcher or timer service dispatcher, use <literal>TimerSchedule</literal>). Components may observe asynchronous events in the usual way, but remember that only the business process context is propagated to the asynchronous thread."
msgstr "Gli eventi guidati dai componenti possono essere asincroni. Per sollevare un evento da processare in modo asincrono, occorre semplicemente chiamare il metodo <literal>raiseAsynchronousEvent()</literal> della classe <literal>Events</literal>. Per schedulare un evento a tempo, chiamare il metodo <literal>raiseTimedEvent()</literal> passando un oggetto <emphasis>schedule</emphasis> (per il dispatcher di default o il dispatcher del servizio timer, usare <literal>TimerSchedule</literal>). I componenti possono osservare eventi asincroni nel solito modo, ma si tenga presente che solo il contesto business process viene propagato nel thread asincrono."
#. Tag: title
-#: Jms.xml:188
+#: Jms.xml:299
#, no-c-format
msgid "Handling exceptions from asynchronous calls"
msgstr "Gestione delle eccezione da chiamate asincrone"
#. Tag: para
-#: Jms.xml:190
+#: Jms.xml:301
#, no-c-format
msgid "Each asynchronous dispatcher behaves differently when an exception propagates through it. For example, the <literal>java.util.concurrent</literal> dispatcher will suspend further executions of a call which repeats, and the EJB3 timer service will swallow the exception. Seam therefore catches any exception which propagates out of the asynchronous call before it reaches the dispatcher."
msgstr "Ogni dispatcher asincrono si comporta in modo differente quando attraverso di esso viene propagata un'eccezione. Per esempio, il dispatcher <literal>java.util.concurrent</literal> sospenderà ogni altra esecuzione di una chiamata che si ripete, ed il servizio timer EJB3 inghiottirà quest'eccezione. Quindi Seam cattura ogni eccezione che si propaga fuori da una chiamata asincrona prima che questa raggiunga il dispatcher."
#. Tag: para
-#: Jms.xml:200
+#: Jms.xml:311
#, no-c-format
msgid "By default, any exception which propagates out from an asynchronous execution will be caught and logged at error level. You can customize this behavior globally by overriding the <literal>org.jboss.seam.async.asynchronousExceptionHandler</literal> component:"
msgstr "Di default ogni eccezione che si propaga fuori da un'esecuzione asincrona verrà catturata e loggata come errore. Si può personalizzare questo comportamento facendo override del componente <literal>org.jboss.seam.async.asynchronousExceptionHandler</literal>."
#. Tag: programlisting
-#: Jms.xml:208
+#: Jms.xml:319
#, no-c-format
msgid ""
"<![CDATA[(a)Scope(ScopeType.STATELESS)\n"
@@ -712,19 +998,19 @@
"}]]>"
#. Tag: para
-#: Jms.xml:210
+#: Jms.xml:321
#, no-c-format
msgid "Here, for example, using <literal>java.util.concurrent</literal> dispatcher, we inject its control object and cancel all future invocations when an exception is encountered"
msgstr "Per esempio, usando il dispatcher <literal>java.util.concurrent</literal>, viene iniettato il suo oggetto di controllo e vengono cancellate tutte le future invocazioni quando si incontra un'eccezione."
#. Tag: para
-#: Jms.xml:216
+#: Jms.xml:327
#, no-c-format
msgid "You can also alter this behavior for an individual component by implementing the method <literal>public void handleAsynchronousException(Exception exception);</literal> on the component. For example:"
msgstr "Si può alterare questo comportamento per un componente individuale, implementando sul componente il metodo <literal>public void handleAsynchronousException(Exception exception);</literal>. Per esempio:"
#. Tag: programlisting
-#: Jms.xml:223
+#: Jms.xml:334
#, no-c-format
msgid ""
"<![CDATA[ public void handleAsynchronousException(Exception exception) {\n"
@@ -735,173 +1021,3 @@
" log.fatal(exception);\n"
" }]]>"
-#. Tag: title
-#: Jms.xml:230
-#, no-c-format
-msgid "Messaging in Seam"
-msgstr "Messaggistica in Seam"
-
-#. Tag: para
-#: Jms.xml:232
-#, no-c-format
-msgid "Seam makes it easy to send and receive JMS messages to and from Seam components."
-msgstr "Seam facilita l'invio e la ricezione di messaggi JMS da e verso componenti Seam."
-
-#. Tag: title
-#: Jms.xml:238
-#, no-c-format
-msgid "Configuration"
-msgstr "Configurazione"
-
-#. Tag: para
-#: Jms.xml:239
-#, no-c-format
-msgid "To configure Seam's infrastructure for sending JMS messages, you need to tell Seam about any topics and queues you want to send messages to, and also tell Seam where to find the <literal>QueueConnectionFactory</literal> and/or <literal>TopicConnectionFactory</literal>."
-msgstr "Per configurare l'infrastruttura di Seam alla spedizione di messaggi JMS, occorre dire a Seam a quali topic e code si vuole spedire i messaggi, ed inoltre serve dire dove trovare <literal>QueueConnectionFactory</literal> e/o <literal>TopicConnectionFactory</literal>."
-
-#. Tag: para
-#: Jms.xml:247
-#, no-c-format
-msgid "Seam defaults to using <literal>UIL2ConnectionFactory</literal> which is the usual connection factory for use with JBossMQ. If you are using some other JMS provider, you need to set one or both of <literal>queueConnection.queueConnectionFactoryJndiName</literal> and <literal>topicConnection.topicConnectionFactoryJndiName</literal> in <literal>seam.properties</literal>, <literal>web.xml</literal> or <literal>components.xml</literal>."
-msgstr "Di default Seam usa <literal>UIL2ConnectionFactory</literal> che è la connection factory consueta per l'uso con JBossMQ. Se si impiegano altri provider JSM, occorre impostare uno o entrambi i <literal>queueConnection.queueConnectionFactoryJndiName</literal> e <literal>topicConnection.topicConnectionFactoryJndiName</literal> in <literal>seam.properties</literal>, <literal>web.xml</literal> o <literal>components.xml</literal>."
-
-#. Tag: para
-#: Jms.xml:257
-#, no-c-format
-msgid "You also need to list topics and queues in <literal>components.xml</literal> to install Seam managed <literal>TopicPublisher</literal>s and <literal>QueueSender</literal>s:"
-msgstr "Inoltre in <literal>components.xml</literal> occorre elencare i topic e le code per installare i <literal>TopicPublisher</literal> ed i <literal>QueueSender</literal> gestiti da Seam:"
-
-#. Tag: programlisting
-#: Jms.xml:263
-#, no-c-format
-msgid ""
-"<![CDATA[<jms:managed-topic-publisher name=\"stockTickerPublisher\" \n"
-" auto-create=\"true\" \n"
-" topic-jndi-name=\"topic/stockTickerTopic\"/>\n"
-"\n"
-"<jms:managed-queue-sender name=\"paymentQueueSender\" \n"
-" auto-create=\"true\" \n"
-" queue-jndi-name=\"queue/paymentQueue\"/>]]>"
-msgstr ""
-"<![CDATA[<jms:managed-topic-publisher name=\"stockTickerPublisher\" \n"
-" auto-create=\"true\" \n"
-" topic-jndi-name=\"topic/stockTickerTopic\"/>\n"
-"\n"
-"<jms:managed-queue-sender name=\"paymentQueueSender\" \n"
-" auto-create=\"true\" \n"
-" queue-jndi-name=\"queue/paymentQueue\"/>]]>"
-
-#. Tag: title
-#: Jms.xml:268
-#, no-c-format
-msgid "Sending messages"
-msgstr "Spedire messaggi"
-
-#. Tag: para
-#: Jms.xml:269
-#, no-c-format
-msgid "Now, you can inject a JMS <literal>TopicPublisher</literal> and <literal>TopicSession</literal> into any component:"
-msgstr "Ora è possibile iniettare in qualsiasi componente un <literal>TopicPublisher</literal> e un <literal>TopicSession</literal> JMS:"
-
-#. Tag: programlisting
-#: Jms.xml:274
-#, no-c-format
-msgid ""
-"<![CDATA[@In \n"
-"private TopicPublisher stockTickerPublisher; \n"
-"@In \n"
-"private TopicSession topicSession;\n"
-"\n"
-"public void publish(StockPrice price) {\n"
-" try\n"
-" {\n"
-" stockTickerPublisher.publish( topicSession.createObjectMessage(price) );\n"
-" } \n"
-" catch (Exception ex)\n"
-" {\n"
-" throw new RuntimeException(ex);\n"
-" } \n"
-"}]]>"
-msgstr ""
-"<![CDATA[@In \n"
-"private TopicPublisher stockTickerPublisher; \n"
-"@In \n"
-"private TopicSession topicSession;\n"
-"\n"
-"public void publish(StockPrice price) {\n"
-" try\n"
-" {\n"
-" stockTickerPublisher.publish( topicSession.createObjectMessage(price) );\n"
-" } \n"
-" catch (Exception ex)\n"
-" {\n"
-" throw new RuntimeException(ex);\n"
-" } \n"
-"}]]>"
-
-#. Tag: para
-#: Jms.xml:276
-#, no-c-format
-msgid "Or, for working with a queue:"
-msgstr "O lavorando con una coda:"
-
-#. Tag: programlisting
-#: Jms.xml:278
-#, no-c-format
-msgid ""
-"<![CDATA[@In\n"
-"private QueueSender paymentQueueSender; \n"
-"@In\n"
-"private QueueSession queueSession;\n"
-"\n"
-"public void publish(Payment payment) {\n"
-" try\n"
-" {\n"
-" paymentQueueSender.send( queueSession.createObjectMessage(payment) );\n"
-" } \n"
-" catch (Exception ex)\n"
-" {\n"
-" throw new RuntimeException(ex);\n"
-" } \n"
-"}]]>"
-msgstr ""
-"<![CDATA[@In\n"
-"private QueueSender paymentQueueSender; \n"
-"@In\n"
-"private QueueSession queueSession;\n"
-"\n"
-"public void publish(Payment payment) {\n"
-" try\n"
-" {\n"
-" paymentQueueSender.send( queueSession.createObjectMessage(payment) );\n"
-" } \n"
-" catch (Exception ex)\n"
-" {\n"
-" throw new RuntimeException(ex);\n"
-" } \n"
-"}]]>"
-
-#. Tag: title
-#: Jms.xml:283
-#, no-c-format
-msgid "Receiving messages using a message-driven bean"
-msgstr "Ricezione dei messaggi usando un bean message-driven"
-
-#. Tag: para
-#: Jms.xml:284
-#, no-c-format
-msgid "You can process messages using any EJB3 message driven bean. Message-driven beans may even be Seam components, in which case it is possible to inject other event and application scoped Seam components."
-msgstr "I messaggi possono essere processati usando un qualsiasi bean message driven EJB3. I bean message-drive possono essere anche componenti Seam, in qual caso è possibile iniettare altri componenti Seam aventi scope evento e applicazione."
-
-#. Tag: title
-#: Jms.xml:292
-#, no-c-format
-msgid "Receiving messages in the client"
-msgstr "Ricezione dei messaggi nel client"
-
-#. Tag: para
-#: Jms.xml:293
-#, no-c-format
-msgid "Seam Remoting lets you subscribe to a JMS topic from client-side JavaScript. This is described in <xref linkend=\"remoting\"/>."
-msgstr "Seam Remoting consente di sottoscrivere un topic JMS lato client JavaScript. Questo viene descritto in <xref linkend=\"remoting\"/>."
-
15 years, 6 months
Seam SVN: r11151 - in branches/community/Seam_2_2: examples/mail/view and 1 other directories.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2009-06-12 20:06:44 -0400 (Fri, 12 Jun 2009)
New Revision: 11151
Added:
branches/community/Seam_2_2/examples/mail/view/excel.xhtml
Modified:
branches/community/Seam_2_2/examples/mail/build.xml
branches/community/Seam_2_2/examples/mail/view/attachment.xhtml
branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
Log:
JBSEAM-3948 Same special treatment for Excel as PDF to send docs easy
Modified: branches/community/Seam_2_2/examples/mail/build.xml
===================================================================
--- branches/community/Seam_2_2/examples/mail/build.xml 2009-06-12 23:37:01 UTC (rev 11150)
+++ branches/community/Seam_2_2/examples/mail/build.xml 2009-06-13 00:06:44 UTC (rev 11151)
@@ -10,6 +10,7 @@
<property name="seam.mail.lib" value="yes" />
<property name="deploy.meldware.mail" value="yes" />
<property name="seam.pdf.lib" value="yes"/>
+ <property name="seam.excel.lib" value="yes"/>
<property name="seam.debug.lib" value="yes" />
<property name="facelets.lib" value="yes" />
@@ -31,6 +32,7 @@
<path id="build.classpath.extras">
<path location="${lib.dir}/jboss-seam-mail.jar" />
<path location="${lib.dir}/jboss-seam-pdf.jar" />
+ <path location="${lib.dir}/jboss-seam-excel.jar" />
</path>
</project>
Modified: branches/community/Seam_2_2/examples/mail/view/attachment.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/mail/view/attachment.xhtml 2009-06-12 23:37:01 UTC (rev 11150)
+++ branches/community/Seam_2_2/examples/mail/view/attachment.xhtml 2009-06-13 00:06:44 UTC (rev 11151)
@@ -12,6 +12,9 @@
<m:attachment fileName="whyseam.pdf">
<ui:include src="/whyseam.xhtml" />
</m:attachment>
+ <m:attachment fileName="excel.pdf">
+ <ui:include src="/excel.xhtml" />
+ </m:attachment>
<ui:repeat value="#{people}" var="p">
<m:attachment value="#{p.photo}" contentType="image/jpeg" fileName="#{p.firstname}_#{p.lastname}.jpg" />
</ui:repeat>
Added: branches/community/Seam_2_2/examples/mail/view/excel.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/mail/view/excel.xhtml (rev 0)
+++ branches/community/Seam_2_2/examples/mail/view/excel.xhtml 2009-06-13 00:06:44 UTC (rev 11151)
@@ -0,0 +1,6 @@
+<e:workbook xmlns:e="http://jboss.com/products/seam/excel" xmlns:f="http://java.sun.com/jsf/core">
+ <e:worksheet name="Developers">
+ <e:cell column="0" row="0" value="Daniel Roth" />
+ <e:cell column="0" row="1" value="Nicklas Karlsson" />
+ </e:worksheet>
+</e:workbook>
Modified: branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
===================================================================
--- branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java 2009-06-12 23:37:01 UTC (rev 11150)
+++ branches/community/Seam_2_2/src/mail/org/jboss/seam/mail/ui/UIAttachment.java 2009-06-13 00:06:44 UTC (rev 11151)
@@ -85,7 +85,8 @@
public void encodeBegin(FacesContext context) throws IOException
{
if (this.getChildCount() > 0) {
- if (Reflections.isInstanceOf(this.getChildren().get(0).getClass(), "org.jboss.seam.pdf.ui.UIDocument"))
+ if (Reflections.isInstanceOf(this.getChildren().get(0).getClass(), "org.jboss.seam.pdf.ui.UIDocument") ||
+ Reflections.isInstanceOf(this.getChildren().get(0).getClass(), "org.jboss.seam.excel.ui.UIWorkbook"))
{
Method method = Reflections.getSetterMethod(this.getChildren().get(0).getClass(), "sendRedirect");
Reflections.invokeAndWrap(method, this.getChildren().get(0), false);
15 years, 6 months
Seam SVN: r11150 - branches/community/Seam_2_1/seam-gen/ivy.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-12 19:37:01 -0400 (Fri, 12 Jun 2009)
New Revision: 11150
Modified:
branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml
Log:
remove unnecessary move command
Modified: branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml
===================================================================
--- branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml 2009-06-12 23:36:45 UTC (rev 11149)
+++ branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml 2009-06-12 23:37:01 UTC (rev 11150)
@@ -36,7 +36,6 @@
<target name="inflate-core" depends="load-ivy">
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" type="jar" sync="${ivy.sync}" symlink="${ivy.use.symlinks}" conf="default"/>
- <move file="${lib.dir}/mvel.jar" tofile="${lib.dir}/mvel14.jar" failonerror="false"/>
</target>
<target name="inflate-source" depends="load-ivy">
15 years, 6 months
Seam SVN: r11149 - in branches/community/Seam_2_2/seam-gen: icefaces/src and 1 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-12 19:36:45 -0400 (Fri, 12 Jun 2009)
New Revision: 11149
Modified:
branches/community/Seam_2_2/seam-gen/build.xml
branches/community/Seam_2_2/seam-gen/icefaces/src/TimerBeanImpl.java
branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml
branches/community/Seam_2_2/seam-gen/ivy/ivy.xml
Log:
add support for ICEfaces in add-ivy command
Modified: branches/community/Seam_2_2/seam-gen/build.xml
===================================================================
--- branches/community/Seam_2_2/seam-gen/build.xml 2009-06-12 23:31:25 UTC (rev 11148)
+++ branches/community/Seam_2_2/seam-gen/build.xml 2009-06-12 23:36:45 UTC (rev 11149)
@@ -1474,18 +1474,47 @@
</target>
<target name="add-ivy" depends="validate-project" description="Add Ivy to the project for downloading dependencies">
- <fail message="Currently the Ivy build is only configured to support RichFaces projects" if="icefaces.property"/>
<copy todir="${project.home}">
<fileset dir="${templates.dir}/ivy"/>
<filterset refid="project"/>
</copy>
- <replace file="${project.home}/build.xml">
+ <condition property="ivy.present">
+ <isfileselected file="${project.home}/build.xml">
+ <contains text="ivy-build.xml"/>
+ </isfileselected>
+ </condition>
+ <replace dir="${project.home}">
+ <include name="build.xml" unless="ivy.present"/>
<replacetoken><![CDATA[<target name="init"]]></replacetoken>
<replacevalue><![CDATA[<!-- Import Ivy targets for downloading dependencies -->
<import file="${basedir}/ivy-build.xml"/>
<target name="init"]]></replacevalue>
</replace>
+
+ <!-- uncomment richfaces dependencies if not using icefaces -->
+ <replace dir="${project.home}">
+ <include name="ivy.xml" unless="icefaces.property"/>
+ <replacetoken><![CDATA[ [if richfaces] ->]]></replacetoken>
+ <replacevalue><![CDATA[ [if richfaces] -->]]></replacevalue>
+ </replace>
+ <replace dir="${project.home}">
+ <include name="ivy.xml" unless="icefaces.property"/>
+ <replacetoken><![CDATA[<!- [/endif richfaces] ]]></replacetoken>
+ <replacevalue><![CDATA[<!-- [/endif richfaces] ]]></replacevalue>
+ </replace>
+
+ <!-- uncomment icefaces dependencies if using icefaces -->
+ <replace dir="${project.home}">
+ <include name="ivy.xml" if="icefaces.property"/>
+ <replacetoken><![CDATA[ [if icefaces] ->]]></replacetoken>
+ <replacevalue><![CDATA[ [if icefaces] -->]]></replacevalue>
+ </replace>
+ <replace dir="${project.home}">
+ <include name="ivy.xml" if="icefaces.property"/>
+ <replacetoken><![CDATA[<!- [/endif icefaces] ]]></replacetoken>
+ <replacevalue><![CDATA[<!-- [/endif icefaces] ]]></replacevalue>
+ </replace>
</target>
<!-- Do not remove generate-entities, netbeans depends on it -->
Modified: branches/community/Seam_2_2/seam-gen/icefaces/src/TimerBeanImpl.java
===================================================================
--- branches/community/Seam_2_2/seam-gen/icefaces/src/TimerBeanImpl.java 2009-06-12 23:31:25 UTC (rev 11148)
+++ branches/community/Seam_2_2/seam-gen/icefaces/src/TimerBeanImpl.java 2009-06-12 23:36:45 UTC (rev 11149)
@@ -58,8 +58,8 @@
import com.icesoft.faces.context.effects.BlindDown;
import com.icesoft.faces.context.effects.BlindUp;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.log.Log;
/**
* @author ICEsoft Technologies, Inc.
@@ -70,6 +70,8 @@
@Scope(ScopeType.PAGE)
public class TimerBeanImpl implements Renderable, Serializable {
+ @Logger private Log log;
+
// expand/contract effects to take place of panelCollapsible
private Effect currentEffect=new BlindUp();
private boolean visibility=false;
@@ -77,7 +79,6 @@
private boolean expanded = false;
private DateFormat dateFormatter;
- private static Log log = LogFactory.getLog(TimerBeanImpl.class);
@In
private RenderManager renderManager;
Modified: branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml
===================================================================
--- branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml 2009-06-12 23:31:25 UTC (rev 11148)
+++ branches/community/Seam_2_2/seam-gen/ivy/ivy-build.xml 2009-06-12 23:36:45 UTC (rev 11149)
@@ -12,6 +12,7 @@
<property name="seam.version" value="2.1.2"/>
<property name="jsf.version" value="1.2_12"/>
<property name="richfaces.version" value="3.3.1.GA"/>
+ <property name="icefaces.version" value="1.8.1"/>
<property name="jboss-embedded.version" value="beta3"/>
<target name="init-ivy">
Modified: branches/community/Seam_2_2/seam-gen/ivy/ivy.xml
===================================================================
--- branches/community/Seam_2_2/seam-gen/ivy/ivy.xml 2009-06-12 23:31:25 UTC (rev 11148)
+++ branches/community/Seam_2_2/seam-gen/ivy/ivy.xml 2009-06-12 23:36:45 UTC (rev 11149)
@@ -11,7 +11,6 @@
<!--
<dependency org="hsqldb" name="hsqldb" rev="1.8.0.8-brew" conf="default"/>
-->
- <dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.15.B1" conf="default,sources"/>
<dependency org="commons-beanutils" name="commons-beanutils" rev="1.7.0" conf="default,sources"/>
<dependency org="commons-digester" name="commons-digester" rev="1.7" conf="default,sources"/>
<dependency org="janino" name="janino" rev="2.5.10" conf="default"/>
@@ -49,12 +48,23 @@
<dependency org="org.jboss.seam" name="jboss-seam-ui" rev="${seam.version}" conf="default,sources"/>
<dependency org="org.jbpm" name="jbpm-jpdl" rev="3.2.2" conf="default"/>
<dependency org="org.mvel" name="mvel2" rev="2.0.10" conf="default"/>
+ <!-- [if richfaces] ->
+ <dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.15.B1" conf="default,sources"/>
<dependency org="org.richfaces.framework" name="richfaces-api" rev="${richfaces.version}" conf="default,sources"/>
<dependency org="org.richfaces.framework" name="richfaces-impl" rev="${richfaces.version}" conf="default,sources"/>
<dependency org="org.richfaces.ui" name="richfaces-ui" rev="${richfaces.version}" conf="default,sources"/>
<dependency org="org.richfaces.samples" name="glassX" rev="${richfaces.version}" conf="default"/>
<dependency org="org.richfaces.samples" name="darkX" rev="${richfaces.version}" conf="default"/>
<dependency org="org.richfaces.samples" name="laguna" rev="${richfaces.version}" conf="default"/>
+ <!- [/endif richfaces] -->
+ <!-- [if icefaces] ->
+ <dependency org="org.icefaces" name="icefaces" rev="${icefaces.version}" conf="default"/>
+ <dependency org="org.icefaces" name="icefaces-comps" rev="${icefaces.version}" conf="default"/>
+ <dependency org="org.icefaces" name="icefaces-facelets" rev="${icefaces.version}" conf="default"/>
+ <dependency org="backport-util-concurrent" name="backport-util-concurrent" rev="2.2" conf="default"/>
+ <dependency org="commons-digester" name="commons-digester" rev="1.8" conf="default"/>
+ <dependency org="commons-fileupload" name="commons-fileupload" rev="1.2.1" conf="default"/>
+ <!- [/endif icefaces] -->
<dependency org="org.testng" name="testng" rev="5.6" conf="test"/>
<dependency org="org.jboss.seam.embedded" name="hibernate-all" rev="${jboss-embedded.version}" conf="test"/>
<dependency org="org.jboss.seam.embedded" name="thirdparty-all" rev="${jboss-embedded.version}" conf="test"/>
15 years, 6 months
Seam SVN: r11148 - in branches/community/Seam_2_1/seam-gen: icefaces/src and 1 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-12 19:31:25 -0400 (Fri, 12 Jun 2009)
New Revision: 11148
Modified:
branches/community/Seam_2_1/seam-gen/build.xml
branches/community/Seam_2_1/seam-gen/icefaces/src/TimerBeanImpl.java
branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml
branches/community/Seam_2_1/seam-gen/ivy/ivy.xml
Log:
add support for ICEfaces in add-ivy command
Modified: branches/community/Seam_2_1/seam-gen/build.xml
===================================================================
--- branches/community/Seam_2_1/seam-gen/build.xml 2009-06-12 23:25:22 UTC (rev 11147)
+++ branches/community/Seam_2_1/seam-gen/build.xml 2009-06-12 23:31:25 UTC (rev 11148)
@@ -1474,18 +1474,47 @@
</target>
<target name="add-ivy" depends="validate-project" description="Add Ivy to the project for downloading dependencies">
- <fail message="Currently the Ivy build is only configured to support RichFaces projects" if="icefaces.property"/>
<copy todir="${project.home}">
<fileset dir="${templates.dir}/ivy"/>
<filterset refid="project"/>
</copy>
- <replace file="${project.home}/build.xml">
+ <condition property="ivy.present">
+ <isfileselected file="${project.home}/build.xml">
+ <contains text="ivy-build.xml"/>
+ </isfileselected>
+ </condition>
+ <replace dir="${project.home}">
+ <include name="build.xml" unless="ivy.present"/>
<replacetoken><![CDATA[<target name="init"]]></replacetoken>
<replacevalue><![CDATA[<!-- Import Ivy targets for downloading dependencies -->
<import file="${basedir}/ivy-build.xml"/>
<target name="init"]]></replacevalue>
</replace>
+
+ <!-- uncomment richfaces dependencies if not using icefaces -->
+ <replace dir="${project.home}">
+ <include name="ivy.xml" unless="icefaces.property"/>
+ <replacetoken><![CDATA[ [if richfaces] ->]]></replacetoken>
+ <replacevalue><![CDATA[ [if richfaces] -->]]></replacevalue>
+ </replace>
+ <replace dir="${project.home}">
+ <include name="ivy.xml" unless="icefaces.property"/>
+ <replacetoken><![CDATA[<!- [/endif richfaces] ]]></replacetoken>
+ <replacevalue><![CDATA[<!-- [/endif richfaces] ]]></replacevalue>
+ </replace>
+
+ <!-- uncomment icefaces dependencies if using icefaces -->
+ <replace dir="${project.home}">
+ <include name="ivy.xml" if="icefaces.property"/>
+ <replacetoken><![CDATA[ [if icefaces] ->]]></replacetoken>
+ <replacevalue><![CDATA[ [if icefaces] -->]]></replacevalue>
+ </replace>
+ <replace dir="${project.home}">
+ <include name="ivy.xml" if="icefaces.property"/>
+ <replacetoken><![CDATA[<!- [/endif icefaces] ]]></replacetoken>
+ <replacevalue><![CDATA[<!-- [/endif icefaces] ]]></replacevalue>
+ </replace>
</target>
<!-- Do not remove generate-entities, netbeans depends on it -->
Modified: branches/community/Seam_2_1/seam-gen/icefaces/src/TimerBeanImpl.java
===================================================================
--- branches/community/Seam_2_1/seam-gen/icefaces/src/TimerBeanImpl.java 2009-06-12 23:25:22 UTC (rev 11147)
+++ branches/community/Seam_2_1/seam-gen/icefaces/src/TimerBeanImpl.java 2009-06-12 23:31:25 UTC (rev 11148)
@@ -58,8 +58,8 @@
import com.icesoft.faces.context.effects.BlindDown;
import com.icesoft.faces.context.effects.BlindUp;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.log.Log;
/**
* @author ICEsoft Technologies, Inc.
@@ -70,6 +70,8 @@
@Scope(ScopeType.PAGE)
public class TimerBeanImpl implements Renderable, Serializable {
+ @Logger private Log log;
+
// expand/contract effects to take place of panelCollapsible
private Effect currentEffect=new BlindUp();
private boolean visibility=false;
@@ -77,7 +79,6 @@
private boolean expanded = false;
private DateFormat dateFormatter;
- private static Log log = LogFactory.getLog(TimerBeanImpl.class);
@In
private RenderManager renderManager;
Modified: branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml
===================================================================
--- branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml 2009-06-12 23:25:22 UTC (rev 11147)
+++ branches/community/Seam_2_1/seam-gen/ivy/ivy-build.xml 2009-06-12 23:31:25 UTC (rev 11148)
@@ -12,6 +12,7 @@
<property name="seam.version" value="2.1.2"/>
<property name="jsf.version" value="1.2_12"/>
<property name="richfaces.version" value="3.3.0.GA"/>
+ <property name="icefaces.version" value="1.8.0"/>
<property name="jboss-embedded.version" value="beta3"/>
<target name="init-ivy">
Modified: branches/community/Seam_2_1/seam-gen/ivy/ivy.xml
===================================================================
--- branches/community/Seam_2_1/seam-gen/ivy/ivy.xml 2009-06-12 23:25:22 UTC (rev 11147)
+++ branches/community/Seam_2_1/seam-gen/ivy/ivy.xml 2009-06-12 23:31:25 UTC (rev 11148)
@@ -11,7 +11,6 @@
<!--
<dependency org="hsqldb" name="hsqldb" rev="1.8.0.8-brew" conf="default"/>
-->
- <dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.15.B1" conf="default,sources"/>
<dependency org="commons-beanutils" name="commons-beanutils" rev="1.7.0" conf="default,sources"/>
<dependency org="commons-digester" name="commons-digester" rev="1.7" conf="default,sources"/>
<dependency org="janino" name="janino" rev="2.5.10" conf="default"/>
@@ -47,12 +46,23 @@
<dependency org="org.jboss.seam" name="jboss-seam-ui" rev="${seam.version}" conf="default,sources"/>
<dependency org="org.jbpm" name="jbpm-jpdl" rev="3.2.2" conf="default"/>
<dependency org="org.mvel" name="mvel14" rev="1.2.21" conf="default"/>
+ <!-- [if richfaces] ->
+ <dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.15.B1" conf="default,sources"/>
<dependency org="org.richfaces.framework" name="richfaces-api" rev="${richfaces.version}" conf="default,sources"/>
<dependency org="org.richfaces.framework" name="richfaces-impl" rev="${richfaces.version}" conf="default,sources"/>
<dependency org="org.richfaces.ui" name="richfaces-ui" rev="${richfaces.version}" conf="default,sources"/>
<dependency org="org.richfaces.samples" name="glassX" rev="${richfaces.version}" conf="default"/>
<dependency org="org.richfaces.samples" name="darkX" rev="${richfaces.version}" conf="default"/>
<dependency org="org.richfaces.samples" name="laguna" rev="${richfaces.version}" conf="default"/>
+ <!- [/endif richfaces] -->
+ <!-- [if icefaces] ->
+ <dependency org="org.icefaces" name="icefaces" rev="${icefaces.version}" conf="default"/>
+ <dependency org="org.icefaces" name="icefaces-comps" rev="${icefaces.version}" conf="default"/>
+ <dependency org="org.icefaces" name="icefaces-facelets" rev="${icefaces.version}" conf="default"/>
+ <dependency org="backport-util-concurrent" name="backport-util-concurrent" rev="2.2" conf="default"/>
+ <dependency org="commons-digester" name="commons-digester" rev="1.8" conf="default"/>
+ <dependency org="commons-fileupload" name="commons-fileupload" rev="1.2.1" conf="default"/>
+ <!- [/endif icefaces] -->
<dependency org="org.testng" name="testng" rev="5.6" conf="test"/>
<dependency org="org.jboss.seam.embedded" name="hibernate-all" rev="${jboss-embedded.version}" conf="test"/>
<dependency org="org.jboss.seam.embedded" name="thirdparty-all" rev="${jboss-embedded.version}" conf="test"/>
15 years, 6 months
Seam SVN: r11147 - in branches/community/Seam_2_2: examples/ui/view and 3 other directories.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2009-06-12 19:25:22 -0400 (Fri, 12 Jun 2009)
New Revision: 11147
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml
branches/community/Seam_2_2/examples/ui/view/equalityValidator.xhtml
branches/community/Seam_2_2/ui/src/main/config/component/equalityValidator.xml
branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/component/UIEqualityValidator.java
branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/renderkit/EqualityValidatorRendererBase.java
Log:
Added support for user to define if validator requires a value as per JBSEAM-4172
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml 2009-06-12 22:00:27 UTC (rev 11146)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Controls.xml 2009-06-12 23:25:22 UTC (rev 11147)
@@ -498,6 +498,11 @@
</listitem>
<listitem>
<para>
+ <literal>required</literal> — False will disable a check that a value at all is inputted in fields.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<literal>messageId</literal> — Message id to show on failure.
</para>
</listitem>
Modified: branches/community/Seam_2_2/examples/ui/view/equalityValidator.xhtml
===================================================================
--- branches/community/Seam_2_2/examples/ui/view/equalityValidator.xhtml 2009-06-12 22:00:27 UTC (rev 11146)
+++ branches/community/Seam_2_2/examples/ui/view/equalityValidator.xhtml 2009-06-12 23:25:22 UTC (rev 11147)
@@ -4,14 +4,14 @@
<ui:param name="tagName" value="s:validateEquality" />
<ui:define name="body">
<h:form>
- <p>Validates that two java.lang.String inputs are equal</p>
+ <p>Validates that two java.lang.String inputs are equal (may be empty)</p>
<h:panelGrid columns="3">
<s:label for="name">Name</s:label>
<h:inputText id="name" value="#{equalityValidatorBean.name}" />
<h:message for="name" />
<s:label for="nameVerification">Name Verification</s:label>
<h:inputText id="nameVerification">
- <s:validateEquality for="name" message="Must be the same as name!" />
+ <s:validateEquality for="name" message="Must be the same as name!" required="false" />
</h:inputText>
<h:message for="nameVerification" />
<h:commandButton action="#{equalityValidatorBean.check}" value="Check name" />
Modified: branches/community/Seam_2_2/ui/src/main/config/component/equalityValidator.xml
===================================================================
--- branches/community/Seam_2_2/ui/src/main/config/component/equalityValidator.xml 2009-06-12 22:00:27 UTC (rev 11146)
+++ branches/community/Seam_2_2/ui/src/main/config/component/equalityValidator.xml 2009-06-12 23:25:22 UTC (rev 11147)
@@ -40,7 +40,13 @@
<name>operator</name>
<classname>java.lang.String</classname>
<description>Operation to use.</description>
- </property>
+ </property>
+ <property>
+ <name>required</name>
+ <classname>boolean</classname>
+ <description>True if a value is required for the filed to validate (default:true)</description>
+ <defaultvalue>true</defaultvalue>
+ </property>
</component>
Modified: branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/component/UIEqualityValidator.java
===================================================================
--- branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/component/UIEqualityValidator.java 2009-06-12 22:00:27 UTC (rev 11146)
+++ branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/component/UIEqualityValidator.java 2009-06-12 23:25:22 UTC (rev 11147)
@@ -26,4 +26,8 @@
public abstract String getOperator();
+ public abstract void setRequired(boolean required);
+
+ public abstract boolean isRequired();
+
}
Modified: branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/renderkit/EqualityValidatorRendererBase.java
===================================================================
--- branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/renderkit/EqualityValidatorRendererBase.java 2009-06-12 22:00:27 UTC (rev 11146)
+++ branches/community/Seam_2_2/ui/src/main/java/org/jboss/seam/ui/renderkit/EqualityValidatorRendererBase.java 2009-06-12 23:25:22 UTC (rev 11147)
@@ -43,7 +43,7 @@
if (!hasEqualityValidator(evh))
{
evh.addValidator(new EqualityValidator(ev.getFor(), ev.getMessage(), ev.getMessageId(), ev.getOperator()));
- evh.setRequired(true);
+ evh.setRequired(ev.isRequired());
}
renderChildren(context, component);
15 years, 6 months
Seam SVN: r11146 - branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-12 18:00:27 -0400 (Fri, 12 Jun 2009)
New Revision: 11146
Modified:
branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Jms.xml
Log:
clarify section on JMS with regard to using Seam components
Modified: branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Jms.xml
===================================================================
--- branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-06-12 21:59:41 UTC (rev 11145)
+++ branches/community/Seam_2_2/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-06-12 22:00:27 UTC (rev 11146)
@@ -9,8 +9,8 @@
</para>
<para>
- But for many use cases, JMS is overkill. Seam layers a simple asynchronous method and event
- facility over your choice of <emphasis>dispatchers</emphasis>:
+ But for cases when you are simply want to use a worker thread, JMS is overkill. Seam layers a simple
+ asynchronous method and event facility over your choice of <emphasis>dispatchers</emphasis>:
</para>
<itemizedlist>
@@ -30,6 +30,198 @@
</para>
</listitem>
</itemizedlist>
+
+ <para>
+ This chapter first covers how to leverage Seam to simplify JMS and then explains how to use the
+ simpler asynchronous method and event facility.
+ </para>
+
+ <sect1>
+ <title>Messaging in Seam</title>
+
+ <para>
+ Seam makes it easy to send and receive JMS messages to and from
+ Seam components. Both the message publisher and the message receiver
+ can be Seam components.
+ </para>
+
+ <para>
+ You'll first learn to setup a queue and topic message publisher and then
+ look at an example that illustrates how to perform the message exchange.
+ </para>
+
+ <sect2>
+ <title>Configuration</title>
+ <para>
+ To configure Seam's infrastructure for sending JMS messages,
+ you need to tell Seam about any topics and queues you want to
+ send messages to, and also tell Seam where to find the
+ <literal>QueueConnectionFactory</literal> and/or
+ <literal>TopicConnectionFactory</literal>.
+ </para>
+
+ <para>
+ Seam defaults to using <literal>UIL2ConnectionFactory</literal>
+ which is the usual connection factory for use with JBossMQ. If
+ you are using some other JMS provider, you need to set one or
+ both of <literal>queueConnection.queueConnectionFactoryJndiName</literal>
+ and <literal>topicConnection.topicConnectionFactoryJndiName</literal>
+ in <literal>seam.properties</literal>, <literal>web.xml</literal>
+ or <literal>components.xml</literal>.
+ </para>
+
+ <para>
+ You also need to list topics and queues in <literal>components.xml</literal>
+ to install Seam managed <literal>TopicPublisher</literal>s and
+ <literal>QueueSender</literal>s:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<jms:managed-topic-publisher name="stockTickerPublisher"
+ auto-create="true"
+ topic-jndi-name="topic/stockTickerTopic"/>
+
+<jms:managed-queue-sender name="paymentQueueSender"
+ auto-create="true"
+ queue-jndi-name="queue/paymentQueue"/>]]></programlisting>
+
+ </sect2>
+
+ <sect2>
+ <title>Sending messages</title>
+ <para>
+ Now, you can inject a JMS <literal>TopicPublisher</literal> and
+ <literal>TopicSession</literal> into any Seam component to publish
+ an object to a topic:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Name("stockPriceChangeNotifier")
+public class StockPriceChangeNotifier
+{
+ @In private TopicPublisher stockTickerPublisher;
+
+ @In private TopicSession topicSession;
+
+ public void publish(StockPrice price)
+ {
+ try
+ {
+ stockTickerPublisher.publish(topicSession.createObjectMessage(price));
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+}]]></programlisting>
+
+ <para>or to a queue:</para>
+
+ <programlisting role="JAVA"><![CDATA[@Name("paymentDispatcher")
+public class PaymentDispatcher
+{
+ @In private QueueSender paymentQueueSender;
+
+ @In private QueueSession queueSession;
+
+ public void publish(Payment payment)
+ {
+ try
+ {
+ paymentQueueSender.send(queueSession.createObjectMessage(payment));
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+}]]></programlisting>
+
+ </sect2>
+
+ <sect2>
+ <title>Receiving messages using a message-driven bean</title>
+ <para>
+ You can process messages using any EJB 3 message-driven bean. The MDB
+ can even be a Seam component, in which case it's possible to inject
+ other event- and application- scoped Seam components. Here's an example
+ of the payment receiver, which delegates to a payment processor.
+ </para>
+ <note>
+ <para>
+ You'll likely need to set the create attribute on the <literal>@In</literal> annotation to true (i.e.
+ create = true) to have Seam create an instance of the component being injected. This isn't necessary if
+ the component supports auto-creation (e.g., it's annotated with <literal>@Autocreate</literal>).
+ </para>
+ </note>
+
+ <para>
+ First, create an MDB to receive the message.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@MessageDriven(activationConfig = {
+ @ActivationConfigProperty(
+ propertyName = "destinationType",
+ propertyValue = "javax.jms.Queue"
+ ),
+ @ActivationConfigProperty(
+ propertyName = "destination",
+ propertyValue = "queue/paymentQueue"
+ )
+})
+@Name("paymentReceiver")
+public class PaymentReceiver implements MessageListener
+{
+ @Logger private Log log;
+
+ @In(create = true) private PaymentProcessor paymentProcessor;
+
+ @Override
+ public void onMessage(Message message)
+ {
+ try
+ {
+ paymentProcessor.processPayment((Payment) ((ObjectMessage) message).getObject());
+ }
+ catch (JMSException ex)
+ {
+ log.error("Message payload did not contain a Payment object", ex);
+ }
+ }
+}]]></programlisting>
+
+ <para>
+ Then, implement the Seam component to which the receiver delegates processing of the payment.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Name("paymentProcessor")
+public class PaymentProcessor
+{
+ @In private EntityManager entityManager;
+
+ public void processPayment(Payment payment)
+ {
+ // perhaps do something more fancy
+ entityManager.persist(payment);
+ }
+}]]></programlisting>
+
+ <para>
+ If you are going to be performing transaction operations in your MDB, you should ensure that you
+ are working with an XA datasource. Otherwise, it won't be possible to rollback database changes
+ if the database transaction commits and a subsequent operation being performed by the message
+ fails.
+ </para>
+ </sect2>
+
+ <sect2>
+ <title>Receiving messages in the client</title>
+ <para>
+ Seam Remoting lets you subscribe to a JMS topic from client-side JavaScript. This is
+ described in <xref linkend="remoting"/>.
+ </para>
+ </sect2>
+
+ </sect1>
<sect1>
<title>Asynchronicity</title>
@@ -412,110 +604,4 @@
</sect2>
</sect1>
-
- <sect1>
- <title>Messaging in Seam</title>
-
- <para>
- Seam makes it easy to send and receive JMS messages to and from
- Seam components.
- </para>
-
- <sect2>
- <title>Configuration</title>
- <para>
- To configure Seam's infrastructure for sending JMS messages,
- you need to tell Seam about any topics and queues you want to
- send messages to, and also tell Seam where to find the
- <literal>QueueConnectionFactory</literal> and/or
- <literal>TopicConnectionFactory</literal>.
- </para>
-
- <para>
- Seam defaults to using <literal>UIL2ConnectionFactory</literal>
- which is the usual connection factory for use with JBossMQ. If
- you are using some other JMS provider, you need to set one or
- both of <literal>queueConnection.queueConnectionFactoryJndiName</literal>
- and <literal>topicConnection.topicConnectionFactoryJndiName</literal>
- in <literal>seam.properties</literal>, <literal>web.xml</literal>
- or <literal>components.xml</literal>.
- </para>
-
- <para>
- You also need to list topics and queues in <literal>components.xml</literal>
- to install Seam managed <literal>TopicPublisher</literal>s and
- <literal>QueueSender</literal>s:
- </para>
-
- <programlisting role="XML"><![CDATA[<jms:managed-topic-publisher name="stockTickerPublisher"
- auto-create="true"
- topic-jndi-name="topic/stockTickerTopic"/>
-
-<jms:managed-queue-sender name="paymentQueueSender"
- auto-create="true"
- queue-jndi-name="queue/paymentQueue"/>]]></programlisting>
-
- </sect2>
-
- <sect2>
- <title>Sending messages</title>
- <para>
- Now, you can inject a JMS <literal>TopicPublisher</literal> and
- <literal>TopicSession</literal> into any component:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@In
-private TopicPublisher stockTickerPublisher;
-@In
-private TopicSession topicSession;
-
-public void publish(StockPrice price) {
- try
- {
- stockTickerPublisher.publish( topicSession.createObjectMessage(price) );
- }
- catch (Exception ex)
- {
- throw new RuntimeException(ex);
- }
-}]]></programlisting>
-
- <para>Or, for working with a queue:</para>
-
- <programlisting role="JAVA"><![CDATA[@In
-private QueueSender paymentQueueSender;
-@In
-private QueueSession queueSession;
-
-public void publish(Payment payment) {
- try
- {
- paymentQueueSender.send( queueSession.createObjectMessage(payment) );
- }
- catch (Exception ex)
- {
- throw new RuntimeException(ex);
- }
-}]]></programlisting>
-
- </sect2>
-
- <sect2>
- <title>Receiving messages using a message-driven bean</title>
- <para>
- You can process messages using any EJB3 message driven bean. Message-driven
- beans may even be Seam components, in which case it is possible to inject
- other event and application scoped Seam components.
- </para>
- </sect2>
-
- <sect2>
- <title>Receiving messages in the client</title>
- <para>
- Seam Remoting lets you subscribe to a JMS topic from client-side JavaScript. This is
- described in <xref linkend="remoting"/>.
- </para>
- </sect2>
-
- </sect1>
</chapter>
15 years, 6 months
Seam SVN: r11145 - branches/community/Seam_2_1/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-12 17:59:41 -0400 (Fri, 12 Jun 2009)
New Revision: 11145
Modified:
branches/community/Seam_2_1/doc/Seam_Reference_Guide/en-US/Jms.xml
Log:
clarify the section on JMS regarding the use of Seam components
Modified: branches/community/Seam_2_1/doc/Seam_Reference_Guide/en-US/Jms.xml
===================================================================
--- branches/community/Seam_2_1/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-06-12 21:21:46 UTC (rev 11144)
+++ branches/community/Seam_2_1/doc/Seam_Reference_Guide/en-US/Jms.xml 2009-06-12 21:59:41 UTC (rev 11145)
@@ -9,8 +9,8 @@
</para>
<para>
- But for many use cases, JMS is overkill. Seam layers a simple asynchronous method and event
- facility over your choice of <emphasis>dispatchers</emphasis>:
+ But for cases when you are simply want to use a worker thread, JMS is overkill. Seam layers a simple
+ asynchronous method and event facility over your choice of <emphasis>dispatchers</emphasis>:
</para>
<itemizedlist>
@@ -30,6 +30,198 @@
</para>
</listitem>
</itemizedlist>
+
+ <para>
+ This chapter first covers how to leverage Seam to simplify JMS and then explains how to use the
+ simpler asynchronous method and event facility.
+ </para>
+
+ <sect1>
+ <title>Messaging in Seam</title>
+
+ <para>
+ Seam makes it easy to send and receive JMS messages to and from
+ Seam components. Both the message publisher and the message receiver
+ can be Seam components.
+ </para>
+
+ <para>
+ You'll first learn to setup a queue and topic message publisher and then
+ look at an example that illustrates how to perform the message exchange.
+ </para>
+
+ <sect2>
+ <title>Configuration</title>
+ <para>
+ To configure Seam's infrastructure for sending JMS messages,
+ you need to tell Seam about any topics and queues you want to
+ send messages to, and also tell Seam where to find the
+ <literal>QueueConnectionFactory</literal> and/or
+ <literal>TopicConnectionFactory</literal>.
+ </para>
+
+ <para>
+ Seam defaults to using <literal>UIL2ConnectionFactory</literal>
+ which is the usual connection factory for use with JBossMQ. If
+ you are using some other JMS provider, you need to set one or
+ both of <literal>queueConnection.queueConnectionFactoryJndiName</literal>
+ and <literal>topicConnection.topicConnectionFactoryJndiName</literal>
+ in <literal>seam.properties</literal>, <literal>web.xml</literal>
+ or <literal>components.xml</literal>.
+ </para>
+
+ <para>
+ You also need to list topics and queues in <literal>components.xml</literal>
+ to install Seam managed <literal>TopicPublisher</literal>s and
+ <literal>QueueSender</literal>s:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<jms:managed-topic-publisher name="stockTickerPublisher"
+ auto-create="true"
+ topic-jndi-name="topic/stockTickerTopic"/>
+
+<jms:managed-queue-sender name="paymentQueueSender"
+ auto-create="true"
+ queue-jndi-name="queue/paymentQueue"/>]]></programlisting>
+
+ </sect2>
+
+ <sect2>
+ <title>Sending messages</title>
+ <para>
+ Now, you can inject a JMS <literal>TopicPublisher</literal> and
+ <literal>TopicSession</literal> into any Seam component to publish
+ an object to a topic:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Name("stockPriceChangeNotifier")
+public class StockPriceChangeNotifier
+{
+ @In private TopicPublisher stockTickerPublisher;
+
+ @In private TopicSession topicSession;
+
+ public void publish(StockPrice price)
+ {
+ try
+ {
+ stockTickerPublisher.publish(topicSession.createObjectMessage(price));
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+}]]></programlisting>
+
+ <para>or to a queue:</para>
+
+ <programlisting role="JAVA"><![CDATA[@Name("paymentDispatcher")
+public class PaymentDispatcher
+{
+ @In private QueueSender paymentQueueSender;
+
+ @In private QueueSession queueSession;
+
+ public void publish(Payment payment)
+ {
+ try
+ {
+ paymentQueueSender.send(queueSession.createObjectMessage(payment));
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+}]]></programlisting>
+
+ </sect2>
+
+ <sect2>
+ <title>Receiving messages using a message-driven bean</title>
+ <para>
+ You can process messages using any EJB 3 message-driven bean. The MDB
+ can even be a Seam component, in which case it's possible to inject
+ other event- and application- scoped Seam components. Here's an example
+ of the payment receiver, which delegates to a payment processor.
+ </para>
+ <note>
+ <para>
+ You'll likely need to set the create attribute on the <literal>@In</literal> annotation to true (i.e.
+ create = true) to have Seam create an instance of the component being injected. This isn't necessary if
+ the component supports auto-creation (e.g., it's annotated with <literal>@Autocreate</literal>).
+ </para>
+ </note>
+
+ <para>
+ First, create an MDB to receive the message.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@MessageDriven(activationConfig = {
+ @ActivationConfigProperty(
+ propertyName = "destinationType",
+ propertyValue = "javax.jms.Queue"
+ ),
+ @ActivationConfigProperty(
+ propertyName = "destination",
+ propertyValue = "queue/paymentQueue"
+ )
+})
+@Name("paymentReceiver")
+public class PaymentReceiver implements MessageListener
+{
+ @Logger private Log log;
+
+ @In(create = true) private PaymentProcessor paymentProcessor;
+
+ @Override
+ public void onMessage(Message message)
+ {
+ try
+ {
+ paymentProcessor.processPayment((Payment) ((ObjectMessage) message).getObject());
+ }
+ catch (JMSException ex)
+ {
+ log.error("Message payload did not contain a Payment object", ex);
+ }
+ }
+}]]></programlisting>
+
+ <para>
+ Then, implement the Seam component to which the receiver delegates processing of the payment.
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[@Name("paymentProcessor")
+public class PaymentProcessor
+{
+ @In private EntityManager entityManager;
+
+ public void processPayment(Payment payment)
+ {
+ // perhaps do something more fancy
+ entityManager.persist(payment);
+ }
+}]]></programlisting>
+
+ <para>
+ If you are going to be performing transaction operations in your MDB, you should ensure that you
+ are working with an XA datasource. Otherwise, it won't be possible to rollback database changes
+ if the database transaction commits and a subsequent operation being performed by the message
+ fails.
+ </para>
+ </sect2>
+
+ <sect2>
+ <title>Receiving messages in the client</title>
+ <para>
+ Seam Remoting lets you subscribe to a JMS topic from client-side JavaScript. This is
+ described in <xref linkend="remoting"/>.
+ </para>
+ </sect2>
+
+ </sect1>
<sect1>
<title>Asynchronicity</title>
@@ -412,110 +604,4 @@
</sect2>
</sect1>
-
- <sect1>
- <title>Messaging in Seam</title>
-
- <para>
- Seam makes it easy to send and receive JMS messages to and from
- Seam components.
- </para>
-
- <sect2>
- <title>Configuration</title>
- <para>
- To configure Seam's infrastructure for sending JMS messages,
- you need to tell Seam about any topics and queues you want to
- send messages to, and also tell Seam where to find the
- <literal>QueueConnectionFactory</literal> and/or
- <literal>TopicConnectionFactory</literal>.
- </para>
-
- <para>
- Seam defaults to using <literal>UIL2ConnectionFactory</literal>
- which is the usual connection factory for use with JBossMQ. If
- you are using some other JMS provider, you need to set one or
- both of <literal>queueConnection.queueConnectionFactoryJndiName</literal>
- and <literal>topicConnection.topicConnectionFactoryJndiName</literal>
- in <literal>seam.properties</literal>, <literal>web.xml</literal>
- or <literal>components.xml</literal>.
- </para>
-
- <para>
- You also need to list topics and queues in <literal>components.xml</literal>
- to install Seam managed <literal>TopicPublisher</literal>s and
- <literal>QueueSender</literal>s:
- </para>
-
- <programlisting role="XML"><![CDATA[<jms:managed-topic-publisher name="stockTickerPublisher"
- auto-create="true"
- topic-jndi-name="topic/stockTickerTopic"/>
-
-<jms:managed-queue-sender name="paymentQueueSender"
- auto-create="true"
- queue-jndi-name="queue/paymentQueue"/>]]></programlisting>
-
- </sect2>
-
- <sect2>
- <title>Sending messages</title>
- <para>
- Now, you can inject a JMS <literal>TopicPublisher</literal> and
- <literal>TopicSession</literal> into any component:
- </para>
-
- <programlisting role="JAVA"><![CDATA[@In
-private TopicPublisher stockTickerPublisher;
-@In
-private TopicSession topicSession;
-
-public void publish(StockPrice price) {
- try
- {
- stockTickerPublisher.publish( topicSession.createObjectMessage(price) );
- }
- catch (Exception ex)
- {
- throw new RuntimeException(ex);
- }
-}]]></programlisting>
-
- <para>Or, for working with a queue:</para>
-
- <programlisting role="JAVA"><![CDATA[@In
-private QueueSender paymentQueueSender;
-@In
-private QueueSession queueSession;
-
-public void publish(Payment payment) {
- try
- {
- paymentQueueSender.send( queueSession.createObjectMessage(payment) );
- }
- catch (Exception ex)
- {
- throw new RuntimeException(ex);
- }
-}]]></programlisting>
-
- </sect2>
-
- <sect2>
- <title>Receiving messages using a message-driven bean</title>
- <para>
- You can process messages using any EJB3 message driven bean. Message-driven
- beans may even be Seam components, in which case it is possible to inject
- other event and application scoped Seam components.
- </para>
- </sect2>
-
- <sect2>
- <title>Receiving messages in the client</title>
- <para>
- Seam Remoting lets you subscribe to a JMS topic from client-side JavaScript. This is
- described in <xref linkend="remoting"/>.
- </para>
- </sect2>
-
- </sect1>
</chapter>
15 years, 6 months
Seam SVN: r11144 - branches/community/Seam_2_2/src/main/org/jboss/seam/jms.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-12 17:21:46 -0400 (Fri, 12 Jun 2009)
New Revision: 11144
Removed:
branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java
branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java
Log:
rollback. turns out we don't need this stuff. need to update docs so people don't get confused again.
Deleted: branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java 2009-06-12 21:21:33 UTC (rev 11143)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java 2009-06-12 21:21:46 UTC (rev 11144)
@@ -1,161 +0,0 @@
-package org.jboss.seam.jms;
-
-import java.lang.reflect.ParameterizedType;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.async.AbstractDispatcher;
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * <p>
- * A class which provides a contextual-thread context for message-driven beans
- * in the scope of which Seam components can be instantiated and invoked.
- * </p>
- *
- * <p>
- * NOTE: Users are still likely to get the error reported in <a
- * href="https://jira.jboss.org/jira/browse/EJBTHREE-898">EJBTHREE-898</a> if a
- * transaction operation is performed in the message handler.
- * </p>
- *
- * @author Dan Allen
- */
-public abstract class ContextualMessageHandlerRequest<T>
-{
- private static transient final LogProvider log = Logging.getLogProvider(ContextualMessageHandlerRequest.class);
-
- private Message message;
- private boolean setupRequired = false;
- private Object result = null;
- private T delegate;
-
- public ContextualMessageHandlerRequest(Message message)
- {
- this.message = message;
- this.setupRequired = !Contexts.isApplicationContextActive() && !Contexts.isEventContextActive();
- }
-
- public void run() throws Exception
- {
- setup();
- try
- {
- process();
- }
- finally
- {
- cleanup();
- }
- }
-
- public abstract void process() throws Exception;
-
- protected void setResult(Object result)
- {
- this.result = result;
- }
-
- public T getDelegate()
- {
- return delegate;
- }
-
- public Object getResult()
- {
- return result;
- }
-
- public Message getMessage()
- {
- return message;
- }
-
- /**
- * A convenience method to return the message as a TextMessage. If the
- * message is not a TextMessage, a null value is returned.
- */
- public TextMessage getTextMessage()
- {
- return message instanceof TextMessage ? (TextMessage) message : null;
- }
-
- @SuppressWarnings("unchecked")
- private void setup()
- {
- if (setupRequired)
- {
- Lifecycle.beginCall();
- }
-
- Contexts.getEventContext().set(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL, true);
- if (Init.instance().isJbpmInstalled())
- {
- setupProcessOrTask();
- }
-
- Class<T> delegateClass = getDelegateClass();
- if (delegateClass != null)
- {
- delegate = (T) Component.getInstance(delegateClass);
- }
- }
-
- private void setupProcessOrTask()
- {
- try
- {
- Long taskId = message.getLongProperty("taskId");
- if (taskId != null)
- {
- BusinessProcess.instance().resumeTask(taskId);
- return;
- }
- }
- catch (JMSException e)
- {
- log.debug("Could not retrieve taskId from message object: " + e.getMessage());
- }
-
- try
- {
- Long processId = message.getLongProperty("processId");
- if (processId != null)
- {
- BusinessProcess.instance().resumeProcess(processId);
- return;
- }
- }
- catch (JMSException e)
- {
- log.debug("Could not retrieve processId from message object: " + e.getMessage());
- }
- }
-
- private void cleanup()
- {
- Contexts.getEventContext().remove(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL);
- if (setupRequired)
- {
- Lifecycle.endCall();
- }
- }
-
- /**
- * Get the type specified in the type parameter of the class. TODO This could
- * be made safer
- */
- @SuppressWarnings("unchecked")
- public Class<T> getDelegateClass()
- {
- return (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
- }
-}
Deleted: branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java
===================================================================
--- branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java 2009-06-12 21:21:33 UTC (rev 11143)
+++ branches/community/Seam_2_2/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java 2009-06-12 21:21:46 UTC (rev 11144)
@@ -1,44 +0,0 @@
-package org.jboss.seam.jms;
-
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.InvocationContext;
-import javax.jms.Message;
-
-/**
- * <p>
- * An interceptor which is intented to be applied to message-driven beans to
- * setup a Seam request life cycle within the boundaries of the bean's method
- * calls so Seam components can be instantiated and invoked.
- * </p>
- *
- * <p>
- * TODO It would be nice to bake in an exception callback like the async
- * integration supports
- * </P>
- *
- * @author Dan Allen
- */
-public class ContextualMessageHandlerRequestInterceptor
-{
- @AroundInvoke
- public Object aroundInvoke(final InvocationContext invocation) throws Exception
- {
- String methodName = invocation.getMethod().getName();
- Object[] args = invocation.getParameters();
- if (!"onMessage".equals(methodName) || args.length != 1 || !(args[0] instanceof Message))
- {
- return invocation.proceed();
- }
-
- ContextualMessageHandlerRequest contextualRequest = new ContextualMessageHandlerRequest((Message) invocation.getParameters()[0])
- {
- @Override
- public void process() throws Exception
- {
- setResult(invocation.proceed());
- }
- };
- contextualRequest.run();
- return contextualRequest.getResult();
- }
-}
15 years, 6 months
Seam SVN: r11143 - branches/community/Seam_2_1/src/main/org/jboss/seam/jms.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-06-12 17:21:33 -0400 (Fri, 12 Jun 2009)
New Revision: 11143
Removed:
branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java
branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java
Log:
rollback. turns out we don't need this stuff. need to update docs so people don't get confused again.
Deleted: branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java
===================================================================
--- branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java 2009-06-12 13:14:06 UTC (rev 11142)
+++ branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequest.java 2009-06-12 21:21:33 UTC (rev 11143)
@@ -1,161 +0,0 @@
-package org.jboss.seam.jms;
-
-import java.lang.reflect.ParameterizedType;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-
-import org.jboss.seam.Component;
-import org.jboss.seam.async.AbstractDispatcher;
-import org.jboss.seam.bpm.BusinessProcess;
-import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
-import org.jboss.seam.core.Init;
-import org.jboss.seam.log.LogProvider;
-import org.jboss.seam.log.Logging;
-
-/**
- * <p>
- * A class which provides a contextual-thread context for message-driven beans
- * in the scope of which Seam components can be instantiated and invoked.
- * </p>
- *
- * <p>
- * NOTE: Users are still likely to get the error reported in <a
- * href="https://jira.jboss.org/jira/browse/EJBTHREE-898">EJBTHREE-898</a> if a
- * transaction operation is performed in the message handler.
- * </p>
- *
- * @author Dan Allen
- */
-public abstract class ContextualMessageHandlerRequest<T>
-{
- private static transient final LogProvider log = Logging.getLogProvider(ContextualMessageHandlerRequest.class);
-
- private Message message;
- private boolean setupRequired = false;
- private Object result = null;
- private T delegate;
-
- public ContextualMessageHandlerRequest(Message message)
- {
- this.message = message;
- this.setupRequired = !Contexts.isApplicationContextActive() && !Contexts.isEventContextActive();
- }
-
- public void run() throws Exception
- {
- setup();
- try
- {
- process();
- }
- finally
- {
- cleanup();
- }
- }
-
- public abstract void process() throws Exception;
-
- protected void setResult(Object result)
- {
- this.result = result;
- }
-
- public T getDelegate()
- {
- return delegate;
- }
-
- public Object getResult()
- {
- return result;
- }
-
- public Message getMessage()
- {
- return message;
- }
-
- /**
- * A convenience method to return the message as a TextMessage. If the
- * message is not a TextMessage, a null value is returned.
- */
- public TextMessage getTextMessage()
- {
- return message instanceof TextMessage ? (TextMessage) message : null;
- }
-
- @SuppressWarnings("unchecked")
- private void setup()
- {
- if (setupRequired)
- {
- Lifecycle.beginCall();
- }
-
- Contexts.getEventContext().set(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL, true);
- if (Init.instance().isJbpmInstalled())
- {
- setupProcessOrTask();
- }
-
- Class<T> delegateClass = getDelegateClass();
- if (delegateClass != null)
- {
- delegate = (T) Component.getInstance(delegateClass);
- }
- }
-
- private void setupProcessOrTask()
- {
- try
- {
- Long taskId = message.getLongProperty("taskId");
- if (taskId != null)
- {
- BusinessProcess.instance().resumeTask(taskId);
- return;
- }
- }
- catch (JMSException e)
- {
- log.debug("Could not retrieve taskId from message object: " + e.getMessage());
- }
-
- try
- {
- Long processId = message.getLongProperty("processId");
- if (processId != null)
- {
- BusinessProcess.instance().resumeProcess(processId);
- return;
- }
- }
- catch (JMSException e)
- {
- log.debug("Could not retrieve processId from message object: " + e.getMessage());
- }
- }
-
- private void cleanup()
- {
- Contexts.getEventContext().remove(AbstractDispatcher.EXECUTING_ASYNCHRONOUS_CALL);
- if (setupRequired)
- {
- Lifecycle.endCall();
- }
- }
-
- /**
- * Get the type specified in the type parameter of the class. TODO This could
- * be made safer
- */
- @SuppressWarnings("unchecked")
- public Class<T> getDelegateClass()
- {
- return (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
- }
-}
Deleted: branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java
===================================================================
--- branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java 2009-06-12 13:14:06 UTC (rev 11142)
+++ branches/community/Seam_2_1/src/main/org/jboss/seam/jms/ContextualMessageHandlerRequestInterceptor.java 2009-06-12 21:21:33 UTC (rev 11143)
@@ -1,44 +0,0 @@
-package org.jboss.seam.jms;
-
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.InvocationContext;
-import javax.jms.Message;
-
-/**
- * <p>
- * An interceptor which is intented to be applied to message-driven beans to
- * setup a Seam request life cycle within the boundaries of the bean's method
- * calls so Seam components can be instantiated and invoked.
- * </p>
- *
- * <p>
- * TODO It would be nice to bake in an exception callback like the async
- * integration supports
- * </P>
- *
- * @author Dan Allen
- */
-public class ContextualMessageHandlerRequestInterceptor
-{
- @AroundInvoke
- public Object aroundInvoke(final InvocationContext invocation) throws Exception
- {
- String methodName = invocation.getMethod().getName();
- Object[] args = invocation.getParameters();
- if (!"onMessage".equals(methodName) || args.length != 1 || !(args[0] instanceof Message))
- {
- return invocation.proceed();
- }
-
- ContextualMessageHandlerRequest contextualRequest = new ContextualMessageHandlerRequest((Message) invocation.getParameters()[0])
- {
- @Override
- public void process() throws Exception
- {
- setResult(invocation.proceed());
- }
- };
- contextualRequest.run();
- return contextualRequest.getResult();
- }
-}
15 years, 6 months