[webbeans-commits] Webbeans SVN: r1784 - in examples/trunk/conversations: src/main/java/org/jboss/webbeans/examples/conversations and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: nickarls
Date: 2009-03-06 05:44:07 -0500 (Fri, 06 Mar 2009)
New Revision: 1784
Added:
examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Data.java
Modified:
examples/trunk/conversations/WebContent/home.xhtml
examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
Log:
new stuff broken in completely fresh and improved ways.
Modified: examples/trunk/conversations/WebContent/home.xhtml
===================================================================
--- examples/trunk/conversations/WebContent/home.xhtml 2009-03-06 10:23:40 UTC (rev 1783)
+++ examples/trunk/conversations/WebContent/home.xhtml 2009-03-06 10:44:07 UTC (rev 1784)
@@ -8,6 +8,7 @@
<ui:define name="content">
<h:form>
<h:panelGrid columns="1">
+ <h:inputText value="#{data.data}" />
<h:outputText value="Long-running: #{conversations.conversationList}"/>
<h:outputText value="Current: #{conversation}"/>
<h:panelGroup>
@@ -15,7 +16,7 @@
<h:commandButton action="#{conversations.noop}" value="noop"/>
<h:commandButton action="#{conversation.end}" value="end"/>
<h:commandButton action="#{conversations.abandon}" value="abandon"/>
- <h:commandButton action="#{conversations.longop}" value="longop"/>
+ <h:commandButton action="#{data.longop}" value="longop"/>
</h:panelGroup>
<h:inputText value="#{conversations.cid}"/>
<h:commandButton action="#{conversations.switchConversation}" value="switch"/>
Modified: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-06 10:23:40 UTC (rev 1783)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-06 10:44:07 UTC (rev 1784)
@@ -63,17 +63,6 @@
return longRunningConversations;
}
- public void longop() {
- try
- {
- Thread.sleep(5000);
- }
- catch (InterruptedException e)
- {
- // non-issue
- }
- }
-
public void switchConversation()
{
conversation.begin(cid);
Added: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Data.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Data.java (rev 0)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Data.java 2009-03-06 10:44:07 UTC (rev 1784)
@@ -0,0 +1,50 @@
+package org.jboss.webbeans.examples.conversations;
+
+import javax.context.ConversationScoped;
+import javax.annotation.Named;
+import javax.annotation.PreDestroy;
+
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
+
+import java.io.Serializable;
+
+@ConversationScoped
+@Named
+public class Data implements Serializable
+{
+ private static LogProvider log = Logging.getLogProvider(Data.class);
+ private String data;
+
+ public Data()
+ {
+ }
+
+ public String getData()
+ {
+ return data;
+ }
+
+ public void setData(String data)
+ {
+ this.data = data;
+ }
+
+ public void longop() {
+ try
+ {
+ Thread.sleep(5000);
+ }
+ catch (InterruptedException e)
+ {
+ // non-issue
+ }
+ }
+
+ @PreDestroy
+ public void bye()
+ {
+ log.info("Data " + data + " destroyed");
+ }
+
+}
\ No newline at end of file
15 years, 9 months
[webbeans-commits] Webbeans SVN: r1783 - in examples/trunk/conversations: src/main/java/org/jboss/webbeans/examples/conversations and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: nickarls
Date: 2009-03-06 05:23:40 -0500 (Fri, 06 Mar 2009)
New Revision: 1783
Modified:
examples/trunk/conversations/WebContent/home.xhtml
examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
Log:
Broken long-op testing
Modified: examples/trunk/conversations/WebContent/home.xhtml
===================================================================
--- examples/trunk/conversations/WebContent/home.xhtml 2009-03-06 09:04:54 UTC (rev 1782)
+++ examples/trunk/conversations/WebContent/home.xhtml 2009-03-06 10:23:40 UTC (rev 1783)
@@ -15,6 +15,7 @@
<h:commandButton action="#{conversations.noop}" value="noop"/>
<h:commandButton action="#{conversation.end}" value="end"/>
<h:commandButton action="#{conversations.abandon}" value="abandon"/>
+ <h:commandButton action="#{conversations.longop}" value="longop"/>
</h:panelGroup>
<h:inputText value="#{conversations.cid}"/>
<h:commandButton action="#{conversations.switchConversation}" value="switch"/>
Modified: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-06 09:04:54 UTC (rev 1782)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-06 10:23:40 UTC (rev 1783)
@@ -45,8 +45,7 @@
}
public void noop()
- {
-
+ {
}
public Iterable<Conversation> getConversationList()
@@ -64,6 +63,17 @@
return longRunningConversations;
}
+ public void longop() {
+ try
+ {
+ Thread.sleep(5000);
+ }
+ catch (InterruptedException e)
+ {
+ // non-issue
+ }
+ }
+
public void switchConversation()
{
conversation.begin(cid);
15 years, 9 months
[webbeans-commits] Webbeans SVN: r1782 - in examples/trunk/conversations: src/main/java/org/jboss/webbeans/examples/conversations and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: nickarls
Date: 2009-03-06 04:04:54 -0500 (Fri, 06 Mar 2009)
New Revision: 1782
Added:
examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java
Modified:
examples/trunk/conversations/WebContent/WEB-INF/beans.xml
examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
Log:
minor. short conversation timeout for example
Modified: examples/trunk/conversations/WebContent/WEB-INF/beans.xml
===================================================================
--- examples/trunk/conversations/WebContent/WEB-INF/beans.xml 2009-03-06 08:37:50 UTC (rev 1781)
+++ examples/trunk/conversations/WebContent/WEB-INF/beans.xml 2009-03-06 09:04:54 UTC (rev 1782)
@@ -0,0 +1,7 @@
+<Beans xmlns="urn:java:ee" xmlns:conversations="urn:java:org.jboss.webbeans.examples.conversations">
+ <Deploy>
+ <Standard />
+ <Production />
+ <conversations:Example />
+ </Deploy>
+</Beans>
\ No newline at end of file
Modified: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-06 08:37:50 UTC (rev 1781)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Conversations.java 2009-03-06 09:04:54 UTC (rev 1782)
@@ -12,10 +12,12 @@
import java.io.Serializable;
+import org.jboss.webbeans.WebBean;
import org.jboss.webbeans.conversation.ConversationIdGenerator;
import org.jboss.webbeans.conversation.ConversationManager;
import org.jboss.webbeans.conversation.bindings.ConversationInactivityTimeout;
+
@SessionScoped
@Named("conversations")
public class Conversations implements Serializable {
@@ -29,6 +31,14 @@
{
}
+ @Produces
+ @ConversationInactivityTimeout
+ @Example
+ public static long getConversationTimeoutInMilliseconds()
+ {
+ return 10000;
+ }
+
public void abandon()
{
conversation.begin(id.nextId());
Added: examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java
===================================================================
--- examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java (rev 0)
+++ examples/trunk/conversations/src/main/java/org/jboss/webbeans/examples/conversations/Example.java 2009-03-06 09:04:54 UTC (rev 1782)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.examples.conversations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.DeploymentType;
+
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+public @interface Example
+{
+}
\ No newline at end of file
15 years, 9 months
[webbeans-commits] Webbeans SVN: r1781 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation.
by webbeans-commits@lists.jboss.org
Author: nickarls
Date: 2009-03-06 03:37:50 -0500 (Fri, 06 Mar 2009)
New Revision: 1781
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java
Log:
minor. some exit-early for conversation handling when there is nothing to do.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java 2009-03-06 06:56:33 UTC (rev 1780)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ConversationEntry.java 2009-03-06 08:37:50 UTC (rev 1781)
@@ -77,6 +77,10 @@
*/
public boolean cancelTermination()
{
+ if (terminationHandle.isCancelled())
+ {
+ return true;
+ }
boolean success = terminationHandle.cancel(false);
if (success)
{
@@ -135,6 +139,10 @@
*/
public boolean unlock()
{
+ if (!concurrencyLock.isLocked())
+ {
+ return true;
+ }
if (concurrencyLock.isHeldByCurrentThread())
{
concurrencyLock.unlock();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java 2009-03-06 06:56:33 UTC (rev 1780)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/conversation/ServletConversationManager.java 2009-03-06 08:37:50 UTC (rev 1781)
@@ -172,10 +172,10 @@
// canceled in the
// beginConversation) or the case where we have a completely new
// long-running conversation.
- if (longRunningConversations.containsKey(currentConversation.getId()))
+ if (longRunningConversations.containsKey(cid))
{
- longRunningConversations.get(currentConversation.getId()).unlock();
- longRunningConversations.get(currentConversation.getId()).reScheduleTermination(terminationHandle);
+ longRunningConversations.get(cid).unlock();
+ longRunningConversations.get(cid).reScheduleTermination(terminationHandle);
}
else
{
15 years, 9 months
[webbeans-commits] Webbeans SVN: r1780 - doc/trunk/reference/de-DE.
by webbeans-commits@lists.jboss.org
Author: jdimanos
Date: 2009-03-06 01:56:33 -0500 (Fri, 06 Mar 2009)
New Revision: 1780
Modified:
doc/trunk/reference/de-DE/xml.po
Log:
update
Modified: doc/trunk/reference/de-DE/xml.po
===================================================================
--- doc/trunk/reference/de-DE/xml.po 2009-03-06 05:50:27 UTC (rev 1779)
+++ doc/trunk/reference/de-DE/xml.po 2009-03-06 06:56:33 UTC (rev 1780)
@@ -7,7 +7,7 @@
"Project-Id-Version: xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-10 14:18+0000\n"
-"PO-Revision-Date: 2009-01-24 15:41+1100\n"
+"PO-Revision-Date: 2009-03-06 17:56+1100\n"
"Last-Translator: \n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -19,7 +19,7 @@
#: xml.xml:4
#, no-c-format
msgid "Defining Web Beans using XML"
-msgstr ""
+msgstr "Definition von Web Beans unter Verwendung von XML"
#. Tag: para
#: xml.xml:6
@@ -28,37 +28,37 @@
"So far, we've seen plenty of examples of Web Beans declared using "
"annotations. However, there are a couple of occasions when we can't use "
"annotations to define the Web Bean:"
-msgstr ""
+msgstr "Bis jetzt haben wir viele Beispiele von unter Verwendung von Annotationen deklarierten Web Beans gesehen. Es gibt jedoch ein paar Fälle, in denen keine Annotationen zur Definition des Web Beans verwendet werden können:"
#. Tag: para
#: xml.xml:12
#, no-c-format
msgid "when the implementation class comes from some preexisting library, or"
-msgstr ""
+msgstr "Wenn die Implementierungsklasse von einer bereits bestehenden Bibliothek stammt oder "
#. Tag: para
#: xml.xml:15
#, no-c-format
msgid "when there should be multiple Web Beans with the same implementation class."
-msgstr ""
+msgstr "wenn mehrere Web Beans mit derselben Implementierungsklasse existieren sollten."
#. Tag: para
#: xml.xml:20
#, no-c-format
msgid "In either of these cases, Web Beans gives us two options:"
-msgstr ""
+msgstr "In jedem dieser Fälle bieten uns Web Beans zwei Optionen:"
#. Tag: para
#: xml.xml:23
#, no-c-format
msgid "write a producer method, or"
-msgstr ""
+msgstr "das Schreiben einer Producer-Methode oder "
#. Tag: para
#: xml.xml:24
#, no-c-format
msgid "declare the Web Bean using XML."
-msgstr ""
+msgstr "das Deklarieren des Web Beans mittels XML."
#. Tag: para
#: xml.xml:27
@@ -71,6 +71,9 @@
"Web Beans lets you use the class or member name as the name of the XML "
"element."
msgstr ""
+"Viele Frameworks verwenden XML zur Bereitstellung von Metadaten, die sich auf Java-Klassen beziehen. "
+"Web Beans jedoch verwenden eine sehr unterschiedliche Herangehensweise bei der Festlegung von Namen von Java-Klassen, Feldern oder Methoden als andere Frameworks. Statt dem Schreiben von Klassen- und Mitglieder-Namen als String-Werte von XML-Elementen und Attributen, gestatten "
+"Web Beans die Verwendung des Klassen- und Mitglieder-Namens als Name des XML-Elements."
#. Tag: para
#: xml.xml:33
@@ -82,12 +85,14 @@
"integrated development environment could perform the same validation without "
"the need for the explicit intermediate generation step."
msgstr ""
+"Der Vorteil bei dieser Vorgehensweise ist, dass Sie ein XML-Schema schreiben können, dass Rechtschreibfehler in Ihrem XML-Dokument verhindert. Es ist sogar möglich, dass ein Tool "
+"das XML-Schema automatisch aus dem kompilierten Java-Code generiert. Oder eine integrierte Entwicklungsumgebung könnte dieselbe Validierung durchführen, ohne dass der explizite Generierungsschritt notwendig wäre."
#. Tag: title
#: xml.xml:40
#, no-c-format
msgid "Declaring Web Bean classes"
-msgstr ""
+msgstr "Deklaration von Web Bean Klassen"
#. Tag: para
#: xml.xml:42
@@ -98,6 +103,8 @@
"package name. For the package <literal>com.mydomain.myapp</literal>, the XML "
"namespace is <literal>urn:java:com.mydomain.myapp</literal>."
msgstr ""
+"Für jedes Java-Paket definieren Web Beans einen entsprechenden XML-Namespace. Der "
+"Namespace wird durch Voranstellen von <literal>urn:java:</literal> vor den Java-Paketnamen gebildet. Für das Paket <literal>com.mydomain.myapp</literal> ist der XML-Namespace <literal>urn:java:com.mydomain.myapp</literal>."
#. Tag: para
#: xml.xml:47
@@ -108,7 +115,7 @@
"name of the Java type. Fields and methods of the type are specified by child "
"elements in the same namespace. If the type is an annotation, members are "
"specified by attributes of the element."
-msgstr ""
+msgstr "Auf Java-Typen, die zu einem Paket gehören, wird verwiesen, indem ein XML-Element in dem dem Paket entsprechenden Namespace verwendet wird. Derr Name des Elements ist der Name des Java-Typs. Felder und Methoden des Typs werden durch untergeordnete Elemente in demselben Namespace festgelegt. Handelt es sich bei dem Typ um eine Annotation, so werden Mitglieder durch Attribute des Elements festgelegt."
#. Tag: para
#: xml.xml:53
@@ -116,7 +123,7 @@
msgid ""
"For example, the element <literal><util:Date/></literal> in the "
"following XML fragment refers to the class <literal>java.util.Date</literal>:"
-msgstr ""
+msgstr "Zum Beispiel bezieht sich das Element <literal><util:Date/></literal> im folgenden XML-Fragment auf die Klasse <literal>java.util.Date</literal>:"
#. Tag: programlisting
#: xml.xml:56
@@ -143,7 +150,7 @@
"And this is all the code we need to declare that <literal>Date</literal> is "
"a simple Web Bean! An instance of <literal>Date</literal> may now be "
"injected by any other Web Bean:"
-msgstr ""
+msgstr "Und das ist alles an Code was wir benötigen, um zu deklarieren dass es sich bei <literal>Date</literal> um ein einfaches Web Bean handelt! Eine Instanz von <literal>Date</literal> kann jetzt in ein beliebiges anderes Web Bean eingespeist werden:"
#. Tag: programlisting
#: xml.xml:62
@@ -155,7 +162,7 @@
#: xml.xml:67
#, no-c-format
msgid "Declaring Web Bean metadata"
-msgstr ""
+msgstr "Deklaration von Web Bean Metadaten"
#. Tag: para
#: xml.xml:69
@@ -163,7 +170,7 @@
msgid ""
"We can declare the scope, deployment type and interceptor binding types "
"using direct child elements of the Web Bean declaration:"
-msgstr ""
+msgstr "Wir können Geltungsbereich, Deployment-Typ und Interzeptor Binding-Typen deklarieren, indem wir direkte untergeordnete Elemente der Web Bean Dellaration verwenden:"
#. Tag: programlisting
#: xml.xml:72
@@ -185,7 +192,7 @@
#: xml.xml:74
#, no-c-format
msgid "We use exactly the same approach to specify names and binding type:"
-msgstr ""
+msgstr "Wir verwenden exakt dieselbe Vorgehensweise, um Namen und Binding-Typ festzulegen:"
#. Tag: programlisting
#: xml.xml:76
@@ -229,7 +236,7 @@
msgid ""
"Where <literal>@Login</literal> and <literal>@SystemStart</literal> are "
"binding annotations types."
-msgstr ""
+msgstr "Wobei <literal>@Login</literal> und <literal>@SystemStart</literal> Binding Annotationstypen sind."
#. Tag: programlisting
#: xml.xml:81
@@ -247,7 +254,7 @@
#: xml.xml:83
#, no-c-format
msgid "As usual, a Web Bean may support multiple binding types:"
-msgstr ""
+msgstr "Wie gewöhnlich kann ein Web Bean mehrere Binding-Typen unterstützen:"
#. Tag: programlisting
#: xml.xml:85
@@ -269,7 +276,7 @@
msgid ""
"Interceptors and decorators are just simple Web Beans, so they may be "
"declared just like any other simple Web Bean:"
-msgstr ""
+msgstr "Interzeptoren und Dekoratoren sind nur einfache Web Beans und können daher wie jedes andere einfache Web Bean deklariert werden:"
#. Tag: programlisting
#: xml.xml:90
@@ -289,7 +296,7 @@
#: xml.xml:95
#, no-c-format
msgid "Declaring Web Bean members"
-msgstr ""
+msgstr "Deklaration von Web Bean Mitgliedern"
#. Tag: para
#: xml.xml:97
@@ -301,13 +308,13 @@
#: xml.xml:104
#, no-c-format
msgid "Declaring inline Web Beans"
-msgstr ""
+msgstr "Deklaration von inline Web Beans"
#. Tag: para
#: xml.xml:106
#, no-c-format
msgid "Web Beans lets us define a Web Bean at an injection point. For example:"
-msgstr ""
+msgstr "Web Beans lassen uns ein Web Bean an einem Einspeisungspunkt definieren. Zum Beispiel:"
#. Tag: programlisting
#: xml.xml:108
@@ -344,7 +351,7 @@
"a set of initial field values. This Web Bean has a special, container-"
"generated binding and is therefore injectable only to the specific injection "
"point at which it is declared."
-msgstr ""
+msgstr "Das <literal><Name></literal>-Element deklariert ein einfaches Web Bean von Geltungsbereich <literal>@Dependent</literal> und Klasse <literal>Name</literal> mit einem Satz anfänglicher Feldwerte. Dieses Web Bean besitzt ein spezielles, Container-generiertes Binding und ist daher nur an dem spezifischen Einspeisungspunkt einspeisbar, an dem es deklariert wird."
#. Tag: para
#: xml.xml:116
@@ -353,13 +360,13 @@
"This simple but powerful feature allows the Web Beans XML format to be used "
"to specify whole graphs of Java objects. It's not quite a full databinding "
"solution, but it's close!"
-msgstr ""
+msgstr "Dieses einfache aber leistungsfähige Feature gestattet die Verwendung des Web Beans XML-Formats zur Festlegung ganzer Diagramme von Java-Objekten. Es ist noch keine volndige datenbindende Lösung, aber ganz nah dran!"
#. Tag: title
#: xml.xml:123
#, no-c-format
msgid "Using a schema"
-msgstr ""
+msgstr "Verwendung eines Schemas"
#. Tag: para
#: xml.xml:125
@@ -369,7 +376,7 @@
"developers, or who don't have access to our code, we need to provide a "
"schema. There's nothing specific to Web Beans about writing or using the "
"schema."
-msgstr ""
+msgstr "Wenn Personen, die keine Java-Entwickler sind, Autoren unseres XML-Dokumentformats sein sollen oder diese keinen Zugriff auf unseren Code haben, so müssen wir ein Schema bereitstellen. Es gibt nichts, was hinsichtlich des Schreibens oder der Verwendung des Schemas spezifisch für Web Beans ist."
#. Tag: programlisting
#: xml.xml:130
@@ -410,5 +417,5 @@
"Writing an XML schema is quite tedious. Therefore, the Web Beans RI project "
"will provide a tool which automatically generates the XML schema from "
"compiled Java code."
-msgstr ""
+msgstr "Das Schreiben eines XML-Schemas ist recht mühselig. Daher liefert das Web Beans RI Projekt ein Tool, das automatisch das XML-Schema aus kompiliertem Java-Code generiert."
15 years, 9 months
[webbeans-commits] Webbeans SVN: r1779 - doc/trunk/reference/de-DE.
by webbeans-commits@lists.jboss.org
Author: jdimanos
Date: 2009-03-06 00:50:27 -0500 (Fri, 06 Mar 2009)
New Revision: 1779
Modified:
doc/trunk/reference/de-DE/stereotypes.po
Log:
update
Modified: doc/trunk/reference/de-DE/stereotypes.po
===================================================================
--- doc/trunk/reference/de-DE/stereotypes.po 2009-03-06 04:53:12 UTC (rev 1778)
+++ doc/trunk/reference/de-DE/stereotypes.po 2009-03-06 05:50:27 UTC (rev 1779)
@@ -7,7 +7,7 @@
"Project-Id-Version: stereotypes\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-10 14:18+0000\n"
-"PO-Revision-Date: 2009-01-24 15:40+1100\n"
+"PO-Revision-Date: 2009-03-06 16:50+1100\n"
"Last-Translator: \n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -19,13 +19,13 @@
#: stereotypes.xml:4
#, no-c-format
msgid "Stereotypes"
-msgstr ""
+msgstr "Stereotypen"
#. Tag: para
#: stereotypes.xml:6
#, no-c-format
msgid "According to the Web Beans specification:"
-msgstr ""
+msgstr "Gemäß der Web Beans Spezifikation:"
#. Tag: para
#: stereotypes.xml:10
@@ -36,42 +36,44 @@
"role and declare some common metadata for Web Beans with that role in a "
"central place."
msgstr ""
+"In vielen Systemen produziert die Verwendung architektonischer Muster einen Satz wiederkehrender "
+"Web Bean Rollen. Ein Stereotyp gestattet dem Entwickler eines Frameworks die Identifizierung einer solchen Rolle und die Deklaration einiger gemeinsamer Metadaten für Web Beans mit dieser Rolle an einer zentralen Stelle."
#. Tag: para
#: stereotypes.xml:14
#, no-c-format
msgid "A stereotype encapsulates any combination of:"
-msgstr ""
+msgstr "Ein Stereotyp beinhaltet eine beliebige Kombination von:"
#. Tag: para
#: stereotypes.xml:18
#, no-c-format
msgid "a default deployment type,"
-msgstr ""
+msgstr "einem standardmäßigen Deployment-Typ, "
#. Tag: para
#: stereotypes.xml:21
#, no-c-format
msgid "a default scope type,"
-msgstr ""
+msgstr "einem standardmäßigen Geltungsbereich-Typ,"
#. Tag: para
#: stereotypes.xml:24
#, no-c-format
msgid "a restriction upon the Web Bean scope,"
-msgstr ""
+msgstr "einer Einschränkung hinsichtlich des Geltungsbereichs des Web Beans, "
#. Tag: para
#: stereotypes.xml:27
#, no-c-format
msgid "a requirement that the Web Bean implement or extend a certain type, and"
-msgstr ""
+msgstr "einer Anforderung, dass das Web Bean einen bestimmten Typ implementiert oder erweitert und "
#. Tag: para
#: stereotypes.xml:30
#, no-c-format
msgid "a set of interceptor binding annotations."
-msgstr ""
+msgstr "einem Satz von Interzeptor Binding Annotationen."
#. Tag: para
#: stereotypes.xml:34
@@ -79,13 +81,13 @@
msgid ""
"A stereotype may also specify that all Web Beans with the stereotype have "
"defaulted Web Bean names."
-msgstr ""
+msgstr "Ein Stereotyp kann auch festlegen, dass alle Web Beans mit dem Stereotyp standardmäßige Web Bean Namen besitzen."
#. Tag: para
#: stereotypes.xml:37
#, no-c-format
msgid "A Web Bean may declare zero, one or multiple stereotypes."
-msgstr ""
+msgstr "Ein Web Bean kann null, ein oder mehrere Stereotypen deklarieren."
#. Tag: para
#: stereotypes.xml:41
@@ -93,7 +95,7 @@
msgid ""
"A stereotype is a Java annotation type. This stereotype identifies action "
"classes in some MVC framework:"
-msgstr ""
+msgstr "Bei einem Stereotyp handelt es sich um einen Java Annotationstyp. Dieses Stereotyp identifiziert Action-Klassen in einem MVC-Framework:"
#. Tag: programlisting
#: stereotypes.xml:44
@@ -113,7 +115,7 @@
#: stereotypes.xml:46
#, no-c-format
msgid "We use the stereotype by applying the annotation to a Web Bean."
-msgstr ""
+msgstr "Wir verwenden das Stereotyp durch Anwendung der Annotation an einem Web Bean."
#. Tag: programlisting
#: stereotypes.xml:48
@@ -129,7 +131,7 @@
#: stereotypes.xml:51
#, no-c-format
msgid "Default scope and deployment type for a stereotype"
-msgstr ""
+msgstr "Standardmäßiger Geltungsbereich und Deployment-Typ für ein Stereotyp"
#. Tag: para
#: stereotypes.xml:53
@@ -141,6 +143,9 @@
"deployed when the system executes as a web application, we might specify the "
"following defaults for action classes:"
msgstr ""
+"Ein Stereotyp kann den standardmäßigen Geltungsbereich und/oder standardmäßigen Deployment-Typ für "
+"Web Beans mit diesem Stereotyp festlegen. Identifiziert der Deployment-Typ "
+"<literal>@WebTier</literal> etwa, dass Web Beans nur deployt werden sollten, wenn das System als eine Webanwendung ausgeführt wird, so könnten wird die folgenden Standards für Action-Klassen festlegen: "
#. Tag: programlisting
#: stereotypes.xml:59
@@ -166,7 +171,7 @@
msgid ""
"Of course, a particular action may still override these defaults if "
"necessary:"
-msgstr ""
+msgstr "Natürlich kann eine bestimmte Action diese Standards falls nötig immer noch außer Kraft setzen:"
#. Tag: programlisting
#: stereotypes.xml:64
@@ -182,13 +187,13 @@
#: 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 "Wenn wir alle Actions in einen bestimmten Geltungsbereich zwingen wollen, so können wir auch das tun."
#. Tag: title
#: stereotypes.xml:72
#, no-c-format
msgid "Restricting scope and type with a stereotype"
-msgstr ""
+msgstr "Einschränkung des Geltungsbereichs und Typs mit einem Stereotyp "
#. Tag: para
#: stereotypes.xml:74
@@ -198,6 +203,9 @@
"Beans lets us explicitly specify the set of allowed scopes for Web Beans "
"with a certain stereotype. For example:"
msgstr ""
+"Nehmen wir an, wir wollten verhindern, dass Actions bestimmte Geltungsbereiche deklarieren. Web "
+"Beans lässt uns den Satz gestatteter Geltungsbereiche für Web Beans "
+"mit einem bestimmten Stereotyp explizit festlegen. Zum Beispiel:"
#. Tag: programlisting
#: stereotypes.xml:78
@@ -224,7 +232,7 @@
"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 "Falls eine bestimmte Action-Klasse versucht einen anderen Geltungsbereich als den Anfragen-Geltungsbereich der Web Beans festzulegen, so wird zum Initialisierungszeitpunkt durch den Web Bean Manager eine Ausnahme gemeldet."
#. Tag: para
#: stereotypes.xml:84
@@ -232,7 +240,7 @@
msgid ""
"We can also force all Web Bean with a certain stereotype to implement an "
"interface or extend a class:"
-msgstr ""
+msgstr "Wir können auch alle Web Beans mit einem bestimmten Stereotyp zur Implementierung eines Interface oder Erweiterung einer Klasse zwingen:"
#. Tag: programlisting
#: stereotypes.xml:87
@@ -259,13 +267,13 @@
"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 "Falls eine bestimmte Action-Klasse die Klasse <literal>AbstractAction</literal> nicht erweitert, so wird zum Initialisierungszeitpunkt eine Ausnahme durch den Web Bean Manager gemeldet."
#. Tag: title
#: stereotypes.xml:96
#, no-c-format
msgid "Interceptor bindings for stereotypes"
-msgstr ""
+msgstr "Interzeptor-Bindings für Stereotypen"
#. Tag: para
#: stereotypes.xml:98
@@ -273,7 +281,7 @@
msgid ""
"A stereotype may specify a set of interceptor bindings to be inherited by "
"all Web Beans with that stereotype."
-msgstr ""
+msgstr "Ein Stereotyp kann einen Satz von Interzeptor-Bindings festlegen, der an alle Web Beans mit diesem Stereotyp vererbt werden soll."
#. Tag: programlisting
#: stereotypes.xml:101
@@ -303,13 +311,13 @@
msgid ""
"This helps us get technical concerns even further away from the business "
"code!"
-msgstr ""
+msgstr "Dies hilft uns einen weiteren Schritt weiter in Richtung der Trennung technischer Probleme und Business Code!"
#. Tag: title
#: stereotypes.xml:109
#, no-c-format
msgid "Name defaulting with stereotypes"
-msgstr ""
+msgstr "Namensstandardisierung und Stereotype"
#. Tag: para
#: stereotypes.xml:111
@@ -320,6 +328,8 @@
"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 ""
+"Zu guter Letzt können wir auch noch festlegen, dass alle Web Beans mit einem bestimmten Stereotyp einen "
+"Web Bean Namen besitzen, der vom Web Bean Manager standardisiert wird. Actions werden oft in JSP-Seiten referenziert, so dass sie den perfekten Anwendungsfall für dieses Feature darstellen. Alles, was wir tun müssen ist eine leere <literal>@Named</literal>-Annotation hinzuzufügen:"
#. Tag: programlisting
#: stereotypes.xml:116
@@ -352,12 +362,14 @@
"Now, <literal>LoginAction</literal> will have the name <literal>loginAction</"
"literal>."
msgstr ""
+"Jetzt hat <literal>LoginAction</literal> den Namen <literal>loginAction</"
+"literal>."
#. Tag: title
#: stereotypes.xml:124
#, no-c-format
msgid "Standard stereotypes"
-msgstr ""
+msgstr "Standard-Stereotypen"
#. Tag: para
#: stereotypes.xml:126
@@ -367,12 +379,15 @@
"specification: <literal>@Interceptor</literal> and <literal>@Decorator</"
"literal>."
msgstr ""
+"Wir haben bereits zwei Standard-Stereotypen kennengelernt, die durch die Web Beans "
+"Spezifikation definiert werden: <literal>@Interceptor</literal> und <literal>@Decorator</"
+"literal>."
#. Tag: para
#: stereotypes.xml:129
#, no-c-format
msgid "Web Beans defines one further standard stereotype:"
-msgstr ""
+msgstr "Web Beans definiert einen weiteren Standard-Stereotyp:"
#. Tag: programlisting
#: stereotypes.xml:131
@@ -399,5 +414,5 @@
"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 "Dieser Stereotyp ist für den Gebrauch mit JSF vorgesehen. Statt JSF gemanagte Beans zu verwenden, annotieren Sie ein Web Bean einfach <literal>@Model</literal>, und verwenden Sie es direkt in Ihrer JSF-Seite."
15 years, 9 months
[webbeans-commits] Webbeans SVN: r1778 - doc/trunk/reference/de-DE.
by webbeans-commits@lists.jboss.org
Author: jdimanos
Date: 2009-03-05 23:53:12 -0500 (Thu, 05 Mar 2009)
New Revision: 1778
Modified:
doc/trunk/reference/de-DE/specialization.po
Log:
update
Modified: doc/trunk/reference/de-DE/specialization.po
===================================================================
--- doc/trunk/reference/de-DE/specialization.po 2009-03-06 00:09:59 UTC (rev 1777)
+++ doc/trunk/reference/de-DE/specialization.po 2009-03-06 04:53:12 UTC (rev 1778)
@@ -7,7 +7,7 @@
"Project-Id-Version: specialization\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-10 14:18+0000\n"
-"PO-Revision-Date: 2009-03-05 18:10+1100\n"
+"PO-Revision-Date: 2009-03-06 15:52+1100\n"
"Last-Translator: \n"
"Language-Team: <en(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -19,7 +19,7 @@
#: specialization.xml:4
#, no-c-format
msgid "Specialization"
-msgstr "Spezialisierung"
+msgstr "Specialization (Spezialisierung)"
#. Tag: para
#: specialization.xml:6
@@ -30,6 +30,10 @@
"time. For example, the following enterprise Web Bean provides an "
"implementation of the API <literal>PaymentProcessor</literal> in production:"
msgstr ""
+"Wir haben bereits gesehen, wie das Web Beans Modell zur Dependency Einspeisung uns die "
+"<emphasis>Außerkraftsetzung</emphasis> der Implementierung eines API zum Zeitpunkt des Deployment "
+"gestattet. Das folgende Enterprise Web Bean zum Beispiel liefert eine "
+"Implementierung der API <literal>PaymentProcessor</literal> in Production:"
#. Tag: programlisting
#: specialization.xml:11
@@ -54,6 +58,8 @@
"But in our staging environment, we override that implementation of "
"<literal>PaymentProcessor</literal> with a different Web Bean:"
msgstr ""
+"Aber in unserer Staging-Umgebung setzen wir diese Implementierung von "
+"<literal>PaymentProcessor</literal> mit einem anderen Web Bean außer Kraft:"
#. Tag: programlisting
#: specialization.xml:16
@@ -82,6 +88,8 @@
"default deployment type <literal>@Production</literal>, and therefore "
"clients with the following injection point:"
msgstr ""
+"Wir haben bei <literal>StagingCreditCardPaymentProcessor</"
+"literal> versucht, <literal>AsyncPaymentProcessor</literal> in einem bestimmten Deployment des Systems komplett zu ersetzen. In diesem Deployment, hätte der Deployment Typ <literal>@Staging</literal> eine höhere Priorität als der standardmäßige Deployment Typ <literal>@Production</literal> und daher Clients mit dem folgenden Einspeisungspunkt:"
#. Tag: programlisting
#: specialization.xml:24
@@ -112,6 +120,8 @@
"the higher-priority Web Bean may not implement all the API types of the Web "
"Bean that it attempts to override,"
msgstr ""
+"Das Web Bean mit der höheren Priorität implementiert möglicherweise nicht alle API-Typen des Web "
+"Beans, das es außer Kraft zu setzen versucht, "
#. Tag: para
#: specialization.xml:36
@@ -119,7 +129,7 @@
msgid ""
"the higher-priority Web Bean may not declare all the binding types of the "
"Web Bean that it attempts to override,"
-msgstr ""
+msgstr "Das Web Bean mit der höheren Priorität deklariert möglicherweise nicht alle Binding-Typen des Web Beans, das es außer Kraft zu setzen versucht, "
#. Tag: para
#: specialization.xml:40
@@ -127,7 +137,7 @@
msgid ""
"the higher-priority Web Bean might not have the same name as the Web Bean "
"that it attempts to override, or"
-msgstr ""
+msgstr "Das Web Bean mit der höheren Priorität besitzt möglicherweise nicht denselben Namen wie das Web Bean, das es außer Kraft zu setzen versucht oder "
#. Tag: para
#: specialization.xml:44
@@ -136,6 +146,8 @@
"the Web Bean that it attempts to override might declare a producer method, "
"disposal method or observer method."
msgstr ""
+"das Web Bean, das es außer Kraft zu setzen versucht deklariert möglicherweise eine Producer Methode, "
+"eine Bereinigungsmethode odereine Observer Methode."
#. Tag: para
#: specialization.xml:49
@@ -144,7 +156,7 @@
"In each of these cases, the Web Bean that we tried to override could still "
"be called at runtime. Therefore, overriding is somewhat prone to developer "
"error."
-msgstr ""
+msgstr "In allen diesen Fällen kann das Web Bean, das wir außer Kraft zu setzen versucht haben, nach wie vor zur Runtime aufgerufen werden. Daher ist Außerkraftsetzung anfällig für Entwicklerfehler."
#. Tag: para
#: specialization.xml:52
@@ -155,6 +167,8 @@
"a little esoteric at first, but it's easy to use in practice, and you'll "
"really appreciate the extra security it provides."
msgstr ""
+"Web Beans bieten ein spezielles Feature namens <emphasis>Specialization</"
+"emphasis> (Spezialisierung), das dem Entwickler hilft, diese Stolperfallen zu umgehen. Specialization wirkt auf den ersten Blick etwas ungewöhnlich, ist aber in der Praxis einfach zu verwenden und Sie werden die zusätzliche Sicherheit, die es bietet bald schätzen."
#. Tag: title
#: specialization.xml:58
@@ -169,12 +183,14 @@
"Specialization is a feature that is specific to simple and enterprise Web "
"Beans. To make use of specialization, the higher-priority Web Bean must:"
msgstr ""
+"Specialization ist ein Feature das spezifisch für einfache und Enterprise Web "
+"Beans ist. Um Specialization zu nutzen, muss ein Web Bean mit höherer Priorität:"
#. Tag: para
#: specialization.xml:65
#, no-c-format
msgid "be a direct subclass of the Web Bean it overrides, and"
-msgstr ""
+msgstr "eine direkt Subklasse des Web Beans sein, das es außer Kraft setzt und "
#. Tag: para
#: specialization.xml:68
@@ -183,7 +199,7 @@
"be a simple Web Bean if the Web Bean it overrides is a simple Web Bean or an "
"enterprise Web Bean if the Web Bean it overrides is an enterprise Web Bean, "
"and"
-msgstr ""
+msgstr "ein einfaches Web Bean sein, falls das Web Bean, das es außer Kraft setzt ein einfaches Web Bean ist oder ein Enterprise Web Bean sein, falls das Web Bean, das es außer Kraft setzt ein Enterprise Web Bean ist und "
#. Tag: para
#: specialization.xml:73
@@ -213,7 +229,7 @@
msgid ""
"We say that the higher-priority Web Bean <emphasis>specializes</emphasis> "
"its superclass."
-msgstr ""
+msgstr "Wir sprechen davon, dass das Web Bean mit höherer Priorität seine Superklasse <emphasis>spezialisiert</emphasis>."
#. Tag: title
#: specialization.xml:85
@@ -233,7 +249,7 @@
msgid ""
"the binding types of the superclass are automatically inherited by the Web "
"Bean annotated <literal>@Specializes</literal>, and"
-msgstr ""
+msgstr "DIe Binding-Typen der Superklasse werden automatisch durch das mit <literal>@Specializes</literal> annotierte Web Bean geerbt und "
#. Tag: para
#: specialization.xml:95
@@ -241,7 +257,7 @@
msgid ""
"the Web Bean name of the superclass is automatically inherited by the Web "
"Bean annotated <literal>@Specializes</literal>, and"
-msgstr ""
+msgstr "der Web Bean Name der Superklasse wird automatisch automatisch durch das mit <literal>@Specializes</literal> annotierte Web Bean geerbt und "
#. Tag: para
#: specialization.xml:99
@@ -251,7 +267,7 @@
"superclass are called upon an instance of the Web Bean annotated "
"<literal>@Specializes</literal>."
msgstr ""
-"Durch die Superklasse deklarierte Producer-Methoden, Bereinigungsmethoden und Observer-Methoden "
+"durch die Superklasse deklarierte Producer-Methoden, Bereinigungsmethoden und Observer-Methoden "
"werden durch eine Instanz des mit <literal>@Specializes</literal> annotierten Web Beans aufgerufen."
#. Tag: para
15 years, 9 months
[webbeans-commits] Webbeans SVN: r1777 - in tck/trunk/impl/src/main: java/org/jboss/jsr299/tck/impl/packaging and 6 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-05 19:09:59 -0500 (Thu, 05 Mar 2009)
New Revision: 1777
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/Dog.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/TestServlet.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/beans.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/web.xml
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/IntegrationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/TCKArtifactDescriptor.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/NonContextualInjectionTest.java
Log:
Add a test for servlet injection (ri-broken here though)
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-03-05 22:36:08 UTC (rev 1776)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractDeclarativeTest.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -225,10 +225,10 @@
{
testResult.setThrowable(deploymentException.getCause());
}
- else if (!isDeployToContainerNeeded() && !skipTest)
+ else if ((!isDeployToContainerNeeded() || artifact.isRunLocally()) && !skipTest)
{
callback.runTestMethod(testResult);
- if (!getCurrentConfiguration().isStandalone() && !isInContainer())
+ if (!getCurrentConfiguration().isStandalone() && !isInContainer() && !artifact.isRunLocally())
{
log.warn("Running testcase locally " + testResult.getMethod());
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java 2009-03-05 22:36:08 UTC (rev 1776)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/AbstractTest.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -86,11 +86,6 @@
{
getCurrentConfiguration().getContexts().destroyContext(context);
}
-
- public AbstractTest()
- {
- super();
- }
protected static Configuration getCurrentConfiguration()
{
@@ -113,4 +108,9 @@
}
}
+ public String getContextPath()
+ {
+ return "http://" + getCurrentConfiguration().getHost() + "/" + this.getClass().getName() + "/";
+ }
+
}
\ No newline at end of file
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java 2009-03-05 22:36:08 UTC (rev 1776)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/ArtifactGenerator.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -31,6 +31,7 @@
private static final Logger log = Logger.getLogger(ArtifactProcessor.class);
private final boolean unit;
+ private final boolean runLocally;
private final boolean addDeclaringPackage;
private final String beansXml;
private final PackagingType packagingType;
@@ -78,10 +79,12 @@
if (declaringClass.isAnnotationPresent(IntegrationTest.class))
{
this.unit = false;
+ this.runLocally = declaringClass.getAnnotation(IntegrationTest.class).runLocally();
}
else
{
this.unit = true;
+ this.runLocally = false;
}
if (declaringClass.isAnnotationPresent(Resources.class))
@@ -146,8 +149,11 @@
{
final TCKArtifactDescriptor artifact = newArtifact(packagingType, declaringClass, beansXml, standalone, addDeclaringPackage);
artifact.setUnit(unit);
+ artifact.setRunLocally(runLocally);
artifact.setExpectedDeploymentException(expectedDeploymentException);
artifact.getClasses().addAll(classes);
+ // Annoying hack
+ artifact.getResources().removeAll(resources);
artifact.getResources().addAll(resources);
artifact.getLibraries().addAll(extraLibraries);
return artifact;
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/IntegrationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/IntegrationTest.java 2009-03-05 22:36:08 UTC (rev 1776)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/IntegrationTest.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -21,4 +21,6 @@
public @interface IntegrationTest
{
+ boolean runLocally() default false;
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/TCKArtifactDescriptor.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/TCKArtifactDescriptor.java 2009-03-05 22:36:08 UTC (rev 1776)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/packaging/jsr299/TCKArtifactDescriptor.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -40,6 +40,7 @@
private static final Logger log = Logger.getLogger(TCKArtifactDescriptor.class);
private boolean unit;
+ private boolean runLocally;
private Class<? extends Throwable> expectedDeploymentException;
public TCKArtifactDescriptor(Class<?> declaringClass, String beansXmlSourceFileName)
@@ -113,4 +114,14 @@
this.expectedDeploymentException = expectedDeploymentException;
}
+ public boolean isRunLocally()
+ {
+ return runLocally;
+ }
+
+ public void setRunLocally(boolean runLocally)
+ {
+ this.runLocally = runLocally;
+ }
+
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -0,0 +1,85 @@
+package org.jboss.jsr299.tck.impl.util;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+
+public class Servlet
+{
+
+ public static abstract class ServletConnection
+ {
+
+ private final long connectTimeout;
+ private final URL url;
+ private HttpURLConnection connection;
+
+ public ServletConnection(long connectTimeout, URL url)
+ {
+ this.connectTimeout = connectTimeout;
+ this.url = url;
+ }
+
+ private void init() throws IOException
+ {
+ long timeoutTime = System.currentTimeMillis() + connectTimeout;
+ boolean interrupted = false;
+ while (timeoutTime > System.currentTimeMillis())
+ {
+ URLConnection connection = url.openConnection();
+ if (!(connection instanceof HttpURLConnection))
+ {
+ throw new IllegalStateException("Not an http connection! " + connection);
+ }
+ this.connection = (HttpURLConnection) connection;
+ this.connection.setUseCaches(false);
+ this.connection.setDefaultUseCaches(false);
+ connection.connect();
+ if (this.connection.getResponseCode() == HttpURLConnection.HTTP_OK)
+ {
+ return;
+ }
+ try
+ {
+ Thread.sleep(200);
+ }
+ catch (InterruptedException e)
+ {
+ interrupted = true;
+ }
+ }
+ if (interrupted)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ protected HttpURLConnection getConnection()
+ {
+ return connection;
+ }
+
+ private void cleanup()
+ {
+ this.connection.disconnect();
+ }
+
+ protected abstract void execute() throws Exception;
+
+ public void run() throws Exception
+ {
+ try
+ {
+ init();
+ execute();
+ }
+ finally
+ {
+ cleanup();
+ }
+ }
+
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/impl/util/Servlet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/NonContextualInjectionTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/NonContextualInjectionTest.java 2009-03-05 22:36:08 UTC (rev 1776)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/NonContextualInjectionTest.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -51,11 +51,5 @@
assert false;
}
- @Test(groups = { "stub", "integration" })
- @SpecAssertion(section = "5.12.3", id = "a")
- public void testInjectionIntoServlet()
- {
- assert false;
- }
}
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/Dog.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/Dog.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/Dog.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.nonContextual.servlet;
+
+public class Dog
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/Dog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -0,0 +1,42 @@
+package org.jboss.jsr299.tck.tests.lookup.nonContextual.servlet;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.jboss.jsr299.tck.AbstractDeclarativeTest;
+import org.jboss.jsr299.tck.impl.packaging.Artifact;
+import org.jboss.jsr299.tck.impl.packaging.IntegrationTest;
+import org.jboss.jsr299.tck.impl.packaging.Resource;
+import org.jboss.jsr299.tck.impl.packaging.Resources;
+import org.jboss.jsr299.tck.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.jsr299.tck.impl.util.Servlet;
+import org.testng.annotations.Test;
+
+@Artifact
+@IntegrationTest(runLocally=true)
+@Resources({
+ @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml")
+})
+public class InjectionIntoServletTest extends AbstractDeclarativeTest
+{
+
+ @Test(groups = { "ri-broken", "integration" })
+ @SpecAssertion(section = "5.12.3", id = "a")
+ public void testInjectionIntoServlet() throws Exception
+ {
+ new Servlet.ServletConnection(getCurrentConfiguration().getConnectTimeout(), new URL(getContextPath()))
+ {
+
+ @Override
+ protected void execute() throws IOException
+ {
+ assert getConnection().getResponseCode() == HttpServletResponse.SC_OK;
+ }
+
+ }.run();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/InjectionIntoServletTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/TestServlet.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/TestServlet.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/TestServlet.java 2009-03-06 00:09:59 UTC (rev 1777)
@@ -0,0 +1,29 @@
+package org.jboss.jsr299.tck.tests.lookup.nonContextual.servlet;
+
+import java.io.IOException;
+
+import javax.inject.Current;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class TestServlet extends HttpServlet
+{
+
+ @Current Dog dog;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ {
+ if (dog == null)
+ {
+ resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ }
+ else
+ {
+ resp.setStatus(HttpServletResponse.SC_OK);
+ }
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/TestServlet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/beans.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/beans.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/beans.xml 2009-03-06 00:09:59 UTC (rev 1777)
@@ -0,0 +1,7 @@
+<Beans xmlns="urn:java:ee"
+ xmlns:test="urn:java:org.jboss.jsr299.tck.tests.lookup.nonContextual">
+ <Deploy>
+ <Standard />
+ <Production />
+ </Deploy>
+</Beans>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/web.xml
===================================================================
--- tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/web.xml (rev 0)
+++ tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/web.xml 2009-03-06 00:09:59 UTC (rev 1777)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>JSR-299 TCK</display-name>
+
+ <servlet>
+ <servlet-name>JSR-299 Servlet Injection Test</servlet-name>
+ <servlet-class>org.jboss.jsr299.tck.tests.lookup.nonContextual.servlet.TestServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>JSR-299 Servlet Injection Test</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Property changes on: tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/nonContextual/servlet/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1776 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-05 17:36:08 -0500 (Thu, 05 Mar 2009)
New Revision: 1776
Modified:
doc/trunk/reference/en-US/ri-spi.xml
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
Log:
Update API
Modified: doc/trunk/reference/en-US/ri-spi.xml
===================================================================
--- doc/trunk/reference/en-US/ri-spi.xml 2009-03-05 22:26:15 UTC (rev 1775)
+++ doc/trunk/reference/en-US/ri-spi.xml 2009-03-05 22:36:08 UTC (rev 1776)
@@ -343,7 +343,7 @@
<para>
To perform injection on a servlet call
- <literal>WebBeansManager.injectIntoServlet()</literal>. The manager
+ <literal>WebBeansManager.injectServlet()</literal>. The manager
can be obtained from <literal>Bootstrap.getManager()</literal>.
</para>
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 2009-03-05 22:26:15 UTC (rev 1775)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-05 22:36:08 UTC (rev 1776)
@@ -633,7 +633,7 @@
return this.<T>getInstanceToInject(injectionPoint, null);
}
- public void injectIntoServlet(Servlet servlet)
+ public void injectServlet(Servlet servlet)
{
servletInjector.inject(servlet);
}
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-05 22:26:15 UTC (rev 1775)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-05 22:36:08 UTC (rev 1776)
@@ -36,6 +36,6 @@
* @param servlet
* the servlet instance to inject
*/
- public void injectIntoServlet(Servlet servlet);
+ public void injectServlet(Servlet servlet);
}
15 years, 10 months
[webbeans-commits] Webbeans SVN: r1775 - ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-05 17:26:15 -0500 (Thu, 05 Mar 2009)
New Revision: 1775
Modified:
ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
Log:
javadoc
Modified: ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java
===================================================================
--- ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-05 22:20:30 UTC (rev 1774)
+++ ri/trunk/webbeans-ri-spi/src/main/java/org/jboss/webbeans/manager/api/WebBeansManager.java 2009-03-05 22:26:15 UTC (rev 1775)
@@ -1,3 +1,20 @@
+/*
+ * 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.manager.api;
import javax.inject.manager.Manager;
@@ -3,7 +20,20 @@
import javax.servlet.Servlet;
+/**
+ * Functionality provided by the Web Beans Manager over and above the JSR-299
+ * Manager.
+ *
+ * @author Pete Muir
+ *
+ */
public interface WebBeansManager extends Manager
{
+ /**
+ * Perform JSR-299 dependency injection on a servlet
+ *
+ * @param servlet
+ * the servlet instance to inject
+ */
public void injectIntoServlet(Servlet servlet);
15 years, 10 months