[webbeans-commits] Webbeans SVN: r727 - doc/trunk/reference/en/modules.
by webbeans-commits@lists.jboss.org
Author: nico.ben
Date: 2008-12-25 10:05:06 -0500 (Thu, 25 Dec 2008)
New Revision: 727
Modified:
doc/trunk/reference/en/modules/specialization.xml
Log:
Corrected error
Modified: doc/trunk/reference/en/modules/specialization.xml
===================================================================
--- doc/trunk/reference/en/modules/specialization.xml 2008-12-25 13:17:59 UTC (rev 726)
+++ doc/trunk/reference/en/modules/specialization.xml 2008-12-25 15:05:06 UTC (rev 727)
@@ -141,7 +141,7 @@
<para>If any of these conditions are violated, the Web Bean manager throws
an exception at initialization time.</para>
- <para>Therefore, we can be certain that the superclass with <emphasis>never</emphasis>
+ <para>Therefore, we can be certain that the superclass will <emphasis>never</emphasis>
be called in any deployment of the system where the Web Bean annotated
<literal>@Specializes</literal> is deployed and enabled.</para>
16 years
[webbeans-commits] Webbeans SVN: r726 - doc/trunk/reference/it-IT/modules.
by webbeans-commits@lists.jboss.org
Author: nico.ben
Date: 2008-12-25 08:17:59 -0500 (Thu, 25 Dec 2008)
New Revision: 726
Modified:
doc/trunk/reference/it-IT/modules/events.po
doc/trunk/reference/it-IT/modules/ri-spi.po
Log:
WBRI-69: Italian translation for Web Beans
Modified: doc/trunk/reference/it-IT/modules/events.po
===================================================================
--- doc/trunk/reference/it-IT/modules/events.po 2008-12-25 11:40:55 UTC (rev 725)
+++ doc/trunk/reference/it-IT/modules/events.po 2008-12-25 13:17:59 UTC (rev 726)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-25 12:40+0100\n"
+"PO-Revision-Date: 2008-12-25 13:41+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -405,7 +405,7 @@
#: events.xml:199
#, no-c-format
msgid "Transactional observers receive their event notifications during the before or after completion phase of the transaction in which the event was raised. For example, the following observer method needs to refresh a query result set that is cached in the application context, but only when transactions that update the <literal>Category</literal> tree succeed:"
-msgstr ""
+msgstr "Gli osservatori transazionali ricevono notifiche d'evento prima o dopo la fase di completamento della transazione, nella quale l'evento viene sollevato. Per esempio, il seguente metodo osservatore ha bisogno di aggiornare il set di risultati della query memorizzato nel contesto dell'applicazione, ma solo quando hanno successo le transazioni che aggiornano l'albero <literal>Category</literal>."
#. Tag: programlisting
#: events.xml:205
@@ -417,37 +417,37 @@
#: events.xml:207
#, no-c-format
msgid "There are three kinds of transactional observers:"
-msgstr ""
+msgstr "Ci sono tre tipi di osservatori transazionali:"
#. Tag: para
#: events.xml:211
#, no-c-format
msgid "<literal>@AfterTransactionSuccess</literal> observers are called during the after completion phase of the transaction, but only if the transaction completes successfully"
-msgstr ""
+msgstr "gli osservatori <literal>@AfterTransactionSuccess</literal> vengono chiamati dopo la fase di completamento della transazione, ma solo se questa si completa con successo"
#. Tag: para
#: events.xml:216
#, no-c-format
msgid "<literal>@AfterTransactionFailure</literal> observers are called during the after completion phase of the transaction, but only if the transaction fails to complete successfully"
-msgstr ""
+msgstr "gli osservatori <literal>@AfterTransactionFailure</literal> vengono chiamati dopo la fase di completamento della transazione, ma solo se questa fallisce e quindi non completa con successo"
#. Tag: para
#: events.xml:221
#, no-c-format
msgid "<literal>@AfterTransactionCompletion</literal> observers are called during the after completion phase of the transaction"
-msgstr ""
+msgstr "gli osservatori <literal>@AfterTransactionCompletion</literal> vengono chiamati dopo la fase di completamento della transazione"
#. Tag: para
#: events.xml:225
#, no-c-format
msgid "<literal>@BeforeTransactionCompletion</literal> observers are called during the before completion phase of the transaction"
-msgstr ""
+msgstr "gli osservatori <literal>@BeforeTransactionCompletion</literal> vengono chiamati prima della fase di completamento della transazione"
#. Tag: para
#: events.xml:230
#, no-c-format
msgid "Transactional observers are very important in a stateful object model like Web Beans, because state is often held for longer than a single atomic transaction."
-msgstr ""
+msgstr "Gli osservatori transazionali sono molto importanti in un modello ad oggetto stateful come Web Beans, poiché lo stato è spesso mantenuto per un tempo più lungo di una singola transazione atomica."
#. Tag: para
#: events.xml:233
Modified: doc/trunk/reference/it-IT/modules/ri-spi.po
===================================================================
--- doc/trunk/reference/it-IT/modules/ri-spi.po 2008-12-25 11:40:55 UTC (rev 725)
+++ doc/trunk/reference/it-IT/modules/ri-spi.po 2008-12-25 13:17:59 UTC (rev 726)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-20 22:07+0000\n"
-"PO-Revision-Date: 2008-12-24 19:39+0100\n"
+"PO-Revision-Date: 2008-12-25 14:12+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -17,19 +17,19 @@
#: ri-spi.xml:4
#, no-c-format
msgid "Integrating the Web Beans RI into other environments"
-msgstr ""
+msgstr "Integrazione di Web Beans RI in altri ambienti"
#. Tag: para
#: ri-spi.xml:6
#, no-c-format
msgid "Currently the Web Beans RI only runs in JBoss AS 5; integrating the RI into other EE environments (for example another application server like Glassfish), into a servlet container (like Tomcat), or with an Embedded EJB3.1 implementation is fairly easy. In this Appendix we will briefly discuss the steps needed."
-msgstr ""
+msgstr "Attualmente Web Bean RI funziona solo in JBoss AS 5; l'integrazione di RI in altri ambienti EE (per esempio in un application server come Glassfish), in un servlet container (come Tomcat), o con un'implementazione EJB3.1 Embedded è abbastanza facile. In questo appendice si discuterà brevemente dei passi necessari."
#. Tag: para
#: ri-spi.xml:15
#, no-c-format
msgid "It should be possible to run Web Beans in an SE environment, but you'll to do more work, adding your own contexts and lifecycle. The Web Beans RI currently doesn't expose lifecycle extension points, so you would have to code directly against Web Beans RI classes."
-msgstr ""
+msgstr "Dovrebbe essere possibile far funzionare Web Beans in un ambiente SE, ma occorre molto lavoro per aggiungere i propri contesti ed il ciclo di vita. Web Beans RI attualmemnte non espone punti di estensione del ciclo di vita, così occorre codificare direttamente nelle classi Web Beans RI."
#. Tag: title
#: ri-spi.xml:24
@@ -41,13 +41,13 @@
#: ri-spi.xml:26
#, no-c-format
msgid "The Web Beans SPI is located in <literal>webbeans-ri-spi</literal> module, and packaged as <literal>webbeans-ri-spi.jar</literal>."
-msgstr ""
+msgstr "Web Beans SPI è collocato nel modulo <literal>webbeans-ri-spi</literal>, ed è impacchettato come <literal>webbeans-ri-spi.jar</literal>.\""
#. Tag: para
#: ri-spi.xml:31
#, no-c-format
msgid "Currently, the only SPI to implement is the bootstrap spi:"
-msgstr ""
+msgstr "Attualmente l'unico SPI (Service Provider Interface) da implementare è l'spi di bootstrap:"
#. Tag: programlisting
#: ri-spi.xml:35
@@ -105,13 +105,13 @@
#: ri-spi.xml:37
#, no-c-format
msgid "The discovery of Web Bean classes and <literal>web-bean.xml</literal> files is self-explanatory (the algorithm is described in Section 11.1 of the JSR-299 specification, and isn't repeated here)."
-msgstr ""
+msgstr "L'analisi dei file delle classi Web Bean e di <literal>web-bean.xml</literal> è molto istruttiva (l'algoritmo è descritto nella sezione 11.1 della specifica JSR-299 e non viene qua ripetuto)."
#. Tag: para
#: ri-spi.xml:43
#, no-c-format
msgid "The Web Beans RI also delegates EJB3 bean discovery to the container so that it doesn't have to scan for EJB3 annotations or parse <literal>ejb-jar.xml</literal>. For each EJB in the application an EJBDescriptor should be discovered:"
-msgstr ""
+msgstr "Web Beans RI delega al container la rilevazione dei bean EJB3 così da non essere necessario eseguire lo scan delle annotazioni EJB3 o fare il parsing di <literal>ejb-jar.xml</literal>. Per ciascun EJB nell'applicazione dovrebbe essere rilevato un EJBDescriptor:"
#. Tag: programlisting
#: ri-spi.xml:50
@@ -269,13 +269,13 @@
#: ri-spi.xml:52
#, no-c-format
msgid "The contract described the JavaDoc is enough to implement an EJBDescriptor. In addition to these two interfaces, there is <literal>BusinessInterfaceDescriptor</literal> which represents a local business interface (encapsulating the interface class and jndi name), and <literal>MethodDescriptor</literal> which encapsulates the method name and parameter types (allowing it to be invoked on any instance of the EJB, proxy or otherwise)."
-msgstr ""
+msgstr "Il contrattodescritto in JavaDoc è sufficiente per implementare un EJBDescriptor. In aggiunta a queste due interfacce, vi è <literal>BusinessInterfaceDescriptor</literal> a rappresentare un'interfaccia locale di business (che incapsula la classe d'interfaccia ed il nome jndi), e <literal>MethodDescriptor</literal> che incapsula il nome del metodo ed i tipi di parametri (che consentono di essere invocati su qualsiasi istanza di EJB, proxy o altro)."
#. Tag: para
#: ri-spi.xml:62
#, no-c-format
msgid "The Web Beans RI can be told to load your implementation of <literal>WebBeanDiscovery</literal> using the property <literal>org.jboss.webbeans.bootstrap.webBeanDiscovery</literal> with the fully qualified class name as the value. For example:"
-msgstr ""
+msgstr "Web Beans RI può essere istruita a caricare la propria implementazione di <literal>WebBeanDiscovery</literal> usando la proprietà <literal>org.jboss.webbeans.bootstrap.webBeanDiscovery</literal> con il nome della classe pienamente qualificato (fully qualified) come valore. Per esempio:"
#. Tag: programlisting
#: ri-spi.xml:69
@@ -287,7 +287,7 @@
#: ri-spi.xml:71
#, no-c-format
msgid "The property can either be specified as a system property, or in a properties file <literal>META-INF/web-beans-ri.properties</literal>."
-msgstr ""
+msgstr "La proprietà può essere specificata come proprietà di sistema o nel file di proprietà <literal>META-INF/web-beans-ri.properties</literal>."
#. Tag: title
#: ri-spi.xml:79
@@ -295,23 +295,24 @@
msgid "The contract with the container"
msgstr "Il contratto con il container"
+# rivedere la frase
#. Tag: para
#: ri-spi.xml:81
#, no-c-format
msgid "There are a number of requirements that the Web Beans RI places on the container for correct functioning that fall outside implementation of APIs"
-msgstr ""
+msgstr "Ci sono un numero di requisiti che Web Beans RI pone nel container per il corretto funzionamento al di fuori dell'implementazione delle API"
#. Tag: term
#: ri-spi.xml:89
#, no-c-format
msgid "Classloader isolation"
-msgstr ""
+msgstr "Isolamento del classloader"
#. Tag: para
#: ri-spi.xml:93
#, no-c-format
msgid "If you are integrating the Web Beans into an environment that supports deployment of applications, you must enable, automatically, or through user configuation, classloader isolation for each Web Beans application"
-msgstr ""
+msgstr "Se si integra Web Beans in un ambiente che supporta il deploy di applicazioni, occorre abilitare, automaticamente o attraverso la configurazione utente, l'isolamento del classloader for ogni applicazione Web Beans"
#. Tag: term
#: ri-spi.xml:102
@@ -323,5 +324,5 @@
#: ri-spi.xml:106
#, no-c-format
msgid "If you are integrating the Web Beans into an environment that supports deployment of applications, you must insert the <literal>webbeans-ri.jar</literal> into the applications isolated classloader. It cannot be loaded from a shared classloader."
-msgstr ""
+msgstr "Se si integra Web Beans in un ambiente che supporta il deploy di applicazioni, occorre inserire <literal>webbeans-ri.jar</literal> nel classloader isolato delle applicazioni. Non può essere caricato da un classloader condiviso."
16 years
[webbeans-commits] Webbeans SVN: r725 - doc/trunk/reference/it-IT/modules.
by webbeans-commits@lists.jboss.org
Author: nico.ben
Date: 2008-12-25 06:40:55 -0500 (Thu, 25 Dec 2008)
New Revision: 725
Modified:
doc/trunk/reference/it-IT/modules/events.po
doc/trunk/reference/it-IT/modules/intro.po
doc/trunk/reference/it-IT/modules/producermethods.po
doc/trunk/reference/it-IT/modules/ri-spi.po
doc/trunk/reference/it-IT/modules/stereotypes.po
Log:
WBRI-69: Italian translation for Web Beans
Modified: doc/trunk/reference/it-IT/modules/events.po
===================================================================
--- doc/trunk/reference/it-IT/modules/events.po 2008-12-24 23:55:15 UTC (rev 724)
+++ doc/trunk/reference/it-IT/modules/events.po 2008-12-25 11:40:55 UTC (rev 725)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-21 03:42+0100\n"
+"PO-Revision-Date: 2008-12-25 12:40+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -122,7 +122,7 @@
#: events.xml:63
#, no-c-format
msgid "The event producer may obtain an <emphasis>event notifier</emphasis> object by injection:"
-msgstr ""
+msgstr "Il produttore dell'evento può ottenere tramite iniezione un oggetto <emphasis>notificatore d'evento</emphasis>:"
#. Tag: programlisting
#: events.xml:66
@@ -134,13 +134,13 @@
#: events.xml:68
#, no-c-format
msgid "The <literal>@Observable</literal> annotation implicitly defines a Web Bean with scope <literal>@Dependent</literal> and deployment type <literal>@Standard</literal>, with an implementation provided by the Web Bean manager."
-msgstr ""
+msgstr "L'annotazione <literal>@Observable</literal> definisce implicitamente un Web Bean con scope <literal>@Dependent</literal> e tipo di deploy <literal>@Standard</literal>, con un'implementazione fornita dal manager Web Bean."
#. Tag: para
#: events.xml:72
#, no-c-format
msgid "A producer raises events by calling the <literal>fire()</literal> method of the <literal>Event</literal> interface, passing an <emphasis>event object</emphasis>:"
-msgstr ""
+msgstr "Un produttore solleva eventi chiamando il metodo <literal>fire()</literal> dell'intefaccia <literal>Event</literal>, passando un <emphasis>oggetto evento</emphasis>:"
#. Tag: programlisting
#: events.xml:75
@@ -152,7 +152,7 @@
#: events.xml:77
#, no-c-format
msgid "An event object may be an instance of any Java class that has no type variables or wildcard type parameters. The event will be delivered to every observer method that:"
-msgstr ""
+msgstr "Un oggetto evento può essere un'istanza di una classe Java che non ha variabili tipo o parametri tipo wildcard. L'evento verrà consegnato ad ogni metodo osservatore che:"
#. Tag: para
#: events.xml:83
@@ -160,25 +160,25 @@
#: events.xml:126
#, no-c-format
msgid "has an event parameter to which the event object is assignable, and"
-msgstr ""
+msgstr "ha un parametro evento a cui l'oggetto evento è assegnabile, e"
#. Tag: para
#: events.xml:86
#, no-c-format
msgid "specifies no event bindings."
-msgstr ""
+msgstr "non specifica binding d'evento."
#. Tag: para
#: events.xml:90
#, no-c-format
msgid "The Web Bean manager simply calls all the observer methods, passing the event object as the value of the event parameter. If any observer method throws an exception, the Web Bean manager stops calling observer methods, and the exception is rethrown by the <literal>fire()</literal> method."
-msgstr ""
+msgstr "Il manager Web Bean chiama semplicemente tutti i metodi osservatori, passando l'oggento evento come valore del parametro evento. Se il metodo osservatore lancia un'eccezione, il manager Web Bean smette di chiamare i metodi osservatori, e l'eccezione viene rilanciata dal metodo <literal>fire()</literal>."
#. Tag: para
#: events.xml:95
#, no-c-format
msgid "To specify a \"selector\", the event producer may pass an instance of the event binding type to the <literal>fire()</literal> method:"
-msgstr ""
+msgstr "Per specificare un \"selettore\" il produttore d'evento può passare un'istanza del tipo di binding d'evento al metodo <literal>fire()</literal>:"
#. Tag: programlisting
#: events.xml:98
@@ -190,25 +190,25 @@
#: events.xml:100
#, no-c-format
msgid "The helper class <literal>AnnotationLiteral</literal> makes it possible to instantiate binding types inline, since this is otherwise difficult to do in Java."
-msgstr ""
+msgstr "La classe helper <literal>AnnotationLiteral</literal> rende possibile istanziare inline i tipi di binding, dato che questo risulta difficile da fare in Java."
#. Tag: para
#: events.xml:103
#, no-c-format
msgid "The event will be delivered to every observer method that:"
-msgstr ""
+msgstr "L'evento verrà consegnato ad ogni metodo osservatore che:"
#. Tag: para
#: events.xml:110
#, no-c-format
msgid "does not specify any event binding <emphasis>except</emphasis> for the event bindings passed to <literal>fire()</literal>."
-msgstr ""
+msgstr "non specifica alcun event binding <emphasis>tranne</emphasis> per gli event binding passati a <literal>fire()</literal>."
#. Tag: para
#: events.xml:115
#, no-c-format
msgid "Alternatively, event bindings may be specified by annotating the event notifier injection point:"
-msgstr ""
+msgstr "In alternativa gli event binding possono essere specificati annotando il punto di iniezione del notificato d'evento:"
#. Tag: programlisting
#: events.xml:118
@@ -220,25 +220,26 @@
#: events.xml:120
#, no-c-format
msgid "Then every event fired via this instance of <literal>Event</literal> has the annotated event binding. The event will be delivered to every observer method that:"
-msgstr ""
+msgstr "Quindi ciascun evento sollevato tramite quest'istanza di <literal>Event</literal> ha annotato l'event binding. L'evento verrà consegnato ad ogni metodo osservatore che:"
+# la frase è ambigua...."or the annotated..." si lega a "to" o a "except" ??
#. Tag: para
#: events.xml:129
#, no-c-format
msgid "does not specify any event binding <emphasis>except</emphasis> for the event bindings passed to <literal>fire()</literal> or the annotated event bindings of the event notifier injection point."
-msgstr ""
+msgstr "non specifica alcun event binding <emphasis>tranne</emphasis> per gli event binding passati a <literal>fire()</literal> o per gli event binding annotati del punto di iniezione del notificatore eventi."
#. Tag: title
#: events.xml:138
#, no-c-format
msgid "Registering observers dynamically"
-msgstr ""
+msgstr "Registrare dinamicamente gli osservatori"
#. Tag: para
#: events.xml:140
#, no-c-format
msgid "It's often useful to register an event observer dynamically. The application may implement the <literal>Observer</literal> interface and register an instance with an event notifier by calling the <literal>observe()</literal> method."
-msgstr ""
+msgstr "E' spesso utile registrare un osservatore d'evento in modo dinamico. L'applicazione può implementare l'interfaccia <literal>Observer</literal> e registrare un'istanza con un notificatore d'evento chiamando il metodo <literal>observe()</literal>."
#. Tag: programlisting
#: events.xml:144
@@ -250,7 +251,7 @@
#: events.xml:146
#, no-c-format
msgid "Event binding types may be specified by the event notifier injection point or by passing event binding type instances to the <literal>observe()</literal> method:"
-msgstr ""
+msgstr "I tipi di event binding possono essere specificati dal punto di iniezione del notificatore d'eventi o passando istance del tipo di event binding al metodo <literal>observe()</literal>:"
#. Tag: programlisting
#: events.xml:149
@@ -266,13 +267,13 @@
#: events.xml:154
#, no-c-format
msgid "Event bindings with members"
-msgstr ""
+msgstr "Event binding con membri"
#. Tag: para
#: events.xml:156
#, no-c-format
msgid "An event binding type may have annotation members:"
-msgstr ""
+msgstr "Un tipo di event binding può avere membri annotati:"
#. Tag: programlisting
#: events.xml:158
@@ -296,7 +297,7 @@
#: events.xml:160
#, no-c-format
msgid "The member value is used to narrow the messages delivered to the observer:"
-msgstr ""
+msgstr "Il valore del membro è usato per restringere i messaggi consegnati all'osservatore:"
#. Tag: programlisting
#: events.xml:162
@@ -308,7 +309,7 @@
#: events.xml:164
#, no-c-format
msgid "Event binding type members may be specified statically by the event producer, via annotations at the event notifier injection point:"
-msgstr ""
+msgstr "I membri del tipo di eventbinding possono essere specificati staticamente dal produttore di eventi tramite annotazioni nel punto di iniezione del notificatore d'evento:"
#. Tag: programlisting
#: events.xml:167
@@ -320,7 +321,7 @@
#: events.xml:169
#, no-c-format
msgid "Alternatively, the value of the event binding type member may be determined dynamically by the event producer. We start by writing an abstract subclass of <literal>AnnotationLiteral</literal>:"
-msgstr ""
+msgstr "Alternativamente il valore del membro del tipo di event binding può esserre dinamicamente determinato dal produttore di eventi. Iniziamo scrivendo una sottoclasse astratta di <literal>AnnotationLiteral</literal>:"
#. Tag: programlisting
#: events.xml:172
@@ -338,7 +339,7 @@
#: events.xml:174
#, no-c-format
msgid "The event producer passes an instance of this class to <literal>fire()</literal>:"
-msgstr ""
+msgstr "Il produttore di eventi passa un'istanza di questa classe a <literal>fire()</literal>:"
#. Tag: programlisting
#: events.xml:176
@@ -350,13 +351,13 @@
#: events.xml:181
#, no-c-format
msgid "Multiple event bindings"
-msgstr ""
+msgstr "Event binding multipli"
#. Tag: para
#: events.xml:183
#, no-c-format
msgid "Event binding types may be combined, for example:"
-msgstr ""
+msgstr "I tipi di event binding possono essere combinati, per esempio:"
#. Tag: programlisting
#: events.xml:185
@@ -374,7 +375,7 @@
#: events.xml:187
#, no-c-format
msgid "When this event occurs, all of the following observer methods will be notified:"
-msgstr ""
+msgstr "Quando si genera un evento, tutti i seguenti metodi osservatori verranno notificati:"
#. Tag: programlisting
#: events.xml:189
@@ -504,7 +505,7 @@
#: events.xml:242
#, no-c-format
msgid "The Web Bean that creates and deletes <literal>Product</literal>s could raise events, for example:"
-msgstr ""
+msgstr "Il Web Bean che crea o cancella <literal>Product</literal> può sollevare eventi, per esempio:"
#. Tag: programlisting
#: events.xml:245
@@ -554,7 +555,7 @@
#: events.xml:247
#, no-c-format
msgid "And now <literal>Catalog</literal> can observe the events after successful completion of the transaction:"
-msgstr ""
+msgstr "E ora <literal>Catalog</literal> può osservare gli eventi dopo il completamento (con successo) della transazione:"
#. Tag: programlisting
#: events.xml:250
Modified: doc/trunk/reference/it-IT/modules/intro.po
===================================================================
--- doc/trunk/reference/it-IT/modules/intro.po 2008-12-24 23:55:15 UTC (rev 724)
+++ doc/trunk/reference/it-IT/modules/intro.po 2008-12-25 11:40:55 UTC (rev 725)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-23 20:18+0100\n"
+"PO-Revision-Date: 2008-12-25 12:11+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -190,13 +190,13 @@
#: intro.xml:61
#, no-c-format
msgid "As you've guessed, the <literal>@Initializer</literal> annotation has something to do with dependency injection! <literal>@Initializer</literal> may be applied to a constructor or method of a Web Bean, and tells the Web Bean manager to call that constructor or method when instantiating the Web Bean. The Web Bean manager will inject other Web Beans to the parameters of the constructor or method."
-msgstr "Come hai indovinato, l'annotazione <literal>@Initializer</literal> ha qualcosaa che fare conla dependency injection! <literal>@Initializer</literal> può essere applicato ad un costruttore od un metodo di un Web Bean, e dice al manager Web Bean di chiamare quel costruttore o metodo quando si istanzia il Web Bean. Il manager Web Bean inietterà altri Web Bean nei parametri del costruttore o del metodo."
+msgstr "Come hai indovinato, l'annotazione <literal>@Initializer</literal> ha qualcosa che fare con la dependency injection! <literal>@Initializer</literal> può essere applicato ad un costruttore od un metodo di un Web Bean, e dice al manager Web Bean di chiamare quel costruttore o metodo quando si istanzia il Web Bean. Il manager Web Bean inietterà altri Web Bean nei parametri del costruttore o del metodo."
#. Tag: para
#: intro.xml:68
#, no-c-format
msgid "At system initialization time, the Web Bean manager must validate that exactly one Web Bean exists which satisfies each injection point. In our example, if no implementation of <literal>Translator</literal> available—if the <literal>SentenceTranslator</literal> EJB was not deployed—the Web Bean manager would throw an <literal>UnsatisfiedDependencyException</literal>. If more than one implementation of <literal>Translator</literal> was available, the Web Bean manager would throw an <literal>AmbiguousDependencyException</literal>."
-msgstr "In fase di inizializzazione del sistema, il manager Web Bean deve convalidare che esattamente un solo Web Bean esista e soddisfi ciascun punto di iniezione. Nell'esempio, se nessuna implementazione di <literal>Translator</literal> fosse disponibile—se l'EJB <literal>SentenceTranslator</literal> non è stato deplyato—il manager Web Bean lancerebbe una <literal>UnsatisfiedDependencyException</literal>. Se più di un'implementazione di <literal>Translator</literal> fosse disponibile, il manager Web Bean lancerebbe una <literal>AmbiguousDependencyException</literal>."
+msgstr "In fase di inizializzazione del sistema, il manager Web Bean deve convalidare che esattamente un solo Web Bean esista e soddisfi ciascun punto di iniezione. Nell'esempio, se nessuna implementazione di <literal>Translator</literal> fosse disponibile—se l'EJB <literal>SentenceTranslator</literal> non venisse deployato—il manager Web Bean lancerebbe una <literal>UnsatisfiedDependencyException</literal>. Se più di un'implementazione di <literal>Translator</literal> fosse disponibile, il manager Web Bean lancerebbe una <literal>AmbiguousDependencyException</literal>."
#. Tag: title
#: intro.xml:80
@@ -214,7 +214,7 @@
#: intro.xml:84
#, no-c-format
msgid "A Web Bean is an application class that contains business logic. A Web Bean may be called directly from Java code, or it may be invoked via Unified EL. A Web Bean may access transactional resources. Dependencies between Web Beans are managed automatically by the Web Bean manager. Most Web Beans are <emphasis>stateful</emphasis> and <emphasis>contextual</emphasis>. The lifecycle of a Web Bean is always managed by the Web Bean manager."
-msgstr "Un Web Bean è una classe di applicazione che contiene della logica di business. Può essere chiamato direttamente da codice Java, o può essere invocato via Unified EL. Un Web Bean può accedere a risorse transazionali. Le dipendenze tra Web Beans sono gestite automaticamente dal manager Web Bean. La maggior parte dei Web Beans sono <emphasis>stateful</emphasis> e <emphasis>contestuali</emphasis>. Il ciclo di vita di un Web Bean è sempre gestito da un manager Web Bean."
+msgstr "Un Web Bean è una classe di un'applicazione che contiene della logica di business. Può essere chiamato direttamente da codice Java, o può essere invocato via Unified EL. Un Web Bean può accedere a risorse transazionali. Le dipendenze tra Web Beans sono gestite automaticamente dal manager Web Bean. La maggior parte dei Web Beans sono <emphasis>stateful</emphasis> e <emphasis>contestuali</emphasis>. Il ciclo di vita di un Web Bean è sempre gestito da un manager Web Bean."
#. Tag: para
#: intro.xml:91
@@ -226,7 +226,7 @@
#: intro.xml:98
#, no-c-format
msgid "However, like a stateless or singleton model, but <emphasis>unlike</emphasis> stateful session beans, the client does not control the lifecycle of the instance by explicitly creating and destroying it. Instead, the <emphasis>scope</emphasis> of the Web Bean determines:"
-msgstr "Comunque, in modo simile ad un modello stateless o singleton, ma <emphasis>non come</emphasis> i session bean stateful, il client non ha il controllo del ciclo di vita dell'istanza, creandola e distruggendola esplicitamente. Invece, lo <emphasis>scope</emphasis> del Web Bean determina:"
+msgstr "Comunque, in modo simile ad un modello stateless o singleton, ma <emphasis>non come</emphasis> i session bean stateful, il client non ha il controllo sul ciclo di vita dell'istanza, creandola e distruggendola esplicitamente. Invece, lo <emphasis>scope</emphasis> del Web Bean determina:"
#. Tag: para
#: intro.xml:105
@@ -256,7 +256,7 @@
#: intro.xml:123
#, no-c-format
msgid "One great advantage of the contextual model is that it allows stateful Web Beans to be treated like services! The client need not concern itself with managing the lifecycle of the Web Bean it is using, <emphasis>nor does it even need to know what that lifecyle is.</emphasis> Web Beans interact by passing messages, and the Web Bean implementations define the lifecycle of their own state. The Web Beans are loosely coupled because:"
-msgstr "Un grande vantaggio del modello contestuale è che consente ai Web Beans stateful di essere trattati come servizi! Il client non deve preoccuparsi di gestire il ciclo di vita del Web Bean che sta utilizzando, <emphasis>e neppure deve sapere quali sia il ciclo di vita.</emphasis> Web Beans interagisce passando i messaggi, e le implementazioni Web Bean definiscono il ciclo di vita del proprio stato. I Web Beans sono debolmente disaccoppiati (loosely coupled) poiché:"
+msgstr "Un grande vantaggio del modello contestuale è che consente ai Web Beans stateful di essere trattati come servizi! Il client non deve preoccuparsi di gestire il ciclo di vita del Web Bean che sta utilizzando, <emphasis>e neppure deve sapere quale sia il ciclo di vita.</emphasis> Web Beans interagisce passando i messaggi, e le implementazioni Web Bean definiscono il ciclo di vita del proprio stato. I Web Beans sono debolmente disaccoppiati (loosely coupled) poiché:"
#. Tag: para
#: intro.xml:132
@@ -402,7 +402,7 @@
#: intro.xml:200
#, no-c-format
msgid "The following Web Bean has the binding type <literal>@CreditCard</literal> and implements the API type <literal>PaymentProcessor</literal>. It could therefore be injected to the example injection point:"
-msgstr ""
+msgstr "Il seguente Web Bean ha il tipo binding <literal>@CreditCard</literal> e implementa il tipo API <literal>PaymentProcessor</literal>. Può quindi essere iniettato nel punto di iniezione d'esempio:"
#. Tag: programlisting
#: intro.xml:204
@@ -420,13 +420,13 @@
#: intro.xml:206
#, no-c-format
msgid "If a Web Bean does not explicitly specify a set of binding types, it has exactly one binding type: the default binding type <literal>@Current</literal>."
-msgstr ""
+msgstr "Se un Web Bean non specifica esplicitamente un set di tipi di binding, ha esattamente un solo tipo di binding: il tipo di binding di default <literal>@Current</literal>."
#. Tag: para
#: intro.xml:209
#, no-c-format
msgid "Web Beans defines a sophisticated but intuitive <emphasis>resolution algorithm</emphasis> that helps the container decide what to do if there is more than one Web Bean that satisfies a particular contract. We'll get into the details in <xref linkend=\"injection\"/>."
-msgstr ""
+msgstr "Web Beans definisce un <emphasis>algoritmo di risoluzione</emphasis> sofisticato ma intuitivo che aiuta il container a decidere cosa fare se più di un Web Bean soddisfa un particolare contratto. Vedremo i dettagli in <xref linkend=\"injection\"/>."
#. Tag: title
#: intro.xml:217
@@ -438,19 +438,19 @@
#: intro.xml:219
#, no-c-format
msgid "<emphasis>Deployment types</emphasis> let us classify our Web Beans by deployment scenario. A deployment type is an annotation that represents a particular deployment scenario, for example <literal>@Mock</literal>, <literal>@Staging</literal> or <literal>@AustralianTaxLaw</literal>. We apply the annotation to Web Beans which should be deployed in that scenario. A deployment type allows a whole set of Web Beans to be conditionally deployed, with a just single line of configuration."
-msgstr ""
+msgstr "<emphasis>I tipi di deploy</emphasis> consentono di classificare i Web Bean secondo uno scenario di deploy. Un tipo di deploy è un'annotazione che rappresenta un particolare scenario di deploy, per esempio <literal>@Mock</literal>, <literal>@Staging</literal> oppure <literal>@AustralianTaxLaw</literal>. Si applica l'annotazione ai Web Bean che dovrebbero essere deployati in tale scenario. Un tipo di deploy consente ad un intero set di Web Bean di essere deployati in modo condizionato, con una sola linea di configurazione."
#. Tag: para
#: intro.xml:226
#, no-c-format
msgid "Many Web Beans just use the default deployment type <literal>@Production</literal>, in which case no deployment type need be explicitly specified. All three Web Bean in our example have the deployment type <literal>@Production</literal>."
-msgstr ""
+msgstr "Molti Web Bean usano soltanto il tipo di deploy di default <literal>@Production</literal>, ed in questo caso non occorre specificare esplicitamente nessun tipo di deploy. Tutti e tre i Web Bean d'esempio hanno ul tipo di deploy <literal>@Production</literal>. "
#. Tag: para
#: intro.xml:230
#, no-c-format
msgid "In a testing environment, we might want to replace the <literal>SentenceTranslator</literal> Web Bean with a \"mock object\":"
-msgstr ""
+msgstr "In un ambiente di test è possibile sostituire il Web Bean <literal>SentenceTranslator</literal> con un \"oggetto mock\":"
#. Tag: programlisting
#: intro.xml:233
@@ -474,13 +474,13 @@
#: intro.xml:236
#, no-c-format
msgid "We would enable the deployment type <literal>@Mock</literal> in our testing environment, to indicate that <literal>MockSentenceTranslator</literal> and any other Web Bean annotated <literal>@Mock</literal> should be used."
-msgstr ""
+msgstr "In ambiente di test si dovrebbe abilitare il tipo di deploy <literal>@Mock</literal> per indicare che l'uso di <literal>MockSentenceTranslator</literal> ed ogni altro Web Bean annotato con <literal>@Mock</literal>."
#. Tag: para
#: intro.xml:240
#, no-c-format
msgid "We'll talk more about this unique and powerful feature in <xref linkend=\"deploymenttypes\"/>."
-msgstr ""
+msgstr "Si discuterà questa potente funzionalità con maggior dettaglio in <xref linkend=\"deploymenttypes\"/>.\" "
#. Tag: title
#: intro.xml:246
@@ -488,17 +488,18 @@
msgid "Scope"
msgstr "Scope"
+# arbitrary scope è corretto "scope arbitrari" ?
#. Tag: para
#: intro.xml:248
#, no-c-format
msgid "The <emphasis>scope</emphasis> defines the lifecycle and visibility of instances of the Web Bean. The Web Beans context model is extensible, accommodating arbitrary scopes. However, certain important scopes are built-in to the specification, and provided by the Web Bean manager. A scope is represented by an annotation type."
-msgstr ""
+msgstr "Lo <emphasis>scope</emphasis> definisce il ciclo di vita e la visibilità delle istanze di Web Bean. Il modello di contesto Web Bean è estensibile e facilita gli scope arbitrari. Comunque alcuni importanti scope sono predefiniti all'internodella specifica e vengono forniti dal manager Web Bean. Uno scope è rapresentato da un tipo di annotazione."
#. Tag: para
#: intro.xml:254
#, no-c-format
msgid "For example, any web application may have <emphasis>session scoped</emphasis> Web Beans:"
-msgstr ""
+msgstr "Per esempio un'applicazione web può avere Web Bean con <emphasis>scope di sessione</emphasis>"
#. Tag: programlisting
#: intro.xml:257
@@ -514,13 +515,13 @@
#: intro.xml:259
#, no-c-format
msgid "An instance of a session scoped Web Bean is bound to a user session and is shared by all requests that execute in the context of that session."
-msgstr ""
+msgstr "Un'istanza di un Web Bean con scope sessione è legato ad una sessione utente ed è condivisa da tutte le richieste che si eseguono nel contesto di tale sessione."
#. Tag: para
#: intro.xml:262
#, no-c-format
msgid "By default, Web Beans belong to a special scope called the <emphasis>dependent pseudo-scope</emphasis>. Web Beans with this scope are pure dependent objects of the object into which they are injected, and their lifecycle is bound to the lifecycle of that object."
-msgstr ""
+msgstr "Di default i Web Bean appartengono ad uno speciale scope chiamato <emphasis>pseudo-scope dipendente</emphasis>. Web Bean con questo scope sono oggetti puri dipendenti dall'oggetto nel quale vengono iniettati ed il loro ciclo di vita è legato al ciclo di vita di tale oggetto."
#. Tag: para
#: intro.xml:267
@@ -538,7 +539,7 @@
#: intro.xml:274
#, no-c-format
msgid "A Web Bean may have a <emphasis>name</emphasis>, allowing it to be used in Unified EL expressions. It's easy to specify the name of a Web Bean:"
-msgstr ""
+msgstr "Un Web Bean può avere un <emphasis>nome</emphasis> che gli consente di essere usato in un'espressione Unified EL. E' facile specificare il nome del Web Bean:"
#. Tag: programlisting
#: intro.xml:278
@@ -620,11 +621,12 @@
"@Interceptors(TransactionInterceptor.class)\n"
"public class ShoppingCart { ... }]]>"
+# indirect = ?
#. Tag: para
#: intro.xml:307
#, no-c-format
msgid "However, it is more elegant, and better practice, to indirect the interceptor binding through an <emphasis>interceptor binding type</emphasis>:"
-msgstr ""
+msgstr "Comunque è più elegante ed è considerata una pratica migliore quella di giungere indirettamente ad un interceptor binding tramite un <emphasis>tipo di interceptor binding</emphasis>:"
#. Tag: programlisting
#: intro.xml:311
@@ -640,7 +642,7 @@
#: intro.xml:313
#, no-c-format
msgid "We'll discuss Web Beans interceptors and decorators in <xref linkend=\"interceptors\"/> and <xref linkend=\"decorators\"/>."
-msgstr ""
+msgstr "Si discuteranno gli interceptor e i decoratori di Web BEans in <xref linkend=\"interceptors\"/> e <xref linkend=\"decorators\"/>."
#. Tag: title
#: intro.xml:321
@@ -652,7 +654,7 @@
#: intro.xml:323
#, no-c-format
msgid "We've already seen that JavaBeans, EJBs and some other Java classes can be Web Beans. But exactly what kinds of objects are Web Beans?"
-msgstr ""
+msgstr "Si è già visto che JavaBeans, EJB ed altri tipi di classi Java possono essere Web Bean. Ma esattamente quali tipi di oggetti sono Web Beans?"
#. Tag: title
#: intro.xml:327
@@ -664,13 +666,13 @@
#: intro.xml:329
#, no-c-format
msgid "The Web Beans specification says that a concrete Java class is a <emphasis>simple</emphasis> Web Bean if:"
-msgstr ""
+msgstr "La specifica Web Beans dice che una classe concreta Java è un Web Bean <emphasis>semplice</emphasis> se:"
#. Tag: para
#: intro.xml:334
#, no-c-format
msgid "it is not an EE container-managed component, like an EJB, a Servlet or a JPA entity,"
-msgstr ""
+msgstr "Non è un componente gestito da un container EE, come EJB, un Servlet o un entity JPA,"
#. Tag: para
#: intro.xml:338
@@ -688,7 +690,7 @@
#: intro.xml:344
#, no-c-format
msgid "it has a constructor with no parameters, or a constructor annotated <literal>@Initializer</literal>."
-msgstr ""
+msgstr "ha un costruttore senza parametro, o un costruttore annotato con <literal>@Initializer</literal>."
#. Tag: para
#: intro.xml:349
@@ -700,7 +702,7 @@
#: intro.xml:351
#, no-c-format
msgid "Every interface implemented directly or indirectly by a simple Web Bean is an API type of the simple Web Bean. The class and its superclasses are also API types."
-msgstr ""
+msgstr "Ogni interfaccia implementata direttamente o indirettamente da un Web Bean semplice è un tipo di API di un Web Bean semplice. La classe e le sue superclassi sono anch'essere tipi di API."
#. Tag: title
#: intro.xml:358
@@ -712,19 +714,20 @@
#: intro.xml:360
#, no-c-format
msgid "The specification says that all EJB 3-style session and singleton beans are <emphasis>enterprise</emphasis> Web Beans. Message driven beans are not Web Beans—since they are not intended to be injected into other objects—but they can take advantage of most of the functionality of Web Beans, including dependency injection and interceptors."
-msgstr ""
+msgstr "La specifica dice che tutti i bean di sessione stile EJB3 e quelli singleton sono Web Bean <emphasis>enterprise</emphasis>. I bean message driven non sono Web Bean—poiché non sono intesi per essere iniettati in altri oggetti—ma possono sfruttare la maggior parte della funzionalità dei Web Bean, inclusi dependency injection e interceptor."
+# bean class local view = ?
#. Tag: para
#: intro.xml:366
#, no-c-format
msgid "Every local interface of an enterprise Web Bean that does not have a wildcard type parameter or type variable, and every one of its superinterfaces, is an API type of the enterprise Web Bean. If the EJB bean has a bean class local view, the bean class, and every one of its superclasses, is also an API type."
-msgstr ""
+msgstr "Ogni interfaccia locale di un Web Bean enterprise che non ha un parametro tipo wildcard o variabile tipo, e ciascuna delle sue superinterfacce, è un tipo di API del Web Bean enterprise. Se il bean EJB ha una vista locale di classe bean, la classe bean e ogni sua superclasse è anch'essa un tipo di API."
#. Tag: para
#: intro.xml:372
#, no-c-format
msgid "Stateful session beans should declare a remove method with no parameters or a remove method annotated <literal>@Destructor</literal>. The Web Bean manager calls this method to destroy the stateful session bean instance at the end of its lifecycle. This method is called the <emphasis>destructor</emphasis> method of the enterprise Web Bean."
-msgstr ""
+msgstr "I session bean stateful dovrebbero dichiarare un metodo remoto senza parametri od un metodo annotato con <literal>@Destructor</literal>. Il manager Web Bean chiama questo metodo per distruggere l'istanza del session bean statefull alla fine del suo ciclo di vita. Questo metodo è chiamato metodo <emphasis>distruttore</emphasis> del Web Bean enterprise."
#. Tag: programlisting
#: intro.xml:378
@@ -754,7 +757,7 @@
#: intro.xml:380
#, no-c-format
msgid "So when should we use an enterprise Web Bean instead of a simple Web Bean? Well, whenever we need the advanced enterprise services offered by EJB, such as:"
-msgstr ""
+msgstr "Ma allora quando occorre usare un Web Bean enterprise invece di un Web Bean semplice? Quando occorrono servizi enterprise avanzati offerti da EJB, quali:"
#. Tag: para
#: intro.xml:387
@@ -772,7 +775,7 @@
#: intro.xml:393
#, no-c-format
msgid "instance-level passivation for stateful session beans and instance-pooling for stateless session beans,"
-msgstr ""
+msgstr "passivazione a livello di istanza per session bean stateful e pooling di istanze per session bean stateless,"
#. Tag: para
#: intro.xml:397
@@ -790,31 +793,32 @@
#: intro.xml:404
#, no-c-format
msgid "we should use an enterprise Web Bean. When we don't need any of these things, a simple Web Bean will serve just fine."
-msgstr ""
+msgstr "si dovrebbe usare un Web Bean enterprise. Quando non occorrono queste cose, va bene utilizzare un Web Bean semplice."
#. Tag: para
#: intro.xml:407
#, no-c-format
msgid "Many Web Beans (including any session or application scoped Web Bean) are available for concurrent access. Therefore, the concurrency management provided by EJB 3.1 is especially useful. Most session and application scoped Web Beans should be EJBs."
-msgstr ""
+msgstr "Molti Web Bean (inclusi Web Bean con scope di sessione o applicazione) sono disponibili per accessi concorrenti. Quindi la gestione della concorrenza fornita da EJB3.1 è molto utile. La maggior parte dei Web Bean con scope sessione e applicazione dovrebbero essere EJB."
+# internal state benefit =?
#. Tag: para
#: intro.xml:412
#, no-c-format
msgid "Web Beans which hold references to heavy-weight resources, or hold a lot of internal state benefit from the advanced container-managed lifecycle defined by the EJB <literal>@Stateless</literal>/<literal>@Stateful</literal>/<literal>@Singleton</literal> model, with its support for passivation and instance pooling."
-msgstr ""
+msgstr "Web Bean che mantengono riferimenti alle risorse pesanti o mantengono molti benefici dello stato interno dal ciclo di vita avanzato, gestito dal container, definito dal modello EJB <literal>@Stateless</literal>/<literal>@Stateful</literal>/<literal>@Singleton</literal>\", con supporto alla passivazione e pooling delle istanze."
#. Tag: para
#: intro.xml:417
#, no-c-format
msgid "Finally, it's usually obvious when method-level transaction management, method-level security, timers, remote methods or asynchronous methods are needed."
-msgstr ""
+msgstr "Infine è ovvio quando occorre usare la gestione delle transazioni a livello di metodo, la sicurezza a livello di metoto, i timer, i metodi remoti o i metodi asincroni."
#. Tag: para
#: intro.xml:420
#, no-c-format
msgid "It's usually easy to start with simple Web Bean, and then turn it into an EJB, just by adding an annotation: <literal>@Stateless</literal>, <literal>@Stateful</literal> or <literal>@Singleton</literal>."
-msgstr ""
+msgstr "E' facile iniziare con un Web Bean semplice e poi volgere a EJB semplicemente aggiungendo l'annotazione: <literal>@Stateless</literal>, <literal>@Stateful</literal> o <literal>@Singleton</literal>."
#. Tag: title
#: intro.xml:427
@@ -826,7 +830,7 @@
#: intro.xml:429
#, no-c-format
msgid "A <emphasis>producer method</emphasis> is a method that is called by the Web Bean manager to obtain an instance of the Web Bean when no instance exists in the current context. A producer method lets the application take full control of the instantiation process, instead of leaving instantiation to the Web Bean manager. For example:"
-msgstr ""
+msgstr "Un <emphasis>metodo produttore</emphasis> è un metodo che viene chiamato dal manager Web Bean per ottenere un'istanza di un Web Bean quando non esiste alcuna istanza nel contesto corrente. Un metodo produttore lascia all'applicazione il pieno controllo del processo di istanziamento, invece di lasciare l'istanziamento al manager Web Bean. Per esempio:"
#. Tag: programlisting
#: intro.xml:435
@@ -870,7 +874,7 @@
#: intro.xml:441
#, no-c-format
msgid "The method return type and all interfaces it extends/implements directly or indirectly are API types of the producer method. If the return type is a class, all superclasses are also API types."
-msgstr ""
+msgstr "Il tipo di ritorno del metodo e tutte le interfacce che estende/implementa direttamente o indirettamente sono tipi di API del metodo produttore. Se il tipo di ritorno è una classe, tutte le superclassi sono anch'esse tipi di API."
#. Tag: para
#: intro.xml:445
@@ -912,7 +916,7 @@
#: intro.xml:453
#, no-c-format
msgid "This disposal method is called automatically by the Web Bean manager at the end of the request."
-msgstr ""
+msgstr "Il metodo distruttore è chiamato direttamente dal manager Web Bean alla fine della richiesta."
#. Tag: para
#: intro.xml:456
@@ -930,5 +934,5 @@
#: intro.xml:463
#, no-c-format
msgid "Finally, a JMS queue or topic can be a Web Bean. Web Beans relieves the developer from the tedium of managing the lifecycles of all the various JMS objects required to send messages to queues and topics. We'll discuss JMS endpoints in <xref linkend=\"jms\"/>."
-msgstr ""
+msgstr "Infine una coda od un topic JMS possono essere Web Bean. Web Beans solleva lo sviluppatore dalla noia della gestione dei cicli di vita di tutti i vari oggetti JMS richiesto per inviare messaggi a code o topic. Si discuteranno gli endpoint JMS in <xref linkend=\"jms\"/>."
Modified: doc/trunk/reference/it-IT/modules/producermethods.po
===================================================================
--- doc/trunk/reference/it-IT/modules/producermethods.po 2008-12-24 23:55:15 UTC (rev 724)
+++ doc/trunk/reference/it-IT/modules/producermethods.po 2008-12-25 11:40:55 UTC (rev 725)
@@ -23,7 +23,7 @@
#: producermethods.xml:7
#, no-c-format
msgid "Producer methods let us overcome certain limitations that arise when the Web Bean manager, instead of the application, is responsible for instantiating objects. They're also the easiest way to integrate objects which are not Web Beans into the Web Beans environment. (We'll meet a second approach in <xref linkend=\"xml\"/>.)"
-msgstr "I metodi produttori consentono di superare alcune limitazioni che sorgono quando il manager Web Bean è responsabile dell'istanziazione degli oggetti al posto dell'applicazione. Questi metodi sono anche il modo migliore per integrare gli oggetti che non sono Web Beans dentro l'ambiente Web Beans. (Si incontrerà un secondo approccio in <xref linkend=\"xml\"/>.)"
+msgstr "I metodi produttori consentono di superare alcune limitazioni che sorgono quando il manager Web Bean è responsabile dell'istanziamento degli oggetti al posto dell'applicazione. Questi metodi sono anche il modo migliore per integrare gli oggetti che non sono Web Beans dentro l'ambiente Web Beans. (Si incontrerà un secondo approccio in <xref linkend=\"xml\"/>.)"
#. Tag: para
#: producermethods.xml:12
Modified: doc/trunk/reference/it-IT/modules/ri-spi.po
===================================================================
--- doc/trunk/reference/it-IT/modules/ri-spi.po 2008-12-24 23:55:15 UTC (rev 724)
+++ doc/trunk/reference/it-IT/modules/ri-spi.po 2008-12-25 11:40:55 UTC (rev 725)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-20 22:07+0000\n"
-"PO-Revision-Date: 2008-12-21 03:45+0100\n"
+"PO-Revision-Date: 2008-12-24 19:39+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -35,7 +35,7 @@
#: ri-spi.xml:24
#, no-c-format
msgid "The Web Beans RI SPI"
-msgstr ""
+msgstr "Web Beans RI SPI"
#. Tag: para
#: ri-spi.xml:26
@@ -293,7 +293,7 @@
#: ri-spi.xml:79
#, no-c-format
msgid "The contract with the container"
-msgstr ""
+msgstr "Il contratto con il container"
#. Tag: para
#: ri-spi.xml:81
@@ -317,7 +317,7 @@
#: ri-spi.xml:102
#, no-c-format
msgid "The <literal>webbeans-ri.jar</literal>"
-msgstr ""
+msgstr "<literal>webbeans-ri.jar</literal>"
#. Tag: para
#: ri-spi.xml:106
Modified: doc/trunk/reference/it-IT/modules/stereotypes.po
===================================================================
--- doc/trunk/reference/it-IT/modules/stereotypes.po 2008-12-24 23:55:15 UTC (rev 724)
+++ doc/trunk/reference/it-IT/modules/stereotypes.po 2008-12-25 11:40:55 UTC (rev 725)
@@ -6,7 +6,7 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-21 13:01+0100\n"
+"PO-Revision-Date: 2008-12-25 12:05+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -125,7 +125,7 @@
#: stereotypes.xml:53
#, no-c-format
msgid "A stereotype may specify a default scope and/or default deployment type for Web Beans with that stereotype. For example, if the deployment type <literal>@WebTier</literal> identifies Web Beans that should only be deployed when the system executes as a web application, we might specify the following defaults for action classes:"
-msgstr ""
+msgstr "Uno stereotipo può specificare uno scope di default e/o un tipo di deploy di default per Web Bean con tale stereotipo. Per esempio, se il tipo di deploy <literal>@WebTier</literal> identifica Web Bean che dovrebbero essere deployati quando il sistema viene eseguito come applicazione web, si potrebbero specificare i seguenti valori di default per le classi d'azione:"
#. Tag: programlisting
#: stereotypes.xml:59
@@ -149,7 +149,7 @@
#: stereotypes.xml:61
#, no-c-format
msgid "Of course, a particular action may still override these defaults if necessary:"
-msgstr ""
+msgstr "Certamente una particolare azione può comunque fare l'override di questi valore se necessario:"
#. Tag: programlisting
#: stereotypes.xml:64
@@ -165,19 +165,19 @@
#: stereotypes.xml:66
#, no-c-format
msgid "If we want to force all actions to a particular scope, we can do that too."
-msgstr ""
+msgstr "Se si vuole forzare tutte le azioni ad un particolare scope, è possibile."
#. Tag: title
#: stereotypes.xml:72
#, no-c-format
msgid "Restricting scope and type with a stereotype"
-msgstr ""
+msgstr "Restringere lo scope ed il tipo con uno stereotipo"
#. Tag: para
#: stereotypes.xml:74
#, no-c-format
msgid "Suppose that we wish to prevent actions from declaring certain scopes. Web Beans lets us explicitly specify the set of allowed scopes for Web Beans with a certain stereotype. For example:"
-msgstr ""
+msgstr "Si supponga di voler prevenire le azioni dal dichiarare certi scope. Web Beans consente esplicitamente di specificare un set di scope consentiti per Web Bean con certi stereotipi. Per esempio:"
#. Tag: programlisting
#: stereotypes.xml:78
@@ -201,13 +201,13 @@
#: stereotypes.xml:80
#, no-c-format
msgid "If a particular action class attempts to specify a scope other than the Web Beans request scope, an exception will be thrown by the Web Bean manager at initialization time."
-msgstr ""
+msgstr "Se una particolare classe d'azione tenta di specificare uno scope diverso dallo scope di richiesta Web Bean, verrà lanciata un'eccezione dal manager Web Bean in fase di inizializzazione."
#. Tag: para
#: stereotypes.xml:84
#, no-c-format
msgid "We can also force all Web Bean with a certain stereotype to implement an interface or extend a class:"
-msgstr ""
+msgstr "Si può forzare tutti i Web Bean con certi stereotipi ad implementare un'interfaccia o ad estendere una classe:"
#. Tag: programlisting
#: stereotypes.xml:87
@@ -231,19 +231,19 @@
#: stereotypes.xml:89
#, no-c-format
msgid "If a particular action class does not extend the class <literal>AbstractAction</literal>, an exception will be thrown by the Web Bean manager at initialization time."
-msgstr ""
+msgstr "Se una particolare classe d'azione non estende la classe <literal>AbstractAction</literal>, verrà lanciata un'eccezione dal manager Web Bean in fase di inizializzazione."
#. Tag: title
#: stereotypes.xml:96
#, no-c-format
msgid "Interceptor bindings for stereotypes"
-msgstr ""
+msgstr "Interceptor binding per gli stereotipi"
#. Tag: para
#: stereotypes.xml:98
#, no-c-format
msgid "A stereotype may specify a set of interceptor bindings to be inherited by all Web Beans with that stereotype."
-msgstr ""
+msgstr "Uno stereotipo può specificare un set di interceptor binding da ereditare da tutti i Web Bean con quello stereotipo."
#. Tag: programlisting
#: stereotypes.xml:101
@@ -271,7 +271,7 @@
#: stereotypes.xml:103
#, no-c-format
msgid "This helps us get technical concerns even further away from the business code!"
-msgstr ""
+msgstr "Questo aiuta ad ottenere concern tecnici anche lontano dal codice di business!"
#. Tag: title
#: stereotypes.xml:109
@@ -283,7 +283,7 @@
#: stereotypes.xml:111
#, no-c-format
msgid "Finally, we can specify that all Web Beans with a certain stereotype have a Web Bean name, defaulted by the Web Bean manager. Actions are often referenced in JSP pages, so they're a perfect use case for this feature. All we need to do is add an empty <literal>@Named</literal> annotation:"
-msgstr ""
+msgstr "Infine è possibile specificare che tutti i Web Bean con certi stereotipi abbiamo un certo nome Web Bean, messo di default dal manager Web Bean. Le azioni sono spesso referenziate nelle pagine JSP, e quindi sono un caso d'uso perfetto per questa funzionalità. Basta aggiungere un'annotazione vuota <literal>@Named</literal>:"
#. Tag: programlisting
#: stereotypes.xml:116
@@ -313,7 +313,7 @@
#: stereotypes.xml:118
#, no-c-format
msgid "Now, <literal>LoginAction</literal> will have the name <literal>loginAction</literal>."
-msgstr ""
+msgstr "Ora, <literal>LoginAction</literal> avrà nome <literal>loginAction</literal>."
#. Tag: title
#: stereotypes.xml:124
@@ -325,13 +325,13 @@
#: stereotypes.xml:126
#, no-c-format
msgid "We've already met two standard stereotypes defined by the Web Beans specification: <literal>@Interceptor</literal> and <literal>@Decorator</literal>."
-msgstr ""
+msgstr "Si sono già visti due stereotipi standard definiti dalla specifica Web Bean: <literal>@Interceptor</literal> e <literal>@Decorator</literal>."
#. Tag: para
#: stereotypes.xml:129
#, no-c-format
msgid "Web Beans defines one further standard stereotype:"
-msgstr ""
+msgstr "Web Bean definisce un ulteriore stereotipo standard:"
#. Tag: programlisting
#: stereotypes.xml:131
@@ -355,5 +355,5 @@
#: stereotypes.xml:133
#, no-c-format
msgid "This stereotype is intended for use with JSF. Instead of using JSF managed beans, just annotate a Web Bean <literal>@Model</literal>, and use it directly in your JSF page."
-msgstr ""
+msgstr "Questo stereotipo è inteso per l'uso con JSF. Invece di usare bean gestiti da JSF, basta annotare un Web Bean con <literal>@Model</literal>, e usarlo direttamente nelle pagine JSF."
16 years
[webbeans-commits] Webbeans SVN: r724 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans: ejb and 3 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-24 18:55:15 -0500 (Wed, 24 Dec 2008)
New Revision: 724
Added:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java
Removed:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSF.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/Servlet.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java
Log:
WBRI-70
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2008-12-24 23:37:34 UTC (rev 723)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -24,13 +24,6 @@
import static org.jboss.webbeans.bean.BeanFactory.createProducerFieldBean;
import static org.jboss.webbeans.bean.BeanFactory.createProducerMethodBean;
import static org.jboss.webbeans.bean.BeanFactory.createSimpleBean;
-import static org.jboss.webbeans.ejb.EJB.ENTERPRISE_BEAN_CLASS;
-import static org.jboss.webbeans.jsf.JSF.UICOMPONENT_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.FILTER_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.HTTP_SESSION_LISTENER_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.SERVLET_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.SERVLET_CONTEXT_LISTENER_CLASS;
-import static org.jboss.webbeans.servlet.Servlet.SERVLET_REQUEST_LISTENER_CLASS;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
@@ -59,14 +52,17 @@
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.bindings.InitializedBinding;
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
+import org.jboss.webbeans.ejb.EJBApiAbstraction;
import org.jboss.webbeans.event.ObserverImpl;
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
+import org.jboss.webbeans.jsf.JSFApiAbstraction;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.servlet.ServletApiAbstraction;
import org.jboss.webbeans.transaction.Transaction;
import org.jboss.webbeans.util.Reflections;
@@ -327,18 +323,21 @@
* @param type The type to inspect
* @return True if simple Web Bean, false otherwise
*/
- protected static boolean isTypeSimpleWebBean(Class<?> type)
+ protected boolean isTypeSimpleWebBean(Class<?> type)
{
+ EJBApiAbstraction ejbApiAbstraction = new EJBApiAbstraction(getResourceLoader());
+ JSFApiAbstraction jsfApiAbstraction = new JSFApiAbstraction(getResourceLoader());
+ ServletApiAbstraction servletApiAbstraction = new ServletApiAbstraction(getResourceLoader());
//TODO: check 3.2.1 for more rules!!!!!!
return !type.isAnnotation() &&
!Reflections.isAbstract(type) &&
- !SERVLET_CLASS.isAssignableFrom(type) &&
- !FILTER_CLASS.isAssignableFrom(type) &&
- !SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(type) &&
- !HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(type) &&
- !SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(type) &&
- !ENTERPRISE_BEAN_CLASS.isAssignableFrom(type) &&
- !UICOMPONENT_CLASS.isAssignableFrom(type) &&
+ !servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(type) &&
+ !servletApiAbstraction.FILTER_CLASS.isAssignableFrom(type) &&
+ !servletApiAbstraction.SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(type) &&
+ !servletApiAbstraction.HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(type) &&
+ !servletApiAbstraction.SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(type) &&
+ !ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(type) &&
+ !jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(type) &&
hasSimpleWebBeanConstructor(type);
}
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java 2008-12-24 23:37:34 UTC (rev 723)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.webbeans.ejb;
-
-import org.jboss.webbeans.util.ApiAbstraction;
-
-/**
- * Utility class for EJB classes etc. EJB metadata should NOT be inspected here
- *
- * @author Pete Muir
- */
-public class EJB extends ApiAbstraction
-{
-
- public static final Class<?> ENTERPRISE_BEAN_CLASS;
-
- /**
- * Static initialization block
- */
- static
- {
- ENTERPRISE_BEAN_CLASS = classForName("javax.ejb.EnterpriseBean");
- }
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java (from rev 723, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.ejb;
+
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.util.ApiAbstraction;
+
+/**
+ * Utility class for EJB classes etc. EJB metadata should NOT be inspected here
+ *
+ * @author Pete Muir
+ */
+public class EJBApiAbstraction extends ApiAbstraction
+{
+
+ public EJBApiAbstraction(ResourceLoader resourceLoader)
+ {
+ super(resourceLoader);
+ ENTERPRISE_BEAN_CLASS = classForName("javax.ejb.EnterpriseBean");
+ }
+
+ public final Class<?> ENTERPRISE_BEAN_CLASS;
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJBApiAbstraction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSF.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSF.java 2008-12-24 23:37:34 UTC (rev 723)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSF.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.webbeans.jsf;
-
-import org.jboss.webbeans.util.ApiAbstraction;
-
-/**
- * Utility class for JSF related components, concepts etc.
- *
- * @author Pete Muir
- *
- */
-public class JSF extends ApiAbstraction
-{
- // An UI component
- public static final Class<?> UICOMPONENT_CLASS = classForName("javax.faces.component.UIComponent");
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java (from rev 723, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSF.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.jsf;
+
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.util.ApiAbstraction;
+
+/**
+ * Utility class for JSF related components, concepts etc.
+ *
+ * @author Pete Muir
+ *
+ */
+public class JSFApiAbstraction extends ApiAbstraction
+{
+
+
+ // An UI component
+ public final Class<?> UICOMPONENT_CLASS;
+
+ public JSFApiAbstraction(ResourceLoader resourceLoader)
+ {
+ super(resourceLoader);
+ this.UICOMPONENT_CLASS = classForName("javax.faces.component.UIComponent");
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/jsf/JSFApiAbstraction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/Servlet.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/Servlet.java 2008-12-24 23:37:34 UTC (rev 723)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/Servlet.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -1,14 +0,0 @@
-package org.jboss.webbeans.servlet;
-
-import org.jboss.webbeans.util.ApiAbstraction;
-
-public class Servlet extends ApiAbstraction
-{
-
- public static final Class<?> SERVLET_CLASS = classForName("javax.servlet.Servlet");
- public static final Class<?> FILTER_CLASS = classForName("javax.servlet.Filter");
- public static final Class<?> SERVLET_CONTEXT_LISTENER_CLASS = classForName("javax.servlet.ServletContextListener");
- public static final Class<?> HTTP_SESSION_LISTENER_CLASS = classForName("javax.servlet.http.HttpSessionListener");
- public static final Class<?> SERVLET_REQUEST_LISTENER_CLASS = classForName("javax.servlet.ServletRequestListener");
-
-}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java (from rev 723, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/Servlet.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -0,0 +1,26 @@
+package org.jboss.webbeans.servlet;
+
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.util.ApiAbstraction;
+
+public class ServletApiAbstraction extends ApiAbstraction
+{
+
+ public final Class<?> SERVLET_CLASS;
+ public final Class<?> FILTER_CLASS;
+ public final Class<?> SERVLET_CONTEXT_LISTENER_CLASS;
+ public final Class<?> HTTP_SESSION_LISTENER_CLASS;
+ public final Class<?> SERVLET_REQUEST_LISTENER_CLASS;
+
+ public ServletApiAbstraction(ResourceLoader resourceLoader)
+ {
+ super(resourceLoader);
+ SERVLET_CLASS = classForName("javax.servlet.Servlet");
+ FILTER_CLASS = classForName("javax.servlet.Filter");
+ SERVLET_CONTEXT_LISTENER_CLASS = classForName("javax.servlet.ServletContextListener");
+ HTTP_SESSION_LISTENER_CLASS = classForName("javax.servlet.http.HttpSessionListener");
+ SERVLET_REQUEST_LISTENER_CLASS = classForName("javax.servlet.ServletRequestListener");
+ }
+
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletApiAbstraction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java 2008-12-24 23:37:34 UTC (rev 723)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/ApiAbstraction.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -19,6 +19,9 @@
import java.lang.annotation.Annotation;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.resources.spi.ResourceLoadingException;
+
/**
* A base class for utility classes that represent annotations, classes etc
*
@@ -26,6 +29,8 @@
*/
public class ApiAbstraction
{
+
+ private ResourceLoader resourceLoader;
/**
* "Not found" annotation
@@ -40,7 +45,14 @@
public interface Dummy
{
}
+
+
+ public ApiAbstraction(ResourceLoader resourceLoader)
+ {
+ this.resourceLoader = resourceLoader;
+ }
+
/**
* Initializes an annotation class
*
@@ -49,13 +61,13 @@
* not found
*/
@SuppressWarnings("unchecked")
- protected static Class<? extends Annotation> annotationTypeForName(String name)
+ protected Class<? extends Annotation> annotationTypeForName(String name)
{
try
{
- return (Class<? extends Annotation>) Reflections.classForName(name);
+ return (Class<? extends Annotation>) resourceLoader.classForName(name);
}
- catch (ClassNotFoundException cnfe)
+ catch (ResourceLoadingException cnfe)
{
return DummyAnnotation.class;
}
@@ -69,13 +81,13 @@
* found.
*/
@SuppressWarnings("unchecked")
- protected static Class<?> classForName(String name)
+ protected Class<?> classForName(String name)
{
try
{
- return (Class<? extends Annotation>) Reflections.classForName(name);
+ return (Class<? extends Annotation>) resourceLoader.classForName(name);
}
- catch (ClassNotFoundException cnfe)
+ catch (ResourceLoadingException cnfe)
{
return Dummy.class;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java 2008-12-24 23:37:34 UTC (rev 723)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java 2008-12-24 23:55:15 UTC (rev 724)
@@ -46,39 +46,6 @@
{
/**
- * Creates an instance from a class name
- *
- * @param name The class name
- * @return The instance
- * @throws ClassNotFoundException If the class if not found
- */
- public static Class<?> classForName(String name) throws ClassNotFoundException
- {
- return classForName(name, Thread.currentThread().getContextClassLoader());
- }
-
- /**
- * Creates an instance from a class name
- *
- * @param name The class name
- * @return The instance
- * @throws ClassNotFoundException If the class if not found
- */
- private static Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException
- {
- try
- {
- return classLoader.loadClass(name);
- }
- catch (Exception e)
- {
- return Class.forName(name);
- }
- }
-
-
-
- /**
* Gets the property name from a getter method
*
* @param method The getter method
16 years
[webbeans-commits] Webbeans SVN: r723 - in ri/trunk: webbeans-ri/src/main/java/org/jboss/webbeans/bean and 12 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-24 18:37:34 -0500 (Wed, 24 Dec 2008)
New Revision: 723
Added:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/PropertiesBasedBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resources/
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resources/DefaultNaming.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletContextResourceLoader.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/DeploymentProperties.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockResourceLoader.java
Removed:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/DeploymentProperties.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java
Modified:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockManagerImpl.java
Log:
Expose classloader and JNDI lookup as part of SPI
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -57,6 +57,7 @@
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.jboss.webbeans.resources.spi.Naming;
import org.jboss.webbeans.util.Reflections;
import org.jboss.webbeans.util.Strings;
@@ -94,6 +95,9 @@
private Set<Interceptor> interceptors;
private EjbDescriptorCache ejbDescriptorCache;
+
+ // The Naming (JNDI) access
+ private Naming naming;
/**
* Constructor
@@ -715,5 +719,15 @@
// TODO Implement hierarchical managers
return null;
}
+
+ public Naming getNaming()
+ {
+ return naming;
+ }
+
+ public void setNaming(Naming naming)
+ {
+ this.naming = naming;
+ }
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -43,7 +43,6 @@
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.util.JNDI;
/**
* An enterprise bean representation
@@ -260,7 +259,7 @@
{
DependentContext.INSTANCE.setActive(true);
// TODO Implement enterprise bean proxies and select the correct jndiName
- return (T) JNDI.lookup(ejbDescriptor.getLocalJndiName());
+ return (T) manager.getNaming().lookup(ejbDescriptor.getLocalJndiName(), getType());
}
catch (Exception e)
{
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/DeploymentProperties.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/DeploymentProperties.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/DeploymentProperties.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -1,159 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.webbeans.bootstrap;
-
-import static org.jboss.webbeans.util.Strings.split;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * Utility class to load deployment properties
- *
- * @author Pete Muir
- */
-public class DeploymentProperties
-{
- // The resource bundle used to control Web Beans RI deployment
- public static final String RESOURCE_BUNDLE = "META-INF/web-beans-ri.properties";
-
- // The class to work from
- private ClassLoader classLoader;
- // An enumeration of URLs to work on
- private Enumeration<URL> urlEnum;
-
- /**
- * Constructor
- *
- * @param classLoader The classloader to work on
- */
- public DeploymentProperties(ClassLoader classLoader)
- {
- this.classLoader = classLoader;
- }
-
- /**
- * Get a list of possible values for a given key.
- *
- * First, System properties are tried, followed by the specified resource
- * bundle (first in classpath only).
- *
- * Colon (:) deliminated lists are split out. (gotta love Petes choice of
- * ASCII art for that one ;-)
- *
- * @param key The key to search for
- * @return A list of possible values. An empty list is returned if there are
- * no matches.
- */
- public List<String> getPropertyValues(String key)
- {
- List<String> values = new ArrayList<String>();
- addPropertiesFromSystem(key, values);
- addPropertiesFromResourceBundle(key, values);
- return values;
- }
-
- /**
- * Adds matches from system properties
- *
- * @param key The key to match
- * @param values The currently found values
- */
- private void addPropertiesFromSystem(String key, List<String> values)
- {
- addProperty(key, System.getProperty(key), values);
- }
-
- /**
- * Adds matches from detected resource bundles
- *
- * @param key The key to match
- * @param values The currently found values
- */
- private void addPropertiesFromResourceBundle(String key, List<String> values)
- {
- try
- {
- while (getResources().hasMoreElements())
- {
- URL url = getResources().nextElement();
- Properties properties = new Properties();
- InputStream propertyStream = url.openStream();
- try
- {
- properties.load(propertyStream);
- addProperty(key, properties.getProperty(key), values);
- }
- finally
- {
- if (propertyStream != null)
- {
- propertyStream.close();
- }
- }
- }
- }
- catch (IOException e)
- {
- // No - op, file is optional
- }
- }
-
- /**
- * Add the property to the set of properties only if it hasn't already been
- * added
- *
- * @param key The key searched for
- * @param value The value of the property
- * @param values The currently found values
- */
- private void addProperty(String key, String value, List<String> values)
- {
- if (value != null)
- {
- String[] properties = split(value, ":");
- for (String property : properties)
- {
- values.add(property);
- }
-
- }
- }
-
- /**
- * Gets all Web Beans property files relative to the provided classloader
- *
- * @return An enumeration of URLs to the property files
- * @throws IOException If the resource files could not be loaded
- */
- private Enumeration<URL> getResources() throws IOException
- {
-
- if (urlEnum == null)
- {
- urlEnum = classLoader.getResources(RESOURCE_BUNDLE);
- }
- return urlEnum;
- }
-
-}
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/PropertiesBasedBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/PropertiesBasedBootstrap.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/PropertiesBasedBootstrap.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,99 @@
+package org.jboss.webbeans.bootstrap;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.webbeans.ExecutionException;
+
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.resources.DefaultNaming;
+import org.jboss.webbeans.resources.spi.Naming;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.servlet.ServletBootstrap;
+import org.jboss.webbeans.util.DeploymentProperties;
+import org.jboss.webbeans.util.Reflections;
+
+/**
+ * An abstract extension of Bootstrap which uses deployment properties for
+ * configuring the application
+ *
+ * @author Pete Muir
+ *
+ */
+public abstract class PropertiesBasedBootstrap extends WebBeansBootstrap
+{
+
+ private static final LogProvider log = Logging.getLogProvider(ServletBootstrap.class);
+
+ /**
+ * Returns any class constructor from the merged list defined by the
+ * specified property.
+ * No guarantee is made about which item in the list will returned.
+ *
+ * @param <T> The class type
+ * @param deploymentProperties The deployment properties to be used
+ * @param resourceLoader The resourceLoader to use for class and resource loading
+ * @param propertyName The name of the property to find in the deployment properties
+ * @param expectedType The expected type or super type of the class
+ * @param constructorArguments The arguments of the constructor to select
+ * @return
+ */
+ protected static <T> Constructor<? extends T> getClassConstructor(DeploymentProperties deploymentProperties, ResourceLoader resourceLoader, String propertyName, Class<T> expectedType, Class<?> ... constructorArguments)
+ {
+ for (Class<? extends T> clazz : DeploymentProperties.getClasses(deploymentProperties, resourceLoader, propertyName, expectedType))
+ {
+ Constructor<? extends T> constructor = Reflections.getConstructor((Class<? extends T>) clazz, constructorArguments);
+ if (constructor != null)
+ {
+ return constructor;
+ }
+ }
+ return null;
+ }
+
+ protected static <T> T newInstance(Constructor<T> constructor, Object... parameters)
+ {
+ try
+ {
+ return constructor.newInstance(parameters);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new ExecutionException("Error instantiating " + constructor, e);
+ }
+ catch (InstantiationException e)
+ {
+ throw new ExecutionException("Error instantiating " + constructor, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new ExecutionException("Error instantiating " + constructor, e);
+ }
+ catch (InvocationTargetException e)
+ {
+ throw new ExecutionException("Error instantiating " + constructor, e);
+ }
+ }
+
+ /**
+ * Only safe to call once resourceloader and deployment properties are set
+ */
+ protected void initProperties()
+ {
+ Constructor<? extends Naming> namingConstructor = getClassConstructor(getDeploymentProperties(), getResourceLoader(), Naming.PROPERTY_NAME, Naming.class);
+ if (namingConstructor != null)
+ {
+ getManager().setNaming(newInstance(namingConstructor));
+ }
+ else
+ {
+ getManager().setNaming(new DefaultNaming());
+ }
+ }
+
+
+
+ protected abstract DeploymentProperties getDeploymentProperties();
+
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/PropertiesBasedBootstrap.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/WebBeansBootstrap.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -41,8 +41,8 @@
import java.util.Set;
import javax.webbeans.DefinitionException;
-import javax.webbeans.Initializer;
import javax.webbeans.Fires;
+import javax.webbeans.Initializer;
import javax.webbeans.Observer;
import javax.webbeans.Observes;
import javax.webbeans.Obtains;
@@ -59,7 +59,6 @@
import org.jboss.webbeans.bean.SimpleBean;
import org.jboss.webbeans.bindings.InitializedBinding;
import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
-import org.jboss.webbeans.contexts.DependentContext;
import org.jboss.webbeans.event.ObserverImpl;
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.AnnotatedItem;
@@ -67,50 +66,52 @@
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
import org.jboss.webbeans.transaction.Transaction;
-import org.jboss.webbeans.util.JNDI;
import org.jboss.webbeans.util.Reflections;
/**
- * Bootstrapping functionality that is run at application startup and detects
+ * Common bootstrapping functionality that is run at application startup and detects
* and register beans
*
* @author Pete Muir
*/
-public class WebBeansBootstrap
+public abstract class WebBeansBootstrap
{
- // The property name of the discovery class
- public static String WEB_BEAN_DISCOVERY_PROPERTY_NAME = "org.jboss.webbeans.bootstrap.webBeanDiscovery";
+
// The log provider
private static LogProvider log = Logging.getLogProvider(WebBeansBootstrap.class);
- // The Web Beans manager
- protected ManagerImpl manager;
-
- /**
- * Constructor
- *
- * Starts up with the singleton Manager
- */
- public WebBeansBootstrap(ManagerImpl manager)
- {
- this.manager = manager;
- registerManager();
- manager.addContext(DependentContext.INSTANCE);
- }
protected void registerManager()
{
- JNDI.bind(ManagerImpl.JNDI_KEY, manager);
- CurrentManager.setRootManager(manager);
+ getManager().getNaming().bind(ManagerImpl.JNDI_KEY, getManager());
+ CurrentManager.setRootManager(getManager());
}
- public WebBeansBootstrap()
+ public abstract ManagerImpl getManager();
+
+ protected abstract WebBeanDiscovery getWebBeanDiscovery();
+
+ public abstract ResourceLoader getResourceLoader();
+
+ protected void validateBootstrap()
{
- this(new ManagerImpl());
+ if (getManager() == null)
+ {
+ throw new IllegalStateException("getManager() is not set on bootstrap");
+ }
+ if (getWebBeanDiscovery() == null)
+ {
+ throw new IllegalStateException("WebBeanDiscovery plugin not set on bootstrap");
+ }
+ if (getResourceLoader() == null)
+ {
+ throw new IllegalStateException("ResourceLoader plugin not set on bootstrap");
+ }
}
/**
- * Register any beans defined by the provided classes with the manager
+ * Register any beans defined by the provided classes with the getManager()
*
* @param classes The classes to register
*/
@@ -120,7 +121,7 @@
}
/**
- * Register the bean with the manager, including any standard (built in) beans
+ * Register the bean with the getManager(), including any standard (built in) beans
*
* @param classes The classes to register as Web Beans
*/
@@ -128,7 +129,7 @@
{
Set<AbstractBean<?, ?>> beans = createBeans(classes);
beans.addAll(createStandardBeans());
- manager.setBeans(beans);
+ getManager().setBeans(beans);
}
/**
@@ -139,14 +140,15 @@
protected Set<AbstractBean<?, ?>> createStandardBeans()
{
Set<AbstractBean<?, ?>> beans = new HashSet<AbstractBean<?, ?>>();
- createBean(BeanFactory.createSimpleBean(Transaction.class, manager), beans);
- createBean(new SimpleBean<ManagerImpl>(ManagerImpl.class, manager)
+ createBean(BeanFactory.createSimpleBean(Transaction.class, getManager()), beans);
+ final ManagerImpl managerImpl = getManager();
+ createBean(new SimpleBean<ManagerImpl>(ManagerImpl.class, getManager())
{
@Override
public ManagerImpl create()
{
- return manager;
+ return managerImpl;
}
}, beans);
@@ -169,13 +171,13 @@
Set<AbstractBean<?, ?>> beans = new HashSet<AbstractBean<?, ?>>();
for (Class<?> clazz : classes)
{
- if (manager.getEjbDescriptorCache().containsKey(clazz))
+ if (getManager().getEjbDescriptorCache().containsKey(clazz))
{
- createBean(createEnterpriseBean(clazz, manager), beans);
+ createBean(createEnterpriseBean(clazz, getManager()), beans);
}
else if (isTypeSimpleWebBean(clazz))
{
- createBean(createSimpleBean(clazz, manager), beans);
+ createBean(createSimpleBean(clazz, getManager()), beans);
}
}
return beans;
@@ -193,18 +195,18 @@
protected void createBean(AbstractClassBean<?> bean, Set<AbstractBean<?, ?>> beans)
{
beans.add(bean);
- manager.getResolver().addInjectionPoints(bean.getInjectionPoints());
+ getManager().getResolver().addInjectionPoints(bean.getInjectionPoints());
for (AnnotatedMethod<Object> producerMethod : bean.getProducerMethods())
{
- ProducerMethodBean<?> producerMethodBean = createProducerMethodBean(producerMethod, bean, manager);
+ ProducerMethodBean<?> producerMethodBean = createProducerMethodBean(producerMethod, bean, getManager());
beans.add(producerMethodBean);
- manager.getResolver().addInjectionPoints(producerMethodBean.getInjectionPoints());
+ getManager().getResolver().addInjectionPoints(producerMethodBean.getInjectionPoints());
registerEvents(producerMethodBean.getInjectionPoints(), beans);
log.info("Web Bean: " + producerMethodBean);
}
for (AnnotatedField<Object> producerField : bean.getProducerFields())
{
- ProducerFieldBean<?> producerFieldBean = createProducerFieldBean(producerField, bean, manager);
+ ProducerFieldBean<?> producerFieldBean = createProducerFieldBean(producerField, bean, getManager());
beans.add(producerFieldBean);
log.info("Web Bean: " + producerFieldBean);
}
@@ -223,14 +225,14 @@
}
if ( injectionPoint.isAnnotationPresent(Obtains.class) )
{
- InstanceBean<Object, Field> instanceBean = createInstanceBean(injectionPoint, manager);
+ InstanceBean<Object, Field> instanceBean = createInstanceBean(injectionPoint, getManager());
beans.add(instanceBean);
log.info("Web Bean: " + instanceBean);
}
}
for (AnnotatedMethod<Object> observerMethod : bean.getObserverMethods())
{
- ObserverImpl<?> observer = createObserver(observerMethod, bean, manager);
+ ObserverImpl<?> observer = createObserver(observerMethod, bean, getManager());
if (observerMethod.getAnnotatedParameters(Observes.class).size() == 1)
{
registerObserver(observer, observerMethod.getAnnotatedParameters(Observes.class).get(0).getType(), observerMethod.getAnnotatedParameters(Observes.class).get(0).getBindingTypesAsArray());
@@ -248,25 +250,25 @@
/**
* Starts the boot process.
*
- * Discovers the beans and registers them with the manager. Also resolves the
+ * Discovers the beans and registers them with the getManager(). Also resolves the
* injection points.
*
* @param webBeanDiscovery The discovery implementation
*/
- public synchronized void boot(WebBeanDiscovery webBeanDiscovery)
+ public void boot()
{
- log.info("Starting Web Beans RI " + getVersion());
- if (webBeanDiscovery == null)
+ synchronized (this)
{
- throw new IllegalStateException("No WebBeanDiscovery provider found, you need to implement the org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery interface, and tell the RI to use it by specifying -D" + WebBeansBootstrap.WEB_BEAN_DISCOVERY_PROPERTY_NAME + "=<classname>");
+ log.info("Starting Web Beans RI " + getVersion());
+ validateBootstrap();
+ // Must populate EJB cache first, as we need it to detect whether a bean is an EJB!
+ getManager().getEjbDescriptorCache().addAll(getWebBeanDiscovery().discoverEjbs());
+ registerBeans(getWebBeanDiscovery().discoverWebBeanClasses());
+ log.info("Validing Web Bean injection points");
+ getManager().getResolver().resolveInjectionPoints();
+ getManager().fireEvent(getManager(), new InitializedBinding());
+ log.info("Web Beans RI initialized");
}
- // Must populate EJB cache first, as we need it to detect whether a bean is an EJB!
- manager.getEjbDescriptorCache().addAll(webBeanDiscovery.discoverEjbs());
- registerBeans(webBeanDiscovery.discoverWebBeanClasses());
- log.info("Validing Web Bean injection points");
- manager.getResolver().resolveInjectionPoints();
- manager.fireEvent(manager, new InitializedBinding());
- log.info("Web Beans RI initialized");
}
/**
@@ -281,39 +283,8 @@
}
/**
- * Gets the available discovery implementations
+ * Registers an observer with the getManager()
*
- * Parses the web-beans-ri.properties file and for each row describing a
- * discover class, instantiate that class and add it to the set
- *
- * @return A set of discovery implementations
- * @see org.jboss.webbeans.bootstrap.DeploymentProperties
- */
- @SuppressWarnings("unchecked")
- public static Set<Class<? extends WebBeanDiscovery>> getWebBeanDiscoveryClasses()
- {
- Set<Class<? extends WebBeanDiscovery>> webBeanDiscoveryClasses = new HashSet<Class<? extends WebBeanDiscovery>>();
- for (String className : new DeploymentProperties(Thread.currentThread().getContextClassLoader()).getPropertyValues(WEB_BEAN_DISCOVERY_PROPERTY_NAME))
- {
- try
- {
- webBeanDiscoveryClasses.add((Class<WebBeanDiscovery>) Class.forName(className));
- }
- catch (ClassNotFoundException e)
- {
- log.debug("Unable to load WebBeanDiscovery provider " + className, e);
- }
- catch (NoClassDefFoundError e)
- {
- log.warn("Unable to load WebBeanDiscovery provider " + className + " due classDependencyProblem", e);
- }
- }
- return webBeanDiscoveryClasses;
- }
-
- /**
- * Registers an observer with the manager
- *
* @param observer The observer
* @param eventType The event type to observe
* @param bindings The binding types to observe on
@@ -321,7 +292,7 @@
@SuppressWarnings("unchecked")
private <T> void registerObserver(Observer<T> observer, Class<?> eventType, Annotation[] bindings)
{
- manager.addObserver(observer, (Class<T>) eventType, bindings);
+ getManager().addObserver(observer, (Class<T>) eventType, bindings);
}
/**
@@ -345,7 +316,7 @@
{
if ( injectionPoint.isAnnotationPresent(Fires.class) )
{
- EventBean<Object, Method> eventBean = createEventBean(injectionPoint, manager);
+ EventBean<Object, Method> eventBean = createEventBean(injectionPoint, getManager());
beans.add(eventBean);
log.info("Web Bean: " + eventBean);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/contexts/ContextMap.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -21,9 +21,9 @@
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
+import javax.webbeans.ExecutionException;
import javax.webbeans.manager.Context;
import org.jboss.webbeans.util.ConcurrentCache;
@@ -63,7 +63,7 @@
{
interrupted = true;
}
- catch (ExecutionException e)
+ catch (java.util.concurrent.ExecutionException e)
{
rethrow(e);
}
@@ -94,13 +94,17 @@
{
try
{
+ if (getFuture(scopeType) == null)
+ {
+ throw new ExecutionException("No scope registered for " + scopeType);
+ }
return getFuture(scopeType).get();
}
catch (InterruptedException e)
{
interrupted = true;
}
- catch (ExecutionException e)
+ catch (java.util.concurrent.ExecutionException e)
{
rethrow(e);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ejb/EJB.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -26,7 +26,7 @@
*/
public class EJB extends ApiAbstraction
{
-
+
public static final Class<?> ENTERPRISE_BEAN_CLASS;
/**
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resources/DefaultNaming.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resources/DefaultNaming.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resources/DefaultNaming.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,66 @@
+package org.jboss.webbeans.resources;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.webbeans.ExecutionException;
+
+import org.jboss.webbeans.resources.spi.Naming;
+
+public class DefaultNaming implements Naming
+{
+
+ private transient InitialContext initialContext;
+
+ public DefaultNaming()
+ {
+ try
+ {
+ this.initialContext = new InitialContext();
+ }
+ catch (NamingException e)
+ {
+ throw new ExecutionException("Could not obtain InitialContext", e);
+ }
+ }
+
+
+
+ public InitialContext getInitialContext()
+ {
+ return initialContext;
+ }
+
+ public void bind(String key, Object value)
+ {
+ try
+ {
+ initialContext.bind(key, value);
+ }
+ catch (NamingException e)
+ {
+ throw new ExecutionException("Cannot bind " + value + " to " + key, e);
+ }
+ }
+
+ public <T> T lookup(String name, Class<? extends T> expectedType)
+ {
+ Object instance;
+ try
+ {
+ instance = initialContext.lookup(name);
+ }
+ catch (NamingException e)
+ {
+ throw new ExecutionException("Cannot lookup " + name, e);
+ }
+ try
+ {
+ return (T) instance;
+ }
+ catch (ClassCastException e)
+ {
+ throw new ExecutionException(instance + " not of expected type " + expectedType, e);
+ }
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/resources/DefaultNaming.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,94 @@
+package org.jboss.webbeans.servlet;
+
+
+import java.lang.reflect.Constructor;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.bootstrap.PropertiesBasedBootstrap;
+import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
+import org.jboss.webbeans.contexts.ApplicationContext;
+import org.jboss.webbeans.contexts.DependentContext;
+import org.jboss.webbeans.contexts.RequestContext;
+import org.jboss.webbeans.contexts.SessionContext;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.util.DeploymentProperties;
+
+public class ServletBootstrap extends PropertiesBasedBootstrap
+{
+
+ private ManagerImpl manager;
+ private ResourceLoader resourceLoader;
+ private WebBeanDiscovery webBeanDiscovery;
+ private DeploymentProperties deploymentProperties;
+
+ public ServletBootstrap(ServletContext servletContext)
+ {
+ // Create the manager
+ this.manager = new ManagerImpl();
+
+ // Create a resouce loader based on the servlet context for initial loading
+ ResourceLoader servletContextResourceLoader = new ServletContextResourceLoader(servletContext);
+ this.deploymentProperties = new DeploymentProperties(servletContextResourceLoader);
+
+ // Attempt to create a plugin resource loader
+ Constructor<? extends ResourceLoader> resourceLoaderConstructor = getClassConstructor(deploymentProperties, servletContextResourceLoader, ResourceLoader.PROPERTY_NAME, ResourceLoader.class, ServletContext.class);
+ if (resourceLoaderConstructor != null)
+ {
+ this.resourceLoader = newInstance(resourceLoaderConstructor, servletContext);
+ }
+ else
+ {
+ // If no plugin resource loader, use the servlet context resource loader
+ this.resourceLoader = servletContextResourceLoader;
+ }
+
+ // Now safe to initialize other properties and register the manager
+ super.initProperties();
+ super.registerManager();
+
+ // Attempt to create a plugin web beans discovery
+ Constructor<? extends WebBeanDiscovery> webBeanDiscoveryConstructor = getClassConstructor(deploymentProperties, resourceLoader, WebBeanDiscovery.PROPERTY_NAME, WebBeanDiscovery.class, ServletContext.class);
+ if (webBeanDiscoveryConstructor == null)
+ {
+ throw new IllegalStateException("Cannot load Web Bean discovery plugin! Check if Web Beans is properly installed into your container");
+ }
+ else
+ {
+ this.webBeanDiscovery = newInstance(webBeanDiscoveryConstructor, servletContext);
+ }
+
+ // Register the contexts for the Servlet environment
+ getManager().addContext(DependentContext.INSTANCE);
+ getManager().addContext(RequestContext.INSTANCE);
+ getManager().addContext(SessionContext.INSTANCE);
+ getManager().addContext(ApplicationContext.INSTANCE);
+ ApplicationContext.INSTANCE.setBeanMap(new ApplicationBeanMap(servletContext));
+ }
+
+ @Override
+ protected DeploymentProperties getDeploymentProperties()
+ {
+ return deploymentProperties;
+ }
+
+ @Override
+ public ResourceLoader getResourceLoader()
+ {
+ return resourceLoader;
+ }
+
+ @Override
+ protected WebBeanDiscovery getWebBeanDiscovery()
+ {
+ return webBeanDiscovery;
+ }
+
+ @Override
+ public ManagerImpl getManager()
+ {
+ return manager;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletBootstrap.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletContextResourceLoader.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletContextResourceLoader.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletContextResourceLoader.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,74 @@
+package org.jboss.webbeans.servlet;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.resources.spi.ResourceLoadingException;
+import org.jboss.webbeans.util.EnumerationIterable;
+
+public class ServletContextResourceLoader implements ResourceLoader
+{
+
+ private final ServletContext servletContext;
+
+ public ServletContextResourceLoader(ServletContext servletContext)
+ {
+ this.servletContext = servletContext;
+ }
+
+ public Class<?> classForName(String name)
+ {
+ try
+ {
+ return servletContext.getClass().getClassLoader().loadClass(name);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ResourceLoadingException(e);
+ }
+ catch (NoClassDefFoundError e)
+ {
+ throw new ResourceLoadingException(e);
+ }
+ }
+
+ public URL getResource(String name)
+ {
+ URL resource = getResourceFromServletContext(name);
+ if (resource == null)
+ {
+ String stripped = name.startsWith("/") ? name.substring(1) : name;
+ resource = servletContext.getClass().getClassLoader().getResource(name);
+ }
+ return resource;
+ }
+
+ private URL getResourceFromServletContext(String name)
+ {
+ try
+ {
+ return servletContext.getResource(name);
+ }
+ catch (Exception e)
+ {
+ return null;
+ }
+ }
+
+ public Iterable<URL> getResources(String name)
+ {
+ try
+ {
+ // TODO load resources from servlet context!
+ return new EnumerationIterable<URL>(servletContext.getClass().getClassLoader().getResources(name));
+ }
+ catch (IOException e)
+ {
+ throw new ResourceLoadingException("Error loading resources for " + name, e);
+ }
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletContextResourceLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/servlet/ServletLifecycle.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -17,23 +17,16 @@
package org.jboss.webbeans.servlet;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.bootstrap.WebBeansBootstrap;
-import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
import org.jboss.webbeans.contexts.ApplicationContext;
import org.jboss.webbeans.contexts.DependentContext;
import org.jboss.webbeans.contexts.RequestContext;
import org.jboss.webbeans.contexts.SessionContext;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
-import org.jboss.webbeans.util.Reflections;
/**
* Reacts to phases of the servlet life cycles
@@ -44,8 +37,6 @@
public class ServletLifecycle
{
private static LogProvider log = Logging.getLogProvider(ServletLifecycle.class);
- // The servlet context
- private static ServletContext servletContext;
/**
* Starts the application
@@ -54,15 +45,9 @@
*
* @param context The servlet context
*/
- public static void beginApplication(ServletContext context)
+ public static void beginApplication(ServletContext servletContext)
{
- servletContext = context;
- ApplicationContext.INSTANCE.setBeanMap(new ApplicationBeanMap(servletContext));
- WebBeansBootstrap webBeansBootstrap = new WebBeansBootstrap();
- CurrentManager.rootManager().addContext(RequestContext.INSTANCE);
- CurrentManager.rootManager().addContext(SessionContext.INSTANCE);
- CurrentManager.rootManager().addContext(ApplicationContext.INSTANCE);
- webBeansBootstrap.boot(getWebBeanDiscovery());
+ new ServletBootstrap(servletContext).boot();
}
/**
@@ -72,7 +57,6 @@
{
ApplicationContext.INSTANCE.destroy();
ApplicationContext.INSTANCE.setBeanMap(null);
- servletContext = null;
}
/**
@@ -121,54 +105,4 @@
SessionContext.INSTANCE.setBeanMap(null);
}
- /**
- * Gets the servlet context
- *
- * @return The servlet context
- */
- public static ServletContext getServletContext()
- {
- return servletContext;
- }
-
- /**
- * Gets the Web Beans discovery class
- *
- * @return The discoverer
- */
- private static WebBeanDiscovery getWebBeanDiscovery()
- {
- WebBeanDiscovery webBeanDiscovery = null;
-
- for (Class<? extends WebBeanDiscovery> clazz : WebBeansBootstrap.getWebBeanDiscoveryClasses())
- {
- Constructor<? extends WebBeanDiscovery> constructor = Reflections.getConstructor(clazz, ServletContext.class);
- if (constructor != null)
- {
- try
- {
- webBeanDiscovery = constructor.newInstance(servletContext);
- break;
- }
- catch (InstantiationException e)
- {
- log.warn("Error creating WebBeanDiscovery provider" + clazz.getName(), e);
- }
- catch (IllegalAccessException e)
- {
- log.warn("Error creating WebBeanDiscovery provider" + clazz.getName(), e);
- }
- catch (IllegalArgumentException e)
- {
- log.warn("Error creating WebBeanDiscovery provider" + clazz.getName(), e);
- }
- catch (InvocationTargetException e)
- {
- log.warn("Error creating WebBeanDiscovery provider" + clazz.getName(), e);
- }
- }
- }
- return webBeanDiscovery;
- }
-
}
Copied: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/DeploymentProperties.java (from rev 713, ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bootstrap/DeploymentProperties.java)
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/DeploymentProperties.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/DeploymentProperties.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,174 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.webbeans.util;
+
+import static org.jboss.webbeans.util.Strings.split;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.resources.spi.ResourceLoadingException;
+
+/**
+ * Utility class to load deployment properties
+ *
+ * @author Pete Muir
+ */
+public class DeploymentProperties
+{
+ // The resource bundle used to control Web Beans RI deployment
+ public static final String RESOURCE_BUNDLE = "META-INF/web-beans-ri.properties";
+
+ private static LogProvider log = Logging.getLogProvider(DeploymentProperties.class);
+
+ // The class to work from
+ private ResourceLoader resourceLoader;
+
+ /**
+ * Constructor
+ *
+ * @param classLoader The classloader to work on
+ */
+ public DeploymentProperties(ResourceLoader classLoader)
+ {
+ this.resourceLoader = classLoader;
+ }
+
+ /**
+ * Get a list of possible values for a given key.
+ *
+ * First, System properties are tried, followed by the specified resource
+ * bundle (first in classpath only).
+ *
+ * Colon (:) deliminated lists are split out. (gotta love Petes choice of
+ * ASCII art for that one ;-)
+ *
+ * @param key The key to search for
+ * @return A list of possible values. An empty list is returned if there are
+ * no matches.
+ */
+ public List<String> getPropertyValues(String key)
+ {
+ List<String> values = new ArrayList<String>();
+ addPropertiesFromSystem(key, values);
+ addPropertiesFromResourceBundle(key, values);
+ return values;
+ }
+
+ /**
+ * Adds matches from system properties
+ *
+ * @param key The key to match
+ * @param values The currently found values
+ */
+ private void addPropertiesFromSystem(String key, List<String> values)
+ {
+ addProperty(key, System.getProperty(key), values);
+ }
+
+ /**
+ * Adds matches from detected resource bundles
+ *
+ * @param key The key to match
+ * @param values The currently found values
+ */
+ private void addPropertiesFromResourceBundle(String key, List<String> values)
+ {
+ try
+ {
+ for (URL url : resourceLoader.getResources(RESOURCE_BUNDLE))
+ {
+ Properties properties = new Properties();
+ InputStream propertyStream = url.openStream();
+ try
+ {
+ properties.load(propertyStream);
+ addProperty(key, properties.getProperty(key), values);
+ }
+ finally
+ {
+ if (propertyStream != null)
+ {
+ propertyStream.close();
+ }
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // No - op, file is optional
+ }
+ }
+
+ /**
+ * Add the property to the set of properties only if it hasn't already been
+ * added
+ *
+ * @param key The key searched for
+ * @param value The value of the property
+ * @param values The currently found values
+ */
+ private void addProperty(String key, String value, List<String> values)
+ {
+ if (value != null)
+ {
+ String[] properties = split(value, ":");
+ for (String property : properties)
+ {
+ values.add(property);
+ }
+
+ }
+ }
+
+ /**
+ * Gets the possible implementation class for a given property for which the
+ * values are classanames
+ *
+ * @param deploymentProperties The deployment properties object to use
+ * @param resourceLoader The resource laoder to use to attempt
+ * @param propertyName The name of the property to load
+ * @return A set of classes specified
+ */
+ public static <T> Set<Class<? extends T>> getClasses(DeploymentProperties deploymentProperties, ResourceLoader resourceLoader, String propertyName, Class<T> expectedType)
+ {
+ Set<Class<? extends T>> classes = new HashSet<Class<? extends T>>();
+ for (String className : deploymentProperties.getPropertyValues(propertyName))
+ {
+ try
+ {
+ classes.add((Class<? extends T>) resourceLoader.classForName(className));
+ }
+ catch (ResourceLoadingException e)
+ {
+ log.debug("Unable to load class " + className + " for property " + propertyName, e);
+ }
+ }
+ return classes;
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/DeploymentProperties.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/JNDI.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.webbeans.util;
-
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.webbeans.ExecutionException;
-
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-
-/**
- * Provides JNDI access abstraction
- *
- * @author Pete Muir
- */
-public class JNDI
-{
-
- private static final LogProvider log = Logging.getLogProvider(JNDI.class);
-
- public static InitialContext getInitialContext(Properties props) throws NamingException
- {
- if (props==null)
- {
- throw new IllegalStateException("JNDI properties not initialized");
- }
-
- if (log.isDebugEnabled())
- {
- log.debug("JNDI InitialContext properties:" + props);
- }
-
- try {
- return props.size()==0 ?
- new InitialContext() :
- new InitialContext(props);
- }
- catch (NamingException e) {
- log.debug("Could not obtain initial context", e);
- throw e;
- }
-
- }
-
- public static InitialContext getInitialContext() throws NamingException
- {
- return getInitialContext(new Properties());
- }
-
- /**
- * Looks up a object in JNDI
- *
- * @param name The JNDI name
- * @return The object
- */
- public static Object lookup(String name)
- {
- return lookup(name, Object.class);
- }
-
- /**
- * Typed JNDI lookup
- *
- * @param <T> The type
- * @param name The JNDI name
- * @param expectedType The excpected type
- * @return The object
- */
- @SuppressWarnings("unchecked")
- public static <T> T lookup(String name, Class<? extends T> expectedType)
- {
- try
- {
- return (T) getInitialContext().lookup(name);
- }
- catch (NamingException e)
- {
- throw new ExecutionException("Error looking " + name + " up in JNDI", e);
- }
- }
-
- public static void bind(String key, Object value)
- {
- try
- {
- getInitialContext().bind(key, value);
- }
- catch (NamingException e)
- {
- throw new ExecutionException("Error binding " + value + " to " + key + " in JNDI", e);
- }
- }
-
- public static void bind(String env, String name, Object value)
- {
- try
- {
- Context environment = (Context) getInitialContext().lookup(env);
- environment.bind(name, value);
- }
- catch (NamingException e)
- {
- throw new ExecutionException("Error binding " + value + " to " + name + " in JNDI", e);
- }
- }
-
-}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/util/Reflections.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -64,7 +64,7 @@
* @return The instance
* @throws ClassNotFoundException If the class if not found
*/
- public static Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException
+ private static Class<?> classForName(String name, ClassLoader classLoader) throws ClassNotFoundException
{
try
{
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/AbstractTest.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -5,10 +5,6 @@
import javax.webbeans.Production;
import javax.webbeans.Standard;
-import org.jboss.webbeans.contexts.ApplicationContext;
-import org.jboss.webbeans.contexts.RequestContext;
-import org.jboss.webbeans.contexts.SessionContext;
-import org.jboss.webbeans.contexts.SimpleBeanMap;
import org.jboss.webbeans.test.annotations.AnotherDeploymentType;
import org.jboss.webbeans.test.annotations.HornedAnimalDeploymentType;
import org.jboss.webbeans.test.mock.MockBootstrap;
@@ -25,20 +21,8 @@
@BeforeMethod
public final void before()
{
- manager = new MockManagerImpl();
- webBeansBootstrap = new MockBootstrap(manager);
- manager.addContext(RequestContext.INSTANCE);
- SessionContext.INSTANCE.setBeanMap(new SimpleBeanMap());
- manager.addContext(SessionContext.INSTANCE);
- ApplicationContext.INSTANCE.setBeanMap(new SimpleBeanMap());
- manager.addContext(ApplicationContext.INSTANCE);
- // Load the built in beans
- webBeansBootstrap.registerStandardBeans();
- init();
- }
-
- protected void init()
- {
+ webBeansBootstrap = new MockBootstrap();
+ manager = webBeansBootstrap.getManager();
addStandardDeploymentTypesForTests();
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/BoostrapTest.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -35,7 +35,8 @@
@Test(groups="bootstrap")
public void testSingleSimpleBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Tuna.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Tuna.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
assert beans.size() == 1 + MockManagerImpl.BUILT_IN_BEANS;
@@ -52,7 +53,8 @@
@Test(groups="bootstrap")
public void testSingleEnterpriseBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Hound.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 1 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
@@ -69,7 +71,8 @@
@Test(groups="bootstrap")
public void testMultipleSimpleBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 4 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
@@ -94,7 +97,8 @@
@Test(groups="bootstrap")
public void testProducerMethodBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(TarantulaProducer.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TarantulaProducer.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 2 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
@@ -115,7 +119,8 @@
@Test(groups="bootstrap")
public void testMultipleEnterpriseBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 4 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
@@ -140,7 +145,8 @@
@Test(groups="bootstrap")
public void testMultipleEnterpriseAndSimpleBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 8 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
@@ -173,7 +179,8 @@
@Test(groups="bootstrap")
public void testRegisterProducerMethodBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(TarantulaProducer.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TarantulaProducer.class));
+ webBeansBootstrap.boot();
assert manager.getBeans().size() == 2 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
for (Bean<?> bean : manager.getBeans())
@@ -194,7 +201,8 @@
@Test(groups="bootstrap")
public void testRegisterMultipleEnterpriseAndSimpleBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class));
+ webBeansBootstrap.boot();
assert manager.getBeans().size() == 8 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
for (Bean<?> bean : manager.getBeans())
@@ -226,13 +234,15 @@
@Test(groups="bootstrap", expectedExceptions=IllegalStateException.class)
public void testDiscoverFails()
{
- webBeansBootstrap.boot(null);
+ webBeansBootstrap.setWebBeanDiscovery(null);
+ webBeansBootstrap.boot();
}
@Test(groups="bootstrap")
public void testDiscover()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class))));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(Hound.class, Elephant.class, Panther.class, Tiger.class, Tuna.class, Salmon.class, SeaBass.class, Sole.class))));
+ webBeansBootstrap.boot();
assert manager.getBeans().size() == 8 + MockManagerImpl.BUILT_IN_BEANS;
Map<Class<?>, Bean<?>> classes = new HashMap<Class<?>, Bean<?>>();
@@ -266,7 +276,8 @@
public void testInitializedEvent()
{
assert !InitializedObserver.observered;
- webBeansBootstrap.boot(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(InitializedObserver.class))));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(InitializedObserver.class))));
+ webBeansBootstrap.boot();
assert InitializedObserver.observered;
}
@@ -274,13 +285,15 @@
@Test(groups="bootstrap")
public void testRequestContextActiveDuringInitializtionEvent()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesRequestContext.class, Tuna.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesRequestContext.class, Tuna.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.boot();
}
@Test(groups="bootstrap")
public void testApplicationContextActiveDuringInitializtionEvent()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesApplicationContext.class, LadybirdSpider.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(InitializedObserverWhichUsesApplicationContext.class, LadybirdSpider.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.boot();
}
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/EventBusTest.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -324,7 +324,8 @@
@SpecAssertion(section = "8.5")
public void testObserverMethodOnEnterpriseBeanIsBusinessMethodOrStatic()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Pomeranian.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Pomeranian.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 1 + MockManagerImpl.BUILT_IN_BEANS;
Set<Observer<String>> observers = manager.resolveObservers("An event");
@@ -335,7 +336,8 @@
@SpecAssertion(section = "8.5")
public void testObserverMethodOnEnterpriseBeanNotBusinessMethodOrStaticFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(TibetanTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TibetanTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 1 + MockManagerImpl.BUILT_IN_BEANS;
Set<Observer<String>> observers = manager.resolveObservers("An event");
@@ -356,7 +358,8 @@
@SpecAssertion(section = { "8.5.1", "8.5.2" })
public void testObserverMethodMustHaveOnlyOneEventParameter()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(YorkshireTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(YorkshireTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
}
@@ -365,7 +368,8 @@
@SpecAssertion(section = "8.5.1")
public void testObserverMethodCannotObserveParameterizedEvents()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(BostonTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(BostonTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
}
@@ -375,7 +379,8 @@
public void testObserverMethodWithoutBindingTypesObservesEventsWithoutBindingTypes()
{
// This observer has no binding types specified
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Pomeranian.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Pomeranian.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 1 + MockManagerImpl.BUILT_IN_BEANS;
@@ -389,7 +394,8 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodAnnotatedProducesFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(BorderTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(BorderTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
}
@@ -398,7 +404,8 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodAnnotatedInitializerFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(AustralianTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(AustralianTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
}
@@ -407,7 +414,8 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodAnnotatedDestructorFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(CairnsTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(CairnsTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
}
@@ -416,7 +424,8 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodWithDisposesParamFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(FoxTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FoxTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
}
@@ -425,7 +434,8 @@
@SpecAssertion(section = "8.5.2")
public void testObserverMethodMayHaveMultipleBindingTypes()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(BullTerrier.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(BullTerrier.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
// If we can resolve the observer with the two binding types,
@@ -454,7 +464,8 @@
@SpecAssertion(section = "8.5.4")
public void testObserverMethodReceivesInjectionsOnNonObservesParameters()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(BananaSpider.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(BananaSpider.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans != null;
}
@@ -467,7 +478,8 @@
@SpecAssertion(section = "8.5.5")
public void testConditionalObserver()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(RecluseSpider.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(RecluseSpider.class));
+ webBeansBootstrap.boot();
manager.fireEvent("New string event");
// Should not be notified since bean is not instantiated yet
@@ -546,7 +558,8 @@
@SpecAssertion(section = "8.5.7")
public void testEnterpriseBeanObserverMethodCalledWithCallerContext()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(Pomeranian.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(Pomeranian.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 1;
String event = "A new event";
@@ -568,7 +581,8 @@
@SpecAssertion(section = "8.5.7")
public void testNonTransactionalObserverThrownNonCheckedExceptionIsRethrown()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(TeaCupPomeranian.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TeaCupPomeranian.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 1 + MockManagerImpl.BUILT_IN_BEANS;
manager.fireEvent("Another event");
@@ -578,7 +592,8 @@
@SpecAssertion(section = "8.5.7")
public void testNonTransactionalObserverThrownCheckedExceptionIsWrappedAndRethrown()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(TeaCupPomeranian.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(TeaCupPomeranian.class));
+ webBeansBootstrap.boot();
List<Bean<?>> beans = manager.getBeans();
assert beans.size() == 1 + MockManagerImpl.BUILT_IN_BEANS;
manager.fireEvent(new Integer(1));
@@ -588,7 +603,8 @@
@SpecAssertion(section = "8.6")
public void testDuplicateBindingsToFireFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(SweeWaxbill.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(SweeWaxbill.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -605,7 +621,8 @@
@SpecAssertion(section = "8.6")
public void testDuplicateBindingsToObservesFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(SweeWaxbill.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(SweeWaxbill.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -622,7 +639,8 @@
@SpecAssertion(section = "8.6")
public void testNonBindingTypePassedToFireFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(OwlFinch.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(OwlFinch.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -639,7 +657,8 @@
@SpecAssertion(section = "8.6")
public void testNonBindingTypePassedToObservesFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(OwlFinch.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(OwlFinch.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -656,7 +675,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnField()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(BlueFacedParrotFinch.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(BlueFacedParrotFinch.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -676,7 +696,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnParameterOfProducerMethod()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(StarFinch.class, FinchKeeper.class, BirdCage.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(StarFinch.class, FinchKeeper.class, BirdCage.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -698,7 +719,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnParameterOfInitializerMethod()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(OrangeCheekedWaxbill.class, FinchKeeper.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(OrangeCheekedWaxbill.class, FinchKeeper.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -727,7 +749,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnParameterOfRemoveMethod()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(EuropeanGoldfinch.class, FinchKeeper.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(EuropeanGoldfinch.class, FinchKeeper.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -747,7 +770,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnParameterOfConstructor()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(AuroraFinch.class, FinchKeeper.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(AuroraFinch.class, FinchKeeper.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -766,7 +790,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnNonEventTypeInjectionPointFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(CommonWaxbill.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(CommonWaxbill.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -783,11 +808,13 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnInjectionPointWithoutTypeParameterFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(BlackRumpedWaxbill.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(BlackRumpedWaxbill.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
BlackRumpedWaxbill bean = manager.getInstanceByType(BlackRumpedWaxbill.class);
+ webBeansBootstrap.boot();
assert bean != null;
}
finally
@@ -800,7 +827,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnInjectionPointWithWildcardedTypeParameterFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(GoldbreastWaxbill.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(GoldbreastWaxbill.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
@@ -817,7 +845,8 @@
@SpecAssertion(section = "8.6")
public void testObservableAnnotationOnInjectionPointWithTypeVariabledTypeParameterFails()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(JavaSparrow.class));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(JavaSparrow.class));
+ webBeansBootstrap.boot();
try
{
DependentContext.INSTANCE.setActive(true);
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -88,21 +88,24 @@
@Test
public void testClassesImplementingServletInterfacesNotDiscoveredAsSimpleBeans()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(FilterBean.class, HttpSessionListenerBean.class, ServletBean.class, ServletContextListenerBean.class, ServletRequestListenerBean.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(FilterBean.class, HttpSessionListenerBean.class, ServletBean.class, ServletContextListenerBean.class, ServletRequestListenerBean.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.boot();
assert manager.getBeans().size() == MockManagerImpl.BUILT_IN_BEANS;
}
@Test
public void testClassesImplementingEnterpriseBeanInterfaceNotDiscoveredAsSimpleBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(EnterpriseBeanWebBean.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(EnterpriseBeanWebBean.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.boot();
assert manager.getBeans().size() == MockManagerImpl.BUILT_IN_BEANS;
}
@Test
public void testClassExtendingUiComponentNotDiscoveredAsSimpleBean()
{
- webBeansBootstrap.boot(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(UIComponentBean.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(new HashSet<Class<?>>(Arrays.asList(UIComponentBean.class)), null, new HashSet<Class<?>>()));
+ webBeansBootstrap.boot();
assert manager.getBeans().size() == MockManagerImpl.BUILT_IN_BEANS;
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockBootstrap.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -1,26 +1,63 @@
package org.jboss.webbeans.test.mock;
-import org.jboss.webbeans.CurrentManager;
-import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.bootstrap.WebBeansBootstrap;
+import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
+import org.jboss.webbeans.contexts.ApplicationContext;
+import org.jboss.webbeans.contexts.DependentContext;
+import org.jboss.webbeans.contexts.RequestContext;
+import org.jboss.webbeans.contexts.SessionContext;
+import org.jboss.webbeans.contexts.SimpleBeanMap;
+import org.jboss.webbeans.resources.spi.ResourceLoader;
public class MockBootstrap extends WebBeansBootstrap
{
- public MockBootstrap(ManagerImpl manager)
+ private WebBeanDiscovery webBeanDiscovery;
+ private ResourceLoader resourceLoader;
+ private MockManagerImpl manager;
+
+ public MockBootstrap()
{
- super(manager);
+ this.manager = new MockManagerImpl();
+ this.resourceLoader = new MockResourceLoader();
+ registerManager();
+ registerStandardBeans();
+
+ // Set up the mock contexts
+ manager.addContext(RequestContext.INSTANCE);
+ SessionContext.INSTANCE.setBeanMap(new SimpleBeanMap());
+ manager.addContext(SessionContext.INSTANCE);
+ ApplicationContext.INSTANCE.setBeanMap(new SimpleBeanMap());
+ manager.addContext(ApplicationContext.INSTANCE);
+ manager.addContext(DependentContext.INSTANCE);
}
- public void registerStandardBeans()
+ protected void registerStandardBeans()
{
- manager.setBeans(createStandardBeans());
+ getManager().setBeans(createStandardBeans());
}
+ public void setWebBeanDiscovery(WebBeanDiscovery webBeanDiscovery)
+ {
+ this.webBeanDiscovery = webBeanDiscovery;
+ }
+
@Override
- protected void registerManager()
+ protected WebBeanDiscovery getWebBeanDiscovery()
{
- CurrentManager.setRootManager(manager);
+ return this.webBeanDiscovery;
}
+
+ @Override
+ public ResourceLoader getResourceLoader()
+ {
+ return resourceLoader;
+ }
+
+ @Override
+ public MockManagerImpl getManager()
+ {
+ return manager;
+ }
}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.test.mock;
+
+import java.util.Hashtable;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class MockInitialContext extends InitialContext
+{
+
+ public MockInitialContext(Hashtable<?, ?> arg0) throws NamingException
+ {
+ super(arg0);
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockInitialContext.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockManagerImpl.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockManagerImpl.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -1,10 +1,33 @@
package org.jboss.webbeans.test.mock;
import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.resources.spi.Naming;
public class MockManagerImpl extends ManagerImpl
{
+ private Naming naming = new Naming()
+ {
+
+ public void bind(String key, Object value)
+ {
+ // no-op
+ }
+
+ public <T> T lookup(String name, Class<? extends T> expectedType)
+ {
+ // No-op
+ return null;
+ }
+
+ };
+
public static int BUILT_IN_BEANS = 3;
+ @Override
+ public Naming getNaming()
+ {
+ return naming;
+ }
+
}
Added: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockResourceLoader.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockResourceLoader.java (rev 0)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockResourceLoader.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,42 @@
+package org.jboss.webbeans.test.mock;
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.webbeans.resources.spi.ResourceLoader;
+import org.jboss.webbeans.resources.spi.ResourceLoadingException;
+import org.jboss.webbeans.util.EnumerationIterable;
+
+public class MockResourceLoader implements ResourceLoader
+{
+
+ public Class<?> classForName(String name)
+ {
+ try
+ {
+ return Thread.currentThread().getContextClassLoader().loadClass(name);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ResourceLoadingException(e);
+ }
+ }
+
+ public URL getResource(String name)
+ {
+ return Thread.currentThread().getContextClassLoader().getResource(name);
+ }
+
+ public Iterable<URL> getResources(String name)
+ {
+ try
+ {
+ return new EnumerationIterable<URL>(Thread.currentThread().getContextClassLoader().getResources(name));
+ }
+ catch (IOException e)
+ {
+ throw new ResourceLoadingException(e);
+ }
+ }
+
+}
Property changes on: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockResourceLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java 2008-12-24 22:55:14 UTC (rev 722)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/bootstrap/spi/WebBeanDiscovery.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -28,6 +28,9 @@
*/
public interface WebBeanDiscovery
{
+
+ public static final String PROPERTY_NAME = WebBeanDiscovery.class.getName();
+
/**
* Gets list of all classes in classpath archives with web-beans.xml files
*
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,24 @@
+package org.jboss.webbeans.resources.spi;
+
+import java.io.Serializable;
+
+
+public interface Naming extends Serializable
+{
+
+ public static final String PROPERTY_NAME = Naming.class.getName();
+
+ /**
+ * Typed JNDI lookup
+ *
+ * @param <T> The type
+ * @param name The JNDI name
+ * @param expectedType The excpected type
+ * @return The object
+ */
+ @SuppressWarnings("unchecked")
+ public <T> T lookup(String name, Class<? extends T> expectedType);
+
+ public void bind(String key, Object value);
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/Naming.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.resources.spi;
+
+import java.net.URL;
+
+
+public interface ResourceLoader
+{
+
+ public static final String PROPERTY_NAME = ResourceLoader.class.getName();
+
+ public Class<?> classForName(String name);
+
+ public URL getResource(String name);
+
+ public Iterable<URL> getResources(String name);
+
+}
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoader.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java (rev 0)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java 2008-12-24 23:37:34 UTC (rev 723)
@@ -0,0 +1,31 @@
+/**
+ *
+ */
+package org.jboss.webbeans.resources.spi;
+
+import javax.webbeans.ExecutionException;
+
+public class ResourceLoadingException extends ExecutionException
+{
+
+ public ResourceLoadingException()
+ {
+ super();
+ }
+
+ public ResourceLoadingException(String message, Throwable throwable)
+ {
+ super(message, throwable);
+ }
+
+ public ResourceLoadingException(String message)
+ {
+ super(message);
+ }
+
+ public ResourceLoadingException(Throwable throwable)
+ {
+ super(throwable);
+ }
+
+}
\ No newline at end of file
Property changes on: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/resources/spi/ResourceLoadingException.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years
[webbeans-commits] Webbeans SVN: r722 - ri/trunk/jboss-as.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-24 17:55:14 -0500 (Wed, 24 Dec 2008)
New Revision: 722
Modified:
ri/trunk/jboss-as/
ri/trunk/jboss-as/build.xml
Log:
add local build.properties
Property changes on: ri/trunk/jboss-as
___________________________________________________________________
Name: svn:ignore
- target
+
target
local.build.properties
Modified: ri/trunk/jboss-as/build.xml
===================================================================
--- ri/trunk/jboss-as/build.xml 2008-12-24 18:34:54 UTC (rev 721)
+++ ri/trunk/jboss-as/build.xml 2008-12-24 22:55:14 UTC (rev 722)
@@ -7,6 +7,7 @@
<property name="maven.dir" location="${basedir}/lib/maven" />
<property file="build.properties" />
+ <property file="local.build.properties" />
<target name="clean" description="Clean up after the JBoss updater">
<delete dir="target" failonerror="false"/>
16 years
[webbeans-commits] Webbeans SVN: r721 - doc/trunk/reference/it-IT/modules.
by webbeans-commits@lists.jboss.org
Author: nico.ben
Date: 2008-12-24 13:34:54 -0500 (Wed, 24 Dec 2008)
New Revision: 721
Modified:
doc/trunk/reference/it-IT/modules/part1.po
doc/trunk/reference/it-IT/modules/part2.po
doc/trunk/reference/it-IT/modules/part3.po
doc/trunk/reference/it-IT/modules/part4.po
Log:
WBRI-69: Italian translation for Web Beans
Modified: doc/trunk/reference/it-IT/modules/part1.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part1.po 2008-12-24 18:11:09 UTC (rev 720)
+++ doc/trunk/reference/it-IT/modules/part1.po 2008-12-24 18:34:54 UTC (rev 721)
@@ -6,8 +6,8 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-24 09:41+0100\n"
-"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
+"PO-Revision-Date: 2008-12-24 19:21+0100\n"
+"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -28,12 +28,11 @@
msgid "an improved lifecycle for stateful components, bound to well-defined <emphasis>contexts</emphasis>,"
msgstr "una migliore gestione del ciclo di vita dei componenti stateful, associata a <emphasis>contesti</emphasis> ben definiti"
-# chiedere nicola come ha tradotto dependency injection
#. Tag: para
#: part1.xml:18
#, no-c-format
msgid "a typesafe approach to <emphasis>dependency injection</emphasis>,"
-msgstr "un approccio typesafe alla <emphasis>dependency injection</emphasis>,"
+msgstr "un approccio typesafe alla <emphasis>dependency injection</emphasis>,"
# facility=struttura?
#. Tag: para
@@ -42,13 +41,11 @@
msgid "interaction via an <emphasis>event notification</emphasis> facility, and"
msgstr "interazioni basate su una struttura per <emphasis>la notifica degli eventi</emphasis>, e"
-# interceptors?
-# decorator?
#. Tag: para
#: part1.xml:25
#, no-c-format
msgid "a better approach to binding <emphasis>interceptors</emphasis> to components, along with a new kind of interceptor, called a <emphasis>decorator</emphasis>, that is more appropriate for use in solving business problems."
-msgstr "un migliore approccio nell'associazione degli <emphasis>interceptors</emphasis> ai componenti, unitamente all'introduzione di un nuovo tipo di interceptor, chiamato <emphasis>decorator</emphasis>, più adatto ad essere utilizzato nella soluzione di problemi legati alla business logic."
+msgstr "un migliore approccio nell'associazione degli <emphasis>interceptors</emphasis> ai componenti, unitamente all'introduzione di un nuovo tipo di interceptor, chiamato <emphasis>decoratore</emphasis>, più adatto ad essere utilizzato nella soluzione di problemi legati alla business logic."
#. Tag: para
#: part1.xml:32
@@ -93,12 +90,11 @@
msgid "where should I keep my reference to it when I'm not using it directly?"
msgstr "dove dovrei tenerne il riferimento quando non lo sto usando direttamente?"
-# deployment time?
#. Tag: para
#: part1.xml:57
#, no-c-format
msgid "how can I add an indirection layer, so that the implementation of this object can vary at deployment time?"
-msgstr "come posso aggiungere un livello di indirezione, in modo che l'implementazione di tale oggetto possa variare a deployment time?"
+msgstr "come posso aggiungere un livello di indirezione, in modo che l'implementazione di tale oggetto possa variare deployment time?"
# go about (dovrei comportarmi)???
#. Tag: para
@@ -120,7 +116,7 @@
#: part1.xml:72
#, no-c-format
msgid "Events, interceptors and decorators enhance the <emphasis>loose-coupling</emphasis> that is inherent in this model:"
-msgstr "Eventi, interceptors and decorators potenziano l'<emphasis>accoppiamento debole</emphasis> (loose-coupling) inerente a questo modello:"
+msgstr "Eventi, interceptor e decoratori potenziano l'<emphasis>accoppiamento debole</emphasis> (loose-coupling) inerente a questo modello:"
# notifiche o eventi?
#. Tag: para
@@ -139,14 +135,14 @@
#: part1.xml:85
#, no-c-format
msgid "<emphasis>decorators</emphasis> allow business concerns to be compartmentalized."
-msgstr "i <emphasis>decorator</emphasis> permettono di compartimentare i problemi di business logic."
+msgstr "i <emphasis>decoratori</emphasis> permettono di compartimentare i problemi di business logic."
# loro consumatori di eventi? destinatari è meglio?
#. Tag: para
#: part1.xml:90
#, no-c-format
msgid "Most importantly, Web Beans provides all these facilities in a <emphasis>typesafe</emphasis> way. Web Beans never uses string-based identifiers to determine how collaborating objects fit together. And XML, though it remains an option, is rarely used. Instead, Web Beans uses the typing information that is already available in the Java object model, together with a new pattern, called <emphasis>binding annotations</emphasis>, to wire together Web Beans, their dependencies, their interceptors and decorators and their event consumers."
-msgstr "Soprattutto, Web Beans fornisce tutti questi strumenti in un modo <emphasis>typesafe</emphasis>. Web Beans non usa mai identificatori di tipo stringa per determinare come interagiscono oggetti che collaborano fra di loro. Sebbene resti un'opzione, il linguaggio XML è usato raramente. Invece Web Beans utilizza l'informazione di tipo già presente nel modello a oggetti di Java, insieme ad un nuovo pattern, chiamato <emphasis>binding annotations</emphasis>, per assemblare i Web Beans, le loro dipendenze, i loro interceptor e decorator e i loro consumatori di eventi."
+msgstr "Soprattutto, Web Beans fornisce tutti questi strumenti in un modo <emphasis>typesafe</emphasis>. Web Beans non usa mai identificatori di tipo stringa per determinare come interagiscono oggetti che collaborano fra di loro. Sebbene resti un'opzione, il linguaggio XML è usato raramente. Invece Web Beans utilizza l'informazione di tipo già presente nel modello a oggetti di Java, insieme ad un nuovo pattern, chiamato <emphasis>binding annotations</emphasis>, per assemblare i Web Beans, le loro dipendenze, i loro interceptor e decoratori e i loro consumatori di eventi."
#. Tag: para
#: part1.xml:100
Modified: doc/trunk/reference/it-IT/modules/part2.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part2.po 2008-12-24 18:11:09 UTC (rev 720)
+++ doc/trunk/reference/it-IT/modules/part2.po 2008-12-24 18:34:54 UTC (rev 721)
@@ -6,8 +6,8 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-24 09:48+0100\n"
-"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
+"PO-Revision-Date: 2008-12-24 19:23+0100\n"
+"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,26 +19,24 @@
msgid "The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. We've already seen three means of achieving loose coupling:"
msgstr "Il primo tema saliente di Web Beans è l'<emphasis>accoppiamento debole (loose coupling)</emphasis>. Abbiamo già visto tre modi per realizzarlo:"
-# il polimorfismo a deployment time
#. Tag: para
#: part2.xml:10
#, no-c-format
msgid "<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
msgstr "i <emphasis>tipi di deployment</emphasis> rendono possibile il polimorfismo a deployment time,"
-# producer methods
#. Tag: para
#: part2.xml:14
#, no-c-format
msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
-msgstr "i <emphasis>metodi costruttori (producer methods)</emphasis> rendono possibile il polimorfismo a runtime, e"
+msgstr "i <emphasis>metodi produttori</emphasis> rendono possibile il polimorfismo a runtime, e"
# la gestione del ciclo di vita contestuale o la gestione contestuale del ciclo di vita?
#. Tag: para
#: part2.xml:18
#, no-c-format
msgid "<emphasis>contextual lifecycle management</emphasis> decouples Web Bean lifecycles."
-msgstr "<emphasis>la gestione contestuale del ciclo di vita</emphasis> disaccoppia i cicli di vita dei Web Bean."
+msgstr "<emphasis>la gestione contestuale del ciclo di vita</emphasis> disaccoppia i cicli di vita dei Web Bean."
#. Tag: para
#: part2.xml:23
@@ -51,7 +49,7 @@
#: part2.xml:28
#, no-c-format
msgid "Loose coupling makes a system more <emphasis>dynamic</emphasis>. The system can respond to change in a well-defined manner. In the past, frameworks that attempted to provide the facilities listed above invariably did it by sacrificing type safety. Web Beans is the first technology that achieves this level of loose coupling in a typesafe way."
-msgstr "L'accoppiamento debole (loose coupling) rende un sistema più <emphasis>dinamico</emphasis>. Il sistema può rispondere ai cambiamenti in un modo ben definito. In passato, i frameworks che hanno cercato di fornire le funzionalità e gli strumenti sopraelencati, l'hanno puntualmente fatto a discapito della sicurezza dei tipi (type safety). Web Beans è la prima tecnologia a raggiungere questo livello di puntualmente accoppiamento debole (loose coupling) in modo sicuro rispetto all'uso dei tipi."
+msgstr "L'accoppiamento debole (loose coupling) rende un sistema più <emphasis>dinamico</emphasis>. Il sistema può rispondere ai cambiamenti in un modo ben definito. In passato, i framework che hanno cercato di fornire le funzionalità e gli strumenti sopraelencati, l'hanno puntualmente fatto a discapito della sicurezza dei tipi (type safety). Web Beans è la prima tecnologia a raggiungere questo livello di puntualmente accoppiamento debole (loose coupling) in modo sicuro rispetto all'uso dei tipi."
# sostengono o ampliano o aiutano...
#. Tag: para
@@ -70,9 +68,8 @@
#: part2.xml:43
#, no-c-format
msgid "<emphasis>decorators</emphasis> may be used to decouple some business concerns, and"
-msgstr "i <emphasis>decorator</emphasis> possono essere usati per disaccoppiare alcuni problemi relativi alla business logic, e"
+msgstr "i <emphasis>decoratori</emphasis> possono essere usati per disaccoppiare alcuni problemi relativi alla business logic, e"
-# notifiche degli eventi?
#. Tag: para
#: part2.xml:47
#, no-c-format
Modified: doc/trunk/reference/it-IT/modules/part3.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part3.po 2008-12-24 18:11:09 UTC (rev 720)
+++ doc/trunk/reference/it-IT/modules/part3.po 2008-12-24 18:34:54 UTC (rev 721)
@@ -6,8 +6,8 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-24 10:04+0100\n"
-"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
+"PO-Revision-Date: 2008-12-24 19:30+0100\n"
+"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -93,30 +93,26 @@
msgid "<literal>DocumentUpdatedEvent</literal>."
msgstr "<literal>DocumentUpdatedEvent</literal>."
-# concerns=problemi?
# literate=elegante?
#. Tag: para
#: part3.xml:56
#, no-c-format
msgid "The annotations are reusable. They help describe common qualities of disparate parts of the system. They help us categorize and understand our code. They help us deal with common concerns in a common way. They make our code more literate and more understandable."
-msgstr "Le annotazioni sono riutilizzabili. Aiutano a descrivere caratteristiche comuni di parti diverse del sistema. Ci aiutano a categorizzare e comprendere il nostro stesso codice. Ci aiutano ad affrontare problemi comuni in un modo comune. Rendono il nostro codice più elegante e comprensibile."
+msgstr "Le annotazioni sono riutilizzabili. Aiutano a descrivere caratteristiche comuni di parti diverse del sistema. Ci aiutano a categorizzare e comprendere il nostro stesso codice. Ci aiutano ad affrontare i concern comuni in un modo comune. Rendono il nostro codice più elegante e comprensibile."
-# scope=ambito?
#. Tag: para
#: part3.xml:61
#, no-c-format
msgid "Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A stereotype models a common <emphasis>role</emphasis> in your application architecture. It encapsulates various properties of the role, including scope, interceptor bindings, deployment type, etc, into a single reusable package."
msgstr "Gli <emphasis>stereotipi (stereotypes)</emphasis> di Web Beans fanno fare un ulteriore passo in avanti a questa idea. Uno stereotipo descrive un <emphasis>ruolo</emphasis> comune nell'architettura di un'applicazione. Incapsula in un unico pacchetto riutilizzabile varie proprietà del ruolo stesso, inclusi lo scope, gli interceptor bindings, il tipo di deployment, etc, ."
-# strongly typed?
-# schemi XML?
# literate=elegante (come in altri contesti)? oppure = letterato/informato/cosciente. Qui scelgo informato... nel senso di cosciente di se stesso.
# l'XML=i descrittori XML, il codice XML?
#. Tag: para
#: part3.xml:66
#, no-c-format
msgid "Even Web Beans XML metadata is strongly typed! There's no compiler for XML, so Web Beans takes advantage of XML schemas to validate the Java types and attributes that appear in XML. This approach turns out to make the XML more literate, just like annotations made our Java code more literate."
-msgstr "Persino i metadati XML di Web Beans sono tipizzati (strongly typed)! Non esistendo un compilatore XML, Web Beans si basa sugli schemi XML per validare i tipi Java e gli attributi che compaiono nell'XML. Questo approccio finisce col rendere il codice XML più informato, proprio come le annotazioni rendono il codice Java + informato."
+msgstr "Persino i metadati XML di Web Beans sono fortemente tipizzati (strongly typed)! Non esistendo un compilatore XML, Web Beans si basa sugli schemi XML per validare i tipi Java e gli attributi che compaiono nell'XML. Questo approccio finisce col rendere il codice XML più informato, proprio come le annotazioni rendono il codice Java + informato."
#. Tag: para
#: part3.xml:71
Modified: doc/trunk/reference/it-IT/modules/part4.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part4.po 2008-12-24 18:11:09 UTC (rev 720)
+++ doc/trunk/reference/it-IT/modules/part4.po 2008-12-24 18:34:54 UTC (rev 721)
@@ -6,8 +6,8 @@
"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-24 10:13+0100\n"
-"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
+"PO-Revision-Date: 2008-12-24 19:34+0100\n"
+"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,21 +19,16 @@
msgid "The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans was designed to work in concert with other technologies, helping the application developer fit the other technologies together. Web Beans is an open technology. It forms a part of the Java EE ecosystem, and is itself the foundation for a new ecosystem of portable extensions and integration with existing frameworks and technologies."
msgstr "Il terzo tema di Web Beans è <emphasis>l'integrazione</emphasis>. Web Beans è stata progettata per funzionare in armonia con altre tecnologie, per aiutare lo sviluppatore a far funzionare assieme le altre tecnologie. Web Beans è una tecnologia aperta. Costituisce una parte dell'ecosistema Java EE, ed è essa stessa la fondazione di un nuovo ecosistema di estensioni portabili e di integrazioni con framework e tecnologie esistenti."
-# i motori di gestione dei processi business such as Business Process Management engines?
-# Frameworks Web o Web Frameworks?
# modelli a componenti o architetture a componenti?
#. Tag: para
#: part4.xml:12
#, no-c-format
msgid "We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs to be bound directly to JSF pages. That's just the beginning. Web Beans offers the same potential to diverse other technologies, such as Business Process Management engines, other Web Frameworks, and third-party component models. The Java EE platform will never be able to standardize all the interesting technologies that are used in the world of Java application development, but Web Beans makes it easier to use the technologies which are not yet part of the platform seamlessly within the Java EE environment."
-msgstr "Abbiamo già visto come Web Beans aiuti ad integrare EJB con JSF, permettendo agli EJB di essere legati direttamente alle pagine JSF. Questo non è che l'inizio. Web Beans offre le stesse potenzialità ad altre e diverse tecnologie, quali i motori di gestione di processi business (Business Process Management engines), altri Framework Web, e modelli a componenti di terze parti. La piattaforma Java EE non potrà mai standardizzare tutte le interessanti tecnologie utilizzate nel mondo dello sviluppo di applicazioni Java, ma Web Beans rende più facile usare in modo trasparente all'interno dell'ambiente Java EE tecnologie che non fanno ancora parte di tale ambiente."
+msgstr "Abbiamo già visto come Web Beans aiuti ad integrare EJB con JSF, permettendo agli EJB di essere legati direttamente alle pagine JSF. Questo non è che l'inizio. Web Beans offre le stesse potenzialità ad altre e diverse tecnologie, quali i motori di gestione di processi di business, altri Framework Web, e modelli a componenti di terze parti. La piattaforma Java EE non potrà mai standardizzare tutte le interessanti tecnologie utilizzate nel mondo dello sviluppo di applicazioni Java, ma Web Beans rende più facile usare in modo trasparente all'interno dell'ambiente Java EE tecnologie che non fanno ancora parte di tale ambiente."
-# appieno?
-# SPI: che è?
-# realizzare o supportare?
#. Tag: para
#: part4.xml:21
#, no-c-format
msgid "We're about to see how to take full advantage of the Java EE platform in an application that uses Web Beans. We'll also briefly meet a set of SPIs that are provided to support portable extensions to Web Beans. You might not ever need to use these SPIs directly, but it's nice to know they are there if you need them. Most importantly, you'll take advantage of them indirectly, every time you use a third-party extension."
-msgstr "Stiamo per scoprire come sfruttare appieno la piattaforma Java EE in applicazioni che usano Web Beans. Scorreremo anche velocemente un insieme di SPI fornite per permettere la realizzazione di estensioni portabili di Web Beans. Potrebbe non essere mai necessario usare queste SPI direttamente, ma è opportuno sapere che esistono, qualora possano servire. Soprattutto, le si sfrutterà in modo indiretto ogni volta che si utilizzeranno estensioni di terze parti."
+msgstr "Stiamo per scoprire come sfruttare appieno la piattaforma Java EE in applicazioni che usano Web Beans. Scorreremo anche velocemente un insieme di SPI (Service Provider Interface) fornite per permettere la realizzazione di estensioni portabili di Web Beans. Potrebbe non essere mai necessario usare queste SPI direttamente, ma è opportuno sapere che esistono, qualora possano servire. Soprattutto, le si sfrutterà in modo indiretto ogni volta che si utilizzeranno estensioni di terze parti."
16 years
[webbeans-commits] Webbeans SVN: r720 - doc/trunk/reference/it-IT/modules.
by webbeans-commits@lists.jboss.org
Author: milesif
Date: 2008-12-24 13:11:09 -0500 (Wed, 24 Dec 2008)
New Revision: 720
Modified:
doc/trunk/reference/it-IT/modules/part1.po
doc/trunk/reference/it-IT/modules/part2.po
doc/trunk/reference/it-IT/modules/part3.po
doc/trunk/reference/it-IT/modules/part4.po
Log:
WBRI-69: Italian translation for Web Beans
Modified: doc/trunk/reference/it-IT/modules/part1.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part1.po 2008-12-24 18:01:07 UTC (rev 719)
+++ doc/trunk/reference/it-IT/modules/part1.po 2008-12-24 18:11:09 UTC (rev 720)
@@ -3,227 +3,191 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: master.xml \n"
+"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-19 20:26+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2008-12-24 09:41+0100\n"
+"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+# verificare:
+# 1. sovrappone
+# 2. ciclo di vita (dei componenti)
#. Tag: para
#: part1.xml:5
#, no-c-format
-msgid ""
-"The Web Beans (JSR-299) specification defines a set of services for the Java "
-"EE environment that makes applications much easier to develop. Web Beans "
-"layers an enhanced lifecycle and interaction model over existing Java "
-"component types including JavaBeans and Enterprise Java Beans. As a "
-"complement to the traditional Java EE programming model, the Web Beans "
-"services provide:"
-msgstr ""
+msgid "The Web Beans (JSR-299) specification defines a set of services for the Java EE environment that makes applications much easier to develop. Web Beans layers an enhanced lifecycle and interaction model over existing Java component types including JavaBeans and Enterprise Java Beans. As a complement to the traditional Java EE programming model, the Web Beans services provide:"
+msgstr "La specifica Web Beans (JSR-299) definisce un insieme di servizi per l'ambiente Java EE che rende molto più facile lo sviluppo di applicazioni. Web Beans sovrappone un più ricco modello di interazione e di gestione del ciclo di vita ai tipi di componenti java esistenti, Java Beans and Enterprise Java Beans inclusi. A complemento del tradizionale modello di programmazione Java EE, i servizi Web Beans forniscono:"
#. Tag: para
#: part1.xml:14
#, no-c-format
-msgid ""
-"an improved lifecycle for stateful components, bound to well-defined "
-"<emphasis>contexts</emphasis>,"
-msgstr ""
+msgid "an improved lifecycle for stateful components, bound to well-defined <emphasis>contexts</emphasis>,"
+msgstr "una migliore gestione del ciclo di vita dei componenti stateful, associata a <emphasis>contesti</emphasis> ben definiti"
+# chiedere nicola come ha tradotto dependency injection
#. Tag: para
#: part1.xml:18
#, no-c-format
msgid "a typesafe approach to <emphasis>dependency injection</emphasis>,"
-msgstr ""
+msgstr "un approccio typesafe alla <emphasis>dependency injection</emphasis>,"
+# facility=struttura?
#. Tag: para
#: part1.xml:21
#, no-c-format
-msgid ""
-"interaction via an <emphasis>event notification</emphasis> facility, and"
-msgstr ""
+msgid "interaction via an <emphasis>event notification</emphasis> facility, and"
+msgstr "interazioni basate su una struttura per <emphasis>la notifica degli eventi</emphasis>, e"
+# interceptors?
+# decorator?
#. Tag: para
#: part1.xml:25
#, no-c-format
-msgid ""
-"a better approach to binding <emphasis>interceptors</emphasis> to "
-"components, along with a new kind of interceptor, called a "
-"<emphasis>decorator</emphasis>, that is more appropriate for use in solving "
-"business problems."
-msgstr ""
+msgid "a better approach to binding <emphasis>interceptors</emphasis> to components, along with a new kind of interceptor, called a <emphasis>decorator</emphasis>, that is more appropriate for use in solving business problems."
+msgstr "un migliore approccio nell'associazione degli <emphasis>interceptors</emphasis> ai componenti, unitamente all'introduzione di un nuovo tipo di interceptor, chiamato <emphasis>decorator</emphasis>, più adatto ad essere utilizzato nella soluzione di problemi legati alla business logic."
#. Tag: para
#: part1.xml:32
#, no-c-format
-msgid ""
-"Dependency injection, together with contextual lifecycle management, saves "
-"the user of an unfamiliar API from having to ask and answer the following "
-"questions:"
-msgstr ""
+msgid "Dependency injection, together with contextual lifecycle management, saves the user of an unfamiliar API from having to ask and answer the following questions:"
+msgstr "La dependency injection, insieme alla gestione contestuale del ciclo di vita dei componenti, risparmia a chi utilizza un API con cui non ha familiarità la necessità di dover formulare le risposte relative alle seguenti domande:"
#. Tag: para
#: part1.xml:38
#, no-c-format
msgid "what is the lifecycle of this object?"
-msgstr ""
+msgstr "qual è il ciclo di vita di questo oggetto?"
#. Tag: para
#: part1.xml:41
#, no-c-format
msgid "how many simultaneous clients can it have?"
-msgstr ""
+msgstr "quanti client può simultaneamente avere?"
#. Tag: para
#: part1.xml:44
#, no-c-format
msgid "is it multithreaded?"
-msgstr ""
+msgstr "è multithreaded?"
+# ottenerne/ricavarne
#. Tag: para
#: part1.xml:47
#, no-c-format
msgid "where can I get one from?"
-msgstr ""
+msgstr "da dove posso ottenerne uno?"
#. Tag: para
#: part1.xml:50
#, no-c-format
msgid "do I need to explicitly destroy it?"
-msgstr ""
+msgstr "devo distruggerlo esplicitamente?"
#. Tag: para
#: part1.xml:53
#, no-c-format
msgid "where should I keep my reference to it when I'm not using it directly?"
-msgstr ""
+msgstr "dove dovrei tenerne il riferimento quando non lo sto usando direttamente?"
+# deployment time?
#. Tag: para
#: part1.xml:57
#, no-c-format
-msgid ""
-"how can I add an indirection layer, so that the implementation of this "
-"object can vary at deployment time?"
-msgstr ""
+msgid "how can I add an indirection layer, so that the implementation of this object can vary at deployment time?"
+msgstr "come posso aggiungere un livello di indirezione, in modo che l'implementazione di tale oggetto possa variare a deployment time?"
+# go about (dovrei comportarmi)???
#. Tag: para
#: part1.xml:61
#, no-c-format
msgid "how should I go about sharing this object between other objects?"
-msgstr ""
+msgstr "cosa dovrei fare per condividere questo oggetto con altri oggetti?"
+# implementazione concreta mi pare pleonastico
#. Tag: para
#: part1.xml:65
#, no-c-format
-msgid ""
-"A Web Bean specifies only the type and semantics of other Web Beans it "
-"depends upon. It need not be aware of the actual lifecycle, concrete "
-"implementation, threading model or other clients of any Web Bean it depends "
-"upon. Even better, the concrete implementation, lifecycle and threading "
-"model of a Web Bean it depends upon may vary according to the deployment "
-"scenario, without affecting any client."
-msgstr ""
+msgid "A Web Bean specifies only the type and semantics of other Web Beans it depends upon. It need not be aware of the actual lifecycle, concrete implementation, threading model or other clients of any Web Bean it depends upon. Even better, the concrete implementation, lifecycle and threading model of a Web Bean it depends upon may vary according to the deployment scenario, without affecting any client."
+msgstr "Un Web Bean specifica soltanto il tipo e la semantica degli altri Web Beans da cui dipende. Non ha bisogno di essere a conoscenza del reale ciclo di vita, della implementazione, del modello di threading o degli altri client dei Web Bean da cui dipende. Ancor meglio, l'implementazione, il ciclo di vita e il modello di threading di un Web Bean da cui dipende possono variare a secondo dello scenario di deployment, senza avere effetti su nessun client."
+# <emphasis>loose-coupling</emphasis> è da tradurre?
+# inerente o inerente a?
#. Tag: para
#: part1.xml:72
#, no-c-format
-msgid ""
-"Events, interceptors and decorators enhance the <emphasis>loose-coupling</"
-"emphasis> that is inherent in this model:"
-msgstr ""
+msgid "Events, interceptors and decorators enhance the <emphasis>loose-coupling</emphasis> that is inherent in this model:"
+msgstr "Eventi, interceptors and decorators potenziano l'<emphasis>accoppiamento debole</emphasis> (loose-coupling) inerente a questo modello:"
+# notifiche o eventi?
#. Tag: para
#: part1.xml:77
#, no-c-format
-msgid ""
-"<emphasis>event notifications</emphasis> decouple event producers from event "
-"consumers,"
-msgstr ""
+msgid "<emphasis>event notifications</emphasis> decouple event producers from event consumers,"
+msgstr "le <emphasis>notifiche degli eventi</emphasis> disaccoppiano i produttori di eventi dai consumatori,"
#. Tag: para
#: part1.xml:81
#, no-c-format
-msgid ""
-"<emphasis>interceptors</emphasis> decouple technical concerns from business "
-"logic, and"
-msgstr ""
+msgid "<emphasis>interceptors</emphasis> decouple technical concerns from business logic, and"
+msgstr "gli <emphasis>interceptor</emphasis> disaccoppiano i problemi tecnici dalla business logic, e"
#. Tag: para
#: part1.xml:85
#, no-c-format
-msgid ""
-"<emphasis>decorators</emphasis> allow business concerns to be "
-"compartmentalized."
-msgstr ""
+msgid "<emphasis>decorators</emphasis> allow business concerns to be compartmentalized."
+msgstr "i <emphasis>decorator</emphasis> permettono di compartimentare i problemi di business logic."
+# loro consumatori di eventi? destinatari è meglio?
#. Tag: para
#: part1.xml:90
#, no-c-format
-msgid ""
-"Most importantly, Web Beans provides all these facilities in a "
-"<emphasis>typesafe</emphasis> way. Web Beans never uses string-based "
-"identifiers to determine how collaborating objects fit together. And XML, "
-"though it remains an option, is rarely used. Instead, Web Beans uses the "
-"typing information that is already available in the Java object model, "
-"together with a new pattern, called <emphasis>binding annotations</"
-"emphasis>, to wire together Web Beans, their dependencies, their "
-"interceptors and decorators and their event consumers."
-msgstr ""
+msgid "Most importantly, Web Beans provides all these facilities in a <emphasis>typesafe</emphasis> way. Web Beans never uses string-based identifiers to determine how collaborating objects fit together. And XML, though it remains an option, is rarely used. Instead, Web Beans uses the typing information that is already available in the Java object model, together with a new pattern, called <emphasis>binding annotations</emphasis>, to wire together Web Beans, their dependencies, their interceptors and decorators and their event consumers."
+msgstr "Soprattutto, Web Beans fornisce tutti questi strumenti in un modo <emphasis>typesafe</emphasis>. Web Beans non usa mai identificatori di tipo stringa per determinare come interagiscono oggetti che collaborano fra di loro. Sebbene resti un'opzione, il linguaggio XML è usato raramente. Invece Web Beans utilizza l'informazione di tipo già presente nel modello a oggetti di Java, insieme ad un nuovo pattern, chiamato <emphasis>binding annotations</emphasis>, per assemblare i Web Beans, le loro dipendenze, i loro interceptor e decorator e i loro consumatori di eventi."
#. Tag: para
#: part1.xml:100
#, no-c-format
-msgid ""
-"The Web Beans services are general and apply to the following types of "
-"components that exist in the Java EE environment:"
-msgstr ""
+msgid "The Web Beans services are general and apply to the following types of components that exist in the Java EE environment:"
+msgstr "I servizi di Web Beans sono generali e applicabili ai seguenti tipi di componenti che esistono in ambiente Java EE:"
#. Tag: para
#: part1.xml:105
#, no-c-format
msgid "all JavaBeans,"
-msgstr ""
+msgstr "tutti i JavaBeans,"
#. Tag: para
#: part1.xml:108
#, no-c-format
msgid "all EJBs, and"
-msgstr ""
+msgstr "tutti gli EJB, e"
#. Tag: para
#: part1.xml:111
#, no-c-format
msgid "all Servlets."
-msgstr ""
+msgstr "tutti i Servlets."
#. Tag: para
#: part1.xml:115
#, no-c-format
-msgid ""
-"Web Beans even provides the necessary integration points so that other kinds "
-"of components defined by future Java EE specifications or by non-standard "
-"frameworks may be cleanly integrated with Web Beans, take advantage of the "
-"Web Beans services, and interact with any other kind of Web Bean."
-msgstr ""
+msgid "Web Beans even provides the necessary integration points so that other kinds of components defined by future Java EE specifications or by non-standard frameworks may be cleanly integrated with Web Beans, take advantage of the Web Beans services, and interact with any other kind of Web Bean."
+msgstr "Web Beans fornisce anche i necessari punti di integrazione in modo che altri tipi di componenti definiti da future specifiche Java EE o da framework non standard possano essere integrati in modo trasparente con Web Beans, avvantaggiarsi dei suoi servizi, e interagire con qualunque altro tipo di Web Bean."
#. Tag: para
#: part1.xml:120
#, no-c-format
-msgid ""
-"Web Beans was influenced by a number of existing Java frameworks, including "
-"Seam, Guice and Spring. However, Web Beans has its own very distinct "
-"character: more typesafe than Seam, more stateful and less XML-centric than "
-"Spring, more web and enterprise-application capable than Guice."
-msgstr ""
+msgid "Web Beans was influenced by a number of existing Java frameworks, including Seam, Guice and Spring. However, Web Beans has its own very distinct character: more typesafe than Seam, more stateful and less XML-centric than Spring, more web and enterprise-application capable than Guice."
+msgstr "Web Beans è stata influenzata da un buon numero di framework Java esistenti, inclusi Seam, Guice and Spring. Comunque, Web Beans ha un proprio chiaro carattere distintivo: è più sicuro nell'uso dei tipi (typesafe) di Seam, è più orientato allo stato (stateful) e meno basato su XML di Spring, e si sposa meglio alle applicazioni web ed enterprise di Guice."
+# dove EJB Lite sia disponibile in modo embeddable
#. Tag: para
#: part1.xml:125
#, no-c-format
-msgid ""
-"Most importantly, Web Beans is a JCP standard that integrates cleanly with "
-"Java EE, and with any Java SE environment where embeddable EJB Lite is "
-"available."
-msgstr ""
+msgid "Most importantly, Web Beans is a JCP standard that integrates cleanly with Java EE, and with any Java SE environment where embeddable EJB Lite is available."
+msgstr "Soprattutto, Web Beans è uno standard JCP che si integra in modo trasparente con Java EE, e con qualunque ambiente Java SE dove EJB Lite sia disponibile in modo embeddable."
+
Modified: doc/trunk/reference/it-IT/modules/part2.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part2.po 2008-12-24 18:01:07 UTC (rev 719)
+++ doc/trunk/reference/it-IT/modules/part2.po 2008-12-24 18:11:09 UTC (rev 720)
@@ -3,11 +3,11 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: master.xml \n"
+"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-19 20:26+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2008-12-24 09:48+0100\n"
+"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -16,87 +16,72 @@
#. Tag: para
#: part2.xml:5
#, no-c-format
-msgid ""
-"The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. "
-"We've already seen three means of achieving loose coupling:"
-msgstr ""
+msgid "The first major theme of Web Beans is <emphasis>loose coupling</emphasis>. We've already seen three means of achieving loose coupling:"
+msgstr "Il primo tema saliente di Web Beans è l'<emphasis>accoppiamento debole (loose coupling)</emphasis>. Abbiamo già visto tre modi per realizzarlo:"
+# il polimorfismo a deployment time
#. Tag: para
#: part2.xml:10
#, no-c-format
-msgid ""
-"<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
-msgstr ""
+msgid "<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
+msgstr "i <emphasis>tipi di deployment</emphasis> rendono possibile il polimorfismo a deployment time,"
+# producer methods
#. Tag: para
#: part2.xml:14
#, no-c-format
msgid "<emphasis>producer methods</emphasis> enable runtime polymorphism, and"
-msgstr ""
+msgstr "i <emphasis>metodi costruttori (producer methods)</emphasis> rendono possibile il polimorfismo a runtime, e"
+# la gestione del ciclo di vita contestuale o la gestione contestuale del ciclo di vita?
#. Tag: para
#: part2.xml:18
#, no-c-format
-msgid ""
-"<emphasis>contextual lifecycle management</emphasis> decouples Web Bean "
-"lifecycles."
-msgstr ""
+msgid "<emphasis>contextual lifecycle management</emphasis> decouples Web Bean lifecycles."
+msgstr "<emphasis>la gestione contestuale del ciclo di vita</emphasis> disaccoppia i cicli di vita dei Web Bean."
#. Tag: para
#: part2.xml:23
#, no-c-format
-msgid ""
-"These techniques serve to enable loose coupling of client and server. The "
-"client is no longer tightly bound to an implementation of an API, nor is it "
-"required to manage the lifecycle of the server object. This approach lets "
-"<emphasis>stateful objects interact as if they were services</emphasis>."
-msgstr ""
+msgid "These techniques serve to enable loose coupling of client and server. The client is no longer tightly bound to an implementation of an API, nor is it required to manage the lifecycle of the server object. This approach lets <emphasis>stateful objects interact as if they were services</emphasis>."
+msgstr "Queste tecniche servono a realizzare l'accoppiamento debole (loose coupling) di client e server. Il client non è più strettamente legato all'implementazione di una API, né è tenuto a gestire il ciclo di vita dell'oggetto server. Questo approccio permette <emphasis>agli oggetti stateful di interagire come se fossero servizi</emphasis>."
+# le funzionalità e gli strumenti sopraelencati
#. Tag: para
#: part2.xml:28
#, no-c-format
-msgid ""
-"Loose coupling makes a system more <emphasis>dynamic</emphasis>. The system "
-"can respond to change in a well-defined manner. In the past, frameworks that "
-"attempted to provide the facilities listed above invariably did it by "
-"sacrificing type safety. Web Beans is the first technology that achieves "
-"this level of loose coupling in a typesafe way."
-msgstr ""
+msgid "Loose coupling makes a system more <emphasis>dynamic</emphasis>. The system can respond to change in a well-defined manner. In the past, frameworks that attempted to provide the facilities listed above invariably did it by sacrificing type safety. Web Beans is the first technology that achieves this level of loose coupling in a typesafe way."
+msgstr "L'accoppiamento debole (loose coupling) rende un sistema più <emphasis>dinamico</emphasis>. Il sistema può rispondere ai cambiamenti in un modo ben definito. In passato, i frameworks che hanno cercato di fornire le funzionalità e gli strumenti sopraelencati, l'hanno puntualmente fatto a discapito della sicurezza dei tipi (type safety). Web Beans è la prima tecnologia a raggiungere questo livello di puntualmente accoppiamento debole (loose coupling) in modo sicuro rispetto all'uso dei tipi."
+# sostengono o ampliano o aiutano...
#. Tag: para
#: part2.xml:34
#, no-c-format
-msgid ""
-"Web Beans provides three extra important facilities that further the goal of "
-"loose coupling:"
-msgstr ""
+msgid "Web Beans provides three extra important facilities that further the goal of loose coupling:"
+msgstr "Web Beans fornisce tre strumenti extra importanti che ampliano l'obiettivo del loose coupling:"
#. Tag: para
#: part2.xml:39
#, no-c-format
-msgid ""
-"<emphasis>interceptors</emphasis> decouple technical concerns from business "
-"logic,"
-msgstr ""
+msgid "<emphasis>interceptors</emphasis> decouple technical concerns from business logic,"
+msgstr "gli <emphasis>interceptor</emphasis> disaccoppiano i problemi tecnici dalla business logic,"
#. Tag: para
#: part2.xml:43
#, no-c-format
-msgid ""
-"<emphasis>decorators</emphasis> may be used to decouple some business "
-"concerns, and"
-msgstr ""
+msgid "<emphasis>decorators</emphasis> may be used to decouple some business concerns, and"
+msgstr "i <emphasis>decorator</emphasis> possono essere usati per disaccoppiare alcuni problemi relativi alla business logic, e"
+# notifiche degli eventi?
#. Tag: para
#: part2.xml:47
#, no-c-format
-msgid ""
-"<emphasis>event notifications</emphasis> decouple event producers from event "
-"consumers."
-msgstr ""
+msgid "<emphasis>event notifications</emphasis> decouple event producers from event consumers."
+msgstr "le <emphasis>notifiche degli eventi</emphasis> disaccoppiano i produttori di eventi dai consumatori."
#. Tag: para
#: part2.xml:52
#, no-c-format
msgid "Let's explore interceptors first."
-msgstr ""
+msgstr "Innanzitutto esploriamo gli interceptor."
+
Modified: doc/trunk/reference/it-IT/modules/part3.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part3.po 2008-12-24 18:01:07 UTC (rev 719)
+++ doc/trunk/reference/it-IT/modules/part3.po 2008-12-24 18:11:09 UTC (rev 720)
@@ -3,148 +3,124 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: master.xml \n"
+"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-19 20:26+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2008-12-24 10:04+0100\n"
+"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+# strong typing?
#. Tag: para
#: part3.xml:5
#, no-c-format
-msgid ""
-"The second major theme of Web Beans is <emphasis>strong typing</emphasis>. "
-"The information about the dependencies, interceptors and decorators of a Web "
-"Bean, and the information about event consumers for an event producer, is "
-"contained in typesafe Java constructs that may be validated by the compiler."
-msgstr ""
+msgid "The second major theme of Web Beans is <emphasis>strong typing</emphasis>. The information about the dependencies, interceptors and decorators of a Web Bean, and the information about event consumers for an event producer, is contained in typesafe Java constructs that may be validated by the compiler."
+msgstr "Il secondo tema saliente di Web Beans è lo <emphasis>tipizzazione forte (strong typing)</emphasis>. Le informazioni riguardanti dipendenze, interceptor e decorator di un Web Bean, e le informazioni sui i consumatori relativi ad un produttore di eventi, sono contenute in costrutti Java sicuri rispetto ai tipi (typesafe) che possono essere validati dal compilatore."
#. Tag: para
#: part3.xml:10
#, no-c-format
-msgid ""
-"You don't see string-based identifiers in Web Beans code, not because the "
-"framework is hiding them from you using clever defaulting rules—so-"
-"called \"configuration by convention\"—but because there are simply no "
-"strings there to begin with!"
-msgstr ""
+msgid "You don't see string-based identifiers in Web Beans code, not because the framework is hiding them from you using clever defaulting rules—so-called \"configuration by convention\"—but because there are simply no strings there to begin with!"
+msgstr "Non si vedono identificatori di tipo stringa nel codice basato su Web Beans, non perché il framework li nasconde usando regole intelligenti nell'assegnamento dei valori di default—la cosiddetta \"configurazione per convenzione (configuration by convention)\"—ma semplicemente perché non ci sono stringhe, tanto per cominciare!"
+# senza che sia necessario realizzare dei tools appositi
#. Tag: para
#: part3.xml:15
#, no-c-format
-msgid ""
-"The obvious benefit of this approach is that <emphasis>any</emphasis> IDE "
-"can provide autocompletion, validation and refactoring without the need for "
-"special tooling. But there is a second, less-immediately-obvious, benefit. "
-"It turns out that when you start thinking of identifying objects, events or "
-"interceptors via annotations instead of names, you have an opportunity to "
-"lift the semantic level of your code."
-msgstr ""
+msgid "The obvious benefit of this approach is that <emphasis>any</emphasis> IDE can provide autocompletion, validation and refactoring without the need for special tooling. But there is a second, less-immediately-obvious, benefit. It turns out that when you start thinking of identifying objects, events or interceptors via annotations instead of names, you have an opportunity to lift the semantic level of your code."
+msgstr "L'ovvio beneficio di questo approccio è che <emphasis>qualunque</emphasis> IDE può fornire autocompletamento, validazione e refactoring senza che sia necessario realizzare dei tools appositi. Ma c'è un secondo beneficio meno immediatamente ovvio. Si scopre che quando si incomincia a pensare di identificare oggetti, eventi o interceptor usando annotazioni invece di nomi, si ha l'opportunità di elevare il livello semantico del proprio codice."
#. Tag: para
#: part3.xml:21
#, no-c-format
-msgid ""
-"Web Beans encourages you develop annotations that model concepts, for "
-"example,"
-msgstr ""
+msgid "Web Beans encourages you develop annotations that model concepts, for example,"
+msgstr "Web Beans incoraggia a sviluppare annotazioni che modellano concetti, per esempio,"
#. Tag: para
#: part3.xml:26
#, no-c-format
msgid "<literal>@Asynchronous</literal>,"
-msgstr ""
+msgstr "<literal>@Asynchronous</literal>,"
#. Tag: para
#: part3.xml:29
#, no-c-format
msgid "<literal>@Mock</literal>,"
-msgstr ""
+msgstr "<literal>@Mock</literal>,"
#. Tag: para
#: part3.xml:32
#, no-c-format
msgid "<literal>@Secure</literal> or"
-msgstr ""
+msgstr "<literal>@Secure</literal> or"
#. Tag: para
#: part3.xml:35
#, no-c-format
msgid "<literal>@Updated</literal>,"
-msgstr ""
+msgstr "<literal>@Secure</literal> or"
#. Tag: para
#: part3.xml:39
#, no-c-format
msgid "instead of using compound names like"
-msgstr ""
+msgstr "invece di usare nomi composti come"
#. Tag: para
#: part3.xml:43
#, no-c-format
msgid "<literal>asyncPaymentProcessor</literal>,"
-msgstr ""
+msgstr "<literal>asyncPaymentProcessor</literal>,"
#. Tag: para
#: part3.xml:46
#, no-c-format
msgid "<literal>mockPaymentProcessor</literal>,"
-msgstr ""
+msgstr "<literal>mockPaymentProcessor</literal>,"
#. Tag: para
#: part3.xml:49
#, no-c-format
msgid "<literal>SecurityInterceptor</literal> or"
-msgstr ""
+msgstr "<literal>SecurityInterceptor</literal> or"
#. Tag: para
#: part3.xml:52
#, no-c-format
msgid "<literal>DocumentUpdatedEvent</literal>."
-msgstr ""
+msgstr "<literal>DocumentUpdatedEvent</literal>."
+# concerns=problemi?
+# literate=elegante?
#. Tag: para
#: part3.xml:56
#, no-c-format
-msgid ""
-"The annotations are reusable. They help describe common qualities of "
-"disparate parts of the system. They help us categorize and understand our "
-"code. They help us deal with common concerns in a common way. They make our "
-"code more literate and more understandable."
-msgstr ""
+msgid "The annotations are reusable. They help describe common qualities of disparate parts of the system. They help us categorize and understand our code. They help us deal with common concerns in a common way. They make our code more literate and more understandable."
+msgstr "Le annotazioni sono riutilizzabili. Aiutano a descrivere caratteristiche comuni di parti diverse del sistema. Ci aiutano a categorizzare e comprendere il nostro stesso codice. Ci aiutano ad affrontare problemi comuni in un modo comune. Rendono il nostro codice più elegante e comprensibile."
+# scope=ambito?
#. Tag: para
#: part3.xml:61
#, no-c-format
-msgid ""
-"Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A "
-"stereotype models a common <emphasis>role</emphasis> in your application "
-"architecture. It encapsulates various properties of the role, including "
-"scope, interceptor bindings, deployment type, etc, into a single reusable "
-"package."
-msgstr ""
+msgid "Web Beans <emphasis>stereotypes</emphasis> take this idea a step further. A stereotype models a common <emphasis>role</emphasis> in your application architecture. It encapsulates various properties of the role, including scope, interceptor bindings, deployment type, etc, into a single reusable package."
+msgstr "Gli <emphasis>stereotipi (stereotypes)</emphasis> di Web Beans fanno fare un ulteriore passo in avanti a questa idea. Uno stereotipo descrive un <emphasis>ruolo</emphasis> comune nell'architettura di un'applicazione. Incapsula in un unico pacchetto riutilizzabile varie proprietà del ruolo stesso, inclusi lo scope, gli interceptor bindings, il tipo di deployment, etc, ."
+# strongly typed?
+# schemi XML?
+# literate=elegante (come in altri contesti)? oppure = letterato/informato/cosciente. Qui scelgo informato... nel senso di cosciente di se stesso.
+# l'XML=i descrittori XML, il codice XML?
#. Tag: para
#: part3.xml:66
#, no-c-format
-msgid ""
-"Even Web Beans XML metadata is strongly typed! There's no compiler for XML, "
-"so Web Beans takes advantage of XML schemas to validate the Java types and "
-"attributes that appear in XML. This approach turns out to make the XML more "
-"literate, just like annotations made our Java code more literate."
-msgstr ""
+msgid "Even Web Beans XML metadata is strongly typed! There's no compiler for XML, so Web Beans takes advantage of XML schemas to validate the Java types and attributes that appear in XML. This approach turns out to make the XML more literate, just like annotations made our Java code more literate."
+msgstr "Persino i metadati XML di Web Beans sono tipizzati (strongly typed)! Non esistendo un compilatore XML, Web Beans si basa sugli schemi XML per validare i tipi Java e gli attributi che compaiono nell'XML. Questo approccio finisce col rendere il codice XML più informato, proprio come le annotazioni rendono il codice Java + informato."
#. Tag: para
#: part3.xml:71
#, no-c-format
-msgid ""
-"We're now ready to meet some more advanced features of Web Beans. Bear in "
-"mind that these features exist to make our code both easier to validate and "
-"more understandable. Most of the time you don't ever really <emphasis>need</"
-"emphasis> to use these features, but if you use them wisely, you'll come to "
-"appreciate their power."
-msgstr ""
+msgid "We're now ready to meet some more advanced features of Web Beans. Bear in mind that these features exist to make our code both easier to validate and more understandable. Most of the time you don't ever really <emphasis>need</emphasis> to use these features, but if you use them wisely, you'll come to appreciate their power."
+msgstr "Ora siamo pronti ad incontrare alcune caratteristiche più avanzate di Web Beans. Tenete a mente che tali caratteristiche esistono sia per rendere il nostro codice più facile da validare che per renderlo più comprensibile. La maggior parte delle volte non è necessario usare tali carattestiche, ma, se usate con accortezza, si arriverà ad apprezzerne l'efficacia."
+
Modified: doc/trunk/reference/it-IT/modules/part4.po
===================================================================
--- doc/trunk/reference/it-IT/modules/part4.po 2008-12-24 18:01:07 UTC (rev 719)
+++ doc/trunk/reference/it-IT/modules/part4.po 2008-12-24 18:11:09 UTC (rev 720)
@@ -3,11 +3,11 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: master.xml \n"
+"Project-Id-Version: master.xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2008-12-19 20:26+0000\n"
-"PO-Revision-Date: 2008-12-19 20:26+0000\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2008-12-24 10:13+0100\n"
+"Last-Translator: Francesco Milesi <milesif(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -16,37 +16,24 @@
#. Tag: para
#: part4.xml:5
#, no-c-format
-msgid ""
-"The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans "
-"was designed to work in concert with other technologies, helping the "
-"application developer fit the other technologies together. Web Beans is an "
-"open technology. It forms a part of the Java EE ecosystem, and is itself the "
-"foundation for a new ecosystem of portable extensions and integration with "
-"existing frameworks and technologies."
-msgstr ""
+msgid "The third theme of Web Beans is <emphasis>integration</emphasis>. Web Beans was designed to work in concert with other technologies, helping the application developer fit the other technologies together. Web Beans is an open technology. It forms a part of the Java EE ecosystem, and is itself the foundation for a new ecosystem of portable extensions and integration with existing frameworks and technologies."
+msgstr "Il terzo tema di Web Beans è <emphasis>l'integrazione</emphasis>. Web Beans è stata progettata per funzionare in armonia con altre tecnologie, per aiutare lo sviluppatore a far funzionare assieme le altre tecnologie. Web Beans è una tecnologia aperta. Costituisce una parte dell'ecosistema Java EE, ed è essa stessa la fondazione di un nuovo ecosistema di estensioni portabili e di integrazioni con framework e tecnologie esistenti."
+# i motori di gestione dei processi business such as Business Process Management engines?
+# Frameworks Web o Web Frameworks?
+# modelli a componenti o architetture a componenti?
#. Tag: para
#: part4.xml:12
#, no-c-format
-msgid ""
-"We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs "
-"to be bound directly to JSF pages. That's just the beginning. Web Beans "
-"offers the same potential to diverse other technologies, such as Business "
-"Process Management engines, other Web Frameworks, and third-party component "
-"models. The Java EE platform will never be able to standardize all the "
-"interesting technologies that are used in the world of Java application "
-"development, but Web Beans makes it easier to use the technologies which are "
-"not yet part of the platform seamlessly within the Java EE environment."
-msgstr ""
+msgid "We've already seen how Web Beans helps integrate EJB and JSF, allowing EJBs to be bound directly to JSF pages. That's just the beginning. Web Beans offers the same potential to diverse other technologies, such as Business Process Management engines, other Web Frameworks, and third-party component models. The Java EE platform will never be able to standardize all the interesting technologies that are used in the world of Java application development, but Web Beans makes it easier to use the technologies which are not yet part of the platform seamlessly within the Java EE environment."
+msgstr "Abbiamo già visto come Web Beans aiuti ad integrare EJB con JSF, permettendo agli EJB di essere legati direttamente alle pagine JSF. Questo non è che l'inizio. Web Beans offre le stesse potenzialità ad altre e diverse tecnologie, quali i motori di gestione di processi business (Business Process Management engines), altri Framework Web, e modelli a componenti di terze parti. La piattaforma Java EE non potrà mai standardizzare tutte le interessanti tecnologie utilizzate nel mondo dello sviluppo di applicazioni Java, ma Web Beans rende più facile usare in modo trasparente all'interno dell'ambiente Java EE tecnologie che non fanno ancora parte di tale ambiente."
+# appieno?
+# SPI: che è?
+# realizzare o supportare?
#. Tag: para
#: part4.xml:21
#, no-c-format
-msgid ""
-"We're about to see how to take full advantage of the Java EE platform in an "
-"application that uses Web Beans. We'll also briefly meet a set of SPIs that "
-"are provided to support portable extensions to Web Beans. You might not ever "
-"need to use these SPIs directly, but it's nice to know they are there if you "
-"need them. Most importantly, you'll take advantage of them indirectly, every "
-"time you use a third-party extension."
-msgstr ""
+msgid "We're about to see how to take full advantage of the Java EE platform in an application that uses Web Beans. We'll also briefly meet a set of SPIs that are provided to support portable extensions to Web Beans. You might not ever need to use these SPIs directly, but it's nice to know they are there if you need them. Most importantly, you'll take advantage of them indirectly, every time you use a third-party extension."
+msgstr "Stiamo per scoprire come sfruttare appieno la piattaforma Java EE in applicazioni che usano Web Beans. Scorreremo anche velocemente un insieme di SPI fornite per permettere la realizzazione di estensioni portabili di Web Beans. Potrebbe non essere mai necessario usare queste SPI direttamente, ma è opportuno sapere che esistono, qualora possano servire. Soprattutto, le si sfrutterà in modo indiretto ogni volta che si utilizzeranno estensioni di terze parti."
+
16 years
[webbeans-commits] Webbeans SVN: r719 - doc/trunk/reference.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-24 13:01:07 -0500 (Wed, 24 Dec 2008)
New Revision: 719
Modified:
doc/trunk/reference/pom.xml
Log:
Add chinese to translation build
Modified: doc/trunk/reference/pom.xml
===================================================================
--- doc/trunk/reference/pom.xml 2008-12-24 17:56:59 UTC (rev 718)
+++ doc/trunk/reference/pom.xml 2008-12-24 18:01:07 UTC (rev 719)
@@ -66,6 +66,7 @@
<masterTranslation>en</masterTranslation>
<translations>
<translation>it-IT</translation>
+ <translation>zh-ZH</translation>
</translations>
<imageResource>
<directory>${pom.basedir}/en</directory>
16 years
[webbeans-commits] Webbeans SVN: r717 - ri/trunk/dist.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-12-24 12:51:42 -0500 (Wed, 24 Dec 2008)
New Revision: 717
Modified:
ri/trunk/dist/build.xml
Log:
oops
Modified: ri/trunk/dist/build.xml
===================================================================
--- ri/trunk/dist/build.xml 2008-12-24 17:44:08 UTC (rev 716)
+++ ri/trunk/dist/build.xml 2008-12-24 17:51:42 UTC (rev 717)
@@ -64,9 +64,8 @@
<fileset dir="${examples.dir}" />
</copy>
- <maven target="package" basedir="${refdoc.dir}">
- <arg line="-Dbuild.translations" />
- </maven>
+ <maven target="compile" basedir="${refdoc.dir}" />
+
<mkdir dir="${dist.doc.dir}" />
<copy todir="${dist.doc.dir}">
<fileset dir="${refdoc.dir}/target/docbook/publish" />
16 years