[webbeans-commits] Webbeans SVN: r1192 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-22 21:21:35 -0500 (Thu, 22 Jan 2009)
New Revision: 1192
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
Log:
marked as broken for now
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-23 02:18:52 UTC (rev 1191)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-23 02:21:35 UTC (rev 1192)
@@ -62,7 +62,7 @@
manager.getContext(Dummy.class);
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
+ @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager", "broken"}) @SpecAssertion(section="9.6")
public void testGetContextWithNoRegisteredContextsFails()
{
manager.getContext(Unregistered.class);
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1191 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-22 21:18:52 -0500 (Thu, 22 Jan 2009)
New Revision: 1191
Modified:
doc/trunk/reference/ko-KR/intro.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/intro.po
===================================================================
--- doc/trunk/reference/ko-KR/intro.po 2009-01-23 02:15:25 UTC (rev 1190)
+++ doc/trunk/reference/ko-KR/intro.po 2009-01-23 02:18:52 UTC (rev 1191)
@@ -8,7 +8,7 @@
"Project-Id-Version: intro\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-23 11:17+1000\n"
+"PO-Revision-Date: 2009-01-23 12:18+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -23,6 +23,7 @@
"\n"
"\n"
"\n"
+"\n"
#. Tag: title
#: intro.xml:4
@@ -838,7 +839,7 @@
msgid ""
"The Web Beans specification says that a concrete Java class is a "
"<emphasis>simple</emphasis> Web Bean if:"
-msgstr ""
+msgstr "Web Beans 사양은 다음과 같을 경우 구체적 Java 클래스가 <emphasis>심플</emphasis> Web Bean이라고 말합니다: "
#. Tag: para
#: intro.xml:334
@@ -846,19 +847,19 @@
msgid ""
"it is not an EE container-managed component, like an EJB, a Servlet or a JPA "
"entity,"
-msgstr ""
+msgstr "EJB, Servlet 또는 JPA 엔티티와 같이 EE 컨테이너 관리 기반 구성요소가 아닐 경우, "
#. Tag: para
#: intro.xml:338
#, no-c-format
msgid "it is not a non-static static inner class,"
-msgstr ""
+msgstr "비-정적인 내부 클래스가 아닐 경우, "
#. Tag: para
#: intro.xml:341
#, no-c-format
msgid "it is not a parameterized type, and"
-msgstr ""
+msgstr "매개 변수화된 유형이 아닐 경우, "
#. Tag: para
#: intro.xml:344
@@ -979,13 +980,13 @@
#: intro.xml:397
#, no-c-format
msgid "remote and web service invocation, and"
-msgstr ""
+msgstr "원격 및 웹 서비스 호출 "
#. Tag: para
#: intro.xml:400
#, no-c-format
msgid "timers and asynchronous methods,"
-msgstr ""
+msgstr "타이머 및 비동기 방식 "
#. Tag: para
#: intro.xml:404
@@ -993,7 +994,7 @@
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 "엔터프라이즈 Web Bean을 사용해야 합니다. 이러한 것이 전혀 필요하지 않을 경우, 심플 Web Bean도 잘 실행될 것입니다. "
#. Tag: para
#: intro.xml:407
@@ -1023,7 +1024,7 @@
"Finally, it's usually obvious when method-level transaction management, "
"method-level security, timers, remote methods or asynchronous methods are "
"needed."
-msgstr ""
+msgstr "마지막으로, 메서드-수준 트랜젝션 관리, 메서드-수준 보안, 타이머, 원격 방식 또는 비동기 방식은 명백하게 필요합니다. "
#. Tag: para
#: intro.xml:420
@@ -1033,6 +1034,8 @@
"EJB, just by adding an annotation: <literal>@Stateless</literal>, "
"<literal>@Stateful</literal> or <literal>@Singleton</literal>."
msgstr ""
+"심플 Web Bean으로 시작하고, <literal>@Stateless</literal>, "
+"<literal>@Stateful</literal>, <literal>@Singleton</literal> 어노테이션을 추가하여 EJB로 변환합니다. "
#. Tag: title
#: intro.xml:427
@@ -1049,7 +1052,7 @@
"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 "<emphasis>생산자 방식</emphasis>은 현재 컨텍스트에 인스턴스가 존재하지 않을 때 Web Bean의 인스턴스를 획득하기 위해 Web Bean 관리자에 의해 호출되는 방식입니다. 생산자 방식은 인스턴스를 Web Bean 관리자가 관리하게 두지 않고 애플리케이션이 인스턴스 절차를 완전히 제어하게 합니다. 예: "
#. Tag: programlisting
#: intro.xml:435
@@ -1081,7 +1084,7 @@
#: intro.xml:437
#, no-c-format
msgid "The result of a producer method is injected just like any other Web Bean."
-msgstr ""
+msgstr "생산자 방식 결과는 기타 다른 Web Bean과 같이 삽입됩니다. "
#. Tag: programlisting
#: intro.xml:439
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1190 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-22 21:15:25 -0500 (Thu, 22 Jan 2009)
New Revision: 1190
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java
Log:
fix breakages
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-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-23 02:15:25 UTC (rev 1190)
@@ -546,11 +546,11 @@
}
else if (MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal())
{
- return (T) proxyPool.getClientProxy(bean, true);
+ return (T) proxyPool.getClientProxy(bean, create);
}
else
{
- return getContext(bean.getScopeType()).get(bean, true);
+ return getContext(bean.getScopeType()).get(bean, create);
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-01-23 02:15:25 UTC (rev 1190)
@@ -350,5 +350,19 @@
{
return dependentInstancesStore;
}
+
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other instanceof AbstractClassBean)
+ {
+ AbstractClassBean<?> that = (AbstractClassBean<?>) other;
+ return super.equals(other) && that.getType().equals(this.getType());
+ }
+ else
+ {
+ return false;
+ }
+ }
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-23 02:15:25 UTC (rev 1190)
@@ -327,5 +327,19 @@
buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
return buffer.toString();
}
+
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other instanceof AbstractProducerBean)
+ {
+ AbstractProducerBean that = (AbstractProducerBean) other;
+ return super.equals(other) && this.getDeclaringBean().equals(that.getDeclaringBean());
+ }
+ else
+ {
+ return false;
+ }
+ }
}
\ No newline at end of file
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java 2009-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java 2009-01-23 02:15:25 UTC (rev 1190)
@@ -2,7 +2,7 @@
import javassist.util.proxy.ProxyObject;
-import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractTest;
import org.testng.annotations.Test;
public class EnterpriseBeanProxyTest extends AbstractTest
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java 2009-01-23 01:43:45 UTC (rev 1189)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java 2009-01-23 02:15:25 UTC (rev 1190)
@@ -422,11 +422,12 @@
@SpecAssertion(section = "8.5.5")
public void testConditionalObserver()
{
+ RecluseSpider.notified = false;
deployBeans(RecluseSpider.class);
manager.fireEvent("New string event");
// Should not be notified since bean is not instantiated yet
- assert !RecluseSpider.isNotified();
+ assert !RecluseSpider.notified;
// Now instantiate the bean and fire another event
try
@@ -436,7 +437,7 @@
assert bean != null;
manager.fireEvent("Another event");
- assert RecluseSpider.isNotified();
+ assert RecluseSpider.notified;
}
finally
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java 2009-01-23 01:43:45 UTC (rev 1189)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java 2009-01-23 02:15:25 UTC (rev 1190)
@@ -11,15 +11,11 @@
@RequestScoped
class RecluseSpider
{
- private static boolean notified = false;
+ public static boolean notified = false;
public void observe(@Observes @IfExists String someEvent)
{
notified = true;
}
-
- public static boolean isNotified()
- {
- return notified;
- }
+
}
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1189 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-22 20:43:45 -0500 (Thu, 22 Jan 2009)
New Revision: 1189
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/AnotherDeploymentType.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Delivery.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/FarmShop.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Shop.java
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
Log:
fixes + specialization support for events
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-01-23 01:21:23 UTC (rev 1188)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -527,9 +527,22 @@
*/
public <T> T getInstance(Bean<T> bean)
{
+ return getInstance(bean, true);
+ }
+
+ /**
+ * Returns an instance of a bean
+ *
+ * @param bean The bean to instantiate
+ * @return An instance of the bean
+ *
+ * @see javax.webbeans.manager.Manager#getInstance(javax.webbeans.manager.Bean)
+ */
+ public <T> T getInstance(Bean<T> bean, boolean create)
+ {
if (specializedBeans.containsKey(bean))
{
- return getInstance((Bean<T>) specializedBeans.get(bean));
+ return getInstance((Bean<T>) specializedBeans.get(bean), create);
}
else if (MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal())
{
@@ -582,18 +595,6 @@
return getInstanceByType(AnnotatedClassImpl.of(type, bindings), bindings);
}
- public <T> T getMostSpecializedInstance(Bean<T> bean, boolean create)
- {
- // TODO Implement specialization
- if (MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal())
- {
- return (T) proxyPool.getClientProxy(bean, create);
- }
- else
- {
- return getContext(bean.getScopeType()).get(bean, create);
- }
- }
/**
* Returns an instance by type literal and binding types
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-23 01:21:23 UTC (rev 1188)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -31,6 +31,7 @@
import javax.webbeans.Event;
import javax.webbeans.InjectionPoint;
import javax.webbeans.Named;
+import javax.webbeans.Specializes;
import javax.webbeans.Standard;
import javax.webbeans.Stereotype;
import javax.webbeans.manager.Bean;
@@ -410,8 +411,6 @@
protected abstract String getDefaultName();
public abstract AbstractBean<?, ?> getSpecializedBean();
-
- public abstract boolean isSpecializing();
/**
* Gets the deployment type of the bean
@@ -560,13 +559,19 @@
return proxyable;
}
+ public boolean isSpecializing()
+ {
+ return getAnnotatedItem().isAnnotationPresent(Specializes.class);
+ }
+
@Override
public boolean equals(Object other)
{
if (other instanceof AbstractBean)
{
AbstractBean<?, ?> that = (AbstractBean<?, ?>) other;
- return this.getTypes().equals(that.getTypes()) && this.getBindings().equals(that.getBindings());
+ boolean equal = this.getTypes().equals(that.getTypes()) && this.getBindings().equals(that.getBindings());
+ return equal;
}
else
{
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-01-23 01:21:23 UTC (rev 1188)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -31,7 +31,6 @@
import javax.webbeans.Produces;
import javax.webbeans.Production;
import javax.webbeans.ScopeType;
-import javax.webbeans.Specializes;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.context.DependentInstancesStore;
@@ -280,12 +279,6 @@
throw new DefinitionException("Specializing bean must extend another bean");
}
}
-
- @Override
- public boolean isSpecializing()
- {
- return getAnnotatedItem().isAnnotationPresent(Specializes.class);
- }
/**
* Gets the annotated item
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java 2009-01-23 01:21:23 UTC (rev 1188)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -116,5 +116,11 @@
{
return NEW_BINDING_SET;
}
+
+ @Override
+ public boolean isSpecializing()
+ {
+ return false;
+ }
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java 2009-01-23 01:21:23 UTC (rev 1188)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -143,4 +143,10 @@
return NEW_BINDING_SET;
}
+ @Override
+ public boolean isSpecializing()
+ {
+ return false;
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-23 01:21:23 UTC (rev 1188)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -24,7 +24,6 @@
import javax.webbeans.DefinitionException;
import javax.webbeans.Disposes;
import javax.webbeans.Observes;
-import javax.webbeans.Specializes;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.MetaDataCache;
@@ -227,11 +226,5 @@
{
this.specializedBean = ProducerMethodBean.of(declaringBean.getAnnotatedItem().getSuperclass().getMethod(getAnnotatedItem().getAnnotatedMethod()), SimpleBean.of(declaringBean.getAnnotatedItem().getSuperclass(), manager), manager);
}
-
- @Override
- public boolean isSpecializing()
- {
- return getAnnotatedItem().isAnnotationPresent(Specializes.class);
- }
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-01-23 01:21:23 UTC (rev 1188)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/event/ObserverImpl.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -188,7 +188,7 @@
public void notify(final T event)
{
// Get the most specialized instance of the component
- Object instance = getInstance(!isConditional());
+ Object instance = manager.getInstance(observerBean, !isConditional());
if (instance != null)
{
try
@@ -221,20 +221,6 @@
}
/**
- * Uses the container to retrieve the most specialized instance of this
- * observer.
- *
- * @param create True if the instance should be created if not already done
- *
- * @return the most specialized instance
- */
- protected Object getInstance(boolean create)
- {
- // Return the most specialized instance of the component
- return manager.getMostSpecializedInstance(observerBean, create);
- }
-
- /**
* Checks if there is currently a transaction active
*
* @return True if there is one, false otherwise
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/AnotherDeploymentType.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/AnotherDeploymentType.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/AnotherDeploymentType.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.unit.event;
+
+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.webbeans.DeploymentType;
+
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+@DeploymentType
+@interface AnotherDeploymentType
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/AnotherDeploymentType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Delivery.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Delivery.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Delivery.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.unit.event;
+
+class Delivery
+{
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Delivery.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java 2009-01-23 01:21:23 UTC (rev 1188)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -2,6 +2,7 @@
import java.lang.annotation.Annotation;
import java.util.ArrayList;
+import java.util.List;
import java.util.Set;
import javax.webbeans.DefinitionException;
@@ -29,6 +30,17 @@
@SpecVersion("20081206")
public class EventTest extends AbstractTest
{
+
+
+ @Override
+ protected List<Class<? extends Annotation>> getEnabledDeploymentTypes()
+ {
+ List<Class<? extends Annotation>> deploymentTypes = new ArrayList<Class<? extends Annotation>>();
+ deploymentTypes.addAll(getStandardDeploymentTypes());
+ deploymentTypes.add(AnotherDeploymentType.class);
+ return deploymentTypes;
+ }
+
public static class AnEventType
{
}
@@ -915,4 +927,13 @@
deployBeans(LazyFarmer.class);
assert manager.resolveObservers(new Egg()).isEmpty();
}
+
+ @Test @SpecAssertion(section="8.5.8")
+ public void testObserverCalledOnMostSpecializedInstance()
+ {
+ Shop.deliveryObservedBy = null;
+ deployBeans(FarmShop.class, Shop.class);
+ manager.fireEvent(new Delivery());
+ assert Shop.deliveryObservedBy.equals(FarmShop.class.getName());
+ }
}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/FarmShop.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/FarmShop.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/FarmShop.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.tck.unit.event;
+
+import javax.webbeans.Specializes;
+
+@Specializes @AnotherDeploymentType
+class FarmShop extends Shop
+{
+
+ @Override
+ public String getClassName()
+ {
+ return FarmShop.class.getName();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/FarmShop.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Shop.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Shop.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Shop.java 2009-01-23 01:43:45 UTC (rev 1189)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.unit.event;
+
+import javax.webbeans.Observes;
+
+class Shop
+{
+
+ public static String deliveryObservedBy = null;
+
+ public String getClassName()
+ {
+ return Shop.class.getName();
+ }
+
+ public void observeDelivery(@Observes Delivery delivery)
+ {
+ deliveryObservedBy = getClassName();
+ }
+
+}
Property changes on: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/Shop.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1188 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-22 20:21:23 -0500 (Thu, 22 Jan 2009)
New Revision: 1188
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/Office.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java
Log:
One more :-)
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-01-23 01:21:07 UTC (rev 1187)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-01-23 01:21:23 UTC (rev 1188)
@@ -25,6 +25,7 @@
import java.lang.reflect.WildcardType;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -118,6 +119,8 @@
// The Naming (JNDI) access
private transient final NamingContext namingContext;
+
+ private final Map<Bean<?>, Bean<?>> specializedBeans;
/**
* Create a new manager
@@ -139,6 +142,7 @@
this.eventManager = new EventManager();
this.ejbDescriptorCache = new EjbDescriptorCache();
this.injectionPointProvider = new InjectionPointProvider();
+ this.specializedBeans = new HashMap<Bean<?>, Bean<?>>();
List<Class<? extends Annotation>> defaultEnabledDeploymentTypes = new ArrayList<Class<? extends Annotation>>();
defaultEnabledDeploymentTypes.add(0, Standard.class);
@@ -523,8 +527,12 @@
*/
public <T> T getInstance(Bean<T> bean)
{
- if (MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal())
+ if (specializedBeans.containsKey(bean))
{
+ return getInstance((Bean<T>) specializedBeans.get(bean));
+ }
+ else if (MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal())
+ {
return (T) proxyPool.getClientProxy(bean, true);
}
else
@@ -784,6 +792,16 @@
{
return injectionPointProvider;
}
+
+ /**
+ *
+ * @return
+ */
+ public Map<Bean<?>, Bean<?>> getSpecializedBeans()
+ {
+ // TODO make this unmodifiable after deploy!
+ return specializedBeans;
+ }
// Serialization
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-23 01:21:07 UTC (rev 1187)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-23 01:21:23 UTC (rev 1188)
@@ -132,7 +132,7 @@
{
preCheckSpecialization();
initSpecialization();
- postCheckSpecialization();
+ postSpecialization();
}
initType();
initPrimitive();
@@ -324,12 +324,15 @@
}
}
- protected void postCheckSpecialization()
+ protected void postSpecialization()
{
if (getAnnotatedItem().isAnnotationPresent(Named.class) && getSpecializedBean().getAnnotatedItem().isAnnotationPresent(Named.class))
{
throw new DefinitionException("Cannot put name on specializing and specialized class");
}
+ // register the specialized bean
+ // TODO not sure this quite right
+ manager.getSpecializedBeans().put(getSpecializedBean(), this);
}
protected void preCheckSpecialization()
@@ -570,4 +573,14 @@
return false;
}
}
+
+ @Override
+ public int hashCode()
+ {
+ int result = 17;
+ result = 31 * result + getTypes().hashCode();
+ result = 31 * result + getBindings().hashCode();
+ return result;
+ }
+
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/Office.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/Office.java 2009-01-23 01:21:07 UTC (rev 1187)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/Office.java 2009-01-23 01:21:23 UTC (rev 1188)
@@ -1,8 +1,10 @@
package org.jboss.webbeans.tck.unit.inheritance.specialization.simple;
+import javax.webbeans.Specializes;
-@AnotherDeploymentType
+
+@AnotherDeploymentType @Specializes
class Office extends Building
{
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java 2009-01-23 01:21:07 UTC (rev 1187)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/simple/SimpleBeanSpecializationTest.java 2009-01-23 01:21:23 UTC (rev 1188)
@@ -80,7 +80,7 @@
deployBeans(OrganicFarmer_Broken.class);
}
- @Test(groups="broken") @SpecAssertion(section="4.3.1")
+ @Test @SpecAssertion(section="4.3.1")
public void testProducerMethodOnSpecializedBeanCalledOnSpecializingBean() throws Exception
{
deployBeans(Office.class, Building.class);
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1187 - doc/trunk/reference/ko-KR.
by webbeans-commits@lists.jboss.org
Author: eukim
Date: 2009-01-22 20:21:07 -0500 (Thu, 22 Jan 2009)
New Revision: 1187
Modified:
doc/trunk/reference/ko-KR/decorators.po
doc/trunk/reference/ko-KR/events.po
doc/trunk/reference/ko-KR/extend.po
doc/trunk/reference/ko-KR/injection.po
doc/trunk/reference/ko-KR/interceptors.po
doc/trunk/reference/ko-KR/intro.po
doc/trunk/reference/ko-KR/part1.po
doc/trunk/reference/ko-KR/part2.po
doc/trunk/reference/ko-KR/part3.po
doc/trunk/reference/ko-KR/producermethods.po
doc/trunk/reference/ko-KR/ri.po
doc/trunk/reference/ko-KR/specialization.po
doc/trunk/reference/ko-KR/xml.po
Log:
updated
Modified: doc/trunk/reference/ko-KR/decorators.po
===================================================================
--- doc/trunk/reference/ko-KR/decorators.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/decorators.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: decorators\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-15 22:48+1000\n"
+"PO-Revision-Date: 2009-01-23 11:19+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -19,6 +19,9 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
+"\n"
#. Tag: title
#: decorators.xml:4
@@ -91,7 +94,7 @@
msgid ""
"A decorator is a simple Web Bean that implements the type it decorates and "
"is annotated <literal>@Decorator</literal>."
-msgstr "데코레이터는 단순한 Web Bean으로 유형을 구현하고 <literal>@Decorator</literal>를 어노테이션합니다. "
+msgstr "데코레이터는 심플 Web Bean으로 유형을 구현하고 <literal>@Decorator</literal>를 어노테이션합니다. "
#. Tag: programlisting
#: decorators.xml:35
@@ -152,7 +155,7 @@
"Unlike other simple Web Beans, a decorator may be an abstract class. If "
"there's nothing special the decorator needs to do for a particular method of "
"the decorated interface, you don't need to implement that method."
-msgstr "기타 다른 간단한 Web Beans와 다르게, 데코레이터는 추상클래스일 수 도 있습니다. 데코레이터된 인터페이스의 특정 방식에 대해 데코레이터가 특별히 해야할 것이 없을 경우, 이 방식을 구현하실 필요가 없습니다. "
+msgstr "기타 다른 심플 Web Beans와 다르게, 데코레이터는 추상클래스일 수 도 있습니다. 데코레이터된 인터페이스의 특정 방식에 대해 데코레이터가 특별히 해야할 것이 없을 경우, 이 방식을 구현하실 필요가 없습니다. "
#. Tag: title
#: decorators.xml:43
@@ -214,7 +217,7 @@
#: decorators.xml:67
#, no-c-format
msgid "has all binding types that are declared by the delegate attribute."
-msgstr "위임 속성에 의해 나타난 모든 바인딩 유형 "
+msgstr "위임 속성에 의해 명시된 모든 바인딩 유형 "
#. Tag: para
#: decorators.xml:71
@@ -271,7 +274,7 @@
#: decorators.xml:94
#, no-c-format
msgid "it lets us enable or disable decorator classes at deployment time."
-msgstr "배포시 데코레이터 클래스를 활성화 또는 비활성화하게 합니다. "
+msgstr "배치시 데코레이터 클래스를 활성화 또는 비활성화하게 합니다. "
#. Tag: para
#: decorators.xml:98
Modified: doc/trunk/reference/ko-KR/events.po
===================================================================
--- doc/trunk/reference/ko-KR/events.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/events.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: events\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-20 10:55+1000\n"
+"PO-Revision-Date: 2009-01-23 11:16+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -25,6 +25,8 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
#. Tag: title
#: events.xml:4
@@ -190,7 +192,7 @@
"with scope <literal>@Dependent</literal> and deployment type "
"<literal>@Standard</literal>, with an implementation provided by the Web "
"Bean manager."
-msgstr "<literal>@Observable</literal> 어노테이션은 <literal>@Dependent</literal> 범위 및 <literal>@Standard</literal> 배포 유형, Web Bean 관리자에 의해 제공되는 구현으로 Web Bean을 정의합니다. "
+msgstr "<literal>@Observable</literal> 어노테이션은 <literal>@Dependent</literal> 범위 및 <literal>@Standard</literal> 배치 유형, Web Bean 관리자에 의해 제공되는 구현으로 Web Bean을 정의합니다. "
#. Tag: para
#: events.xml:72
@@ -601,7 +603,7 @@
"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 "트랜잭션 옵저버는 Web Beans와 같은 상태 기반 객체 모델에서 아주 중요합니다. 이는 단일 원자성 트랜잭션보다 오래 지속되기 때문입니다. "
+msgstr "트랜잭션 옵저버는 Web Beans와 같은 상태 유지 객체 모델에서 아주 중요합니다. 이는 단일 원자성 트랜잭션보다 오래 지속되기 때문입니다. "
#. Tag: para
#: events.xml:233
Modified: doc/trunk/reference/ko-KR/extend.po
===================================================================
--- doc/trunk/reference/ko-KR/extend.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/extend.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: extend\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-14 15:36+1000\n"
+"PO-Revision-Date: 2009-01-23 11:05+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,6 +20,7 @@
"\n"
"\n"
"\n"
+"\n"
#. Tag: title
#: extend.xml:4
@@ -291,7 +292,7 @@
"specification (simple and enterprise Web Beans, producer methods and JMS "
"endpoints). For example, we could use the <literal>Bean</literal> class to "
"allow objects managed by another framework to be injected into Web Beans."
-msgstr "Web Beans 사양 (엔터프라이즈 Web Beans, 생산자 방식 및 JMS 엔드포인트)에 의해 정의된 것 이상으로 새로운 종류의 Web Beans을 지원하기 위해 <literal>Bean</literal> 클래스를 확장하고 <literal>Manager.addBean()</literal>를 호출하여 인스턴스를 등록할 수 있습니다. 예를 들어, <literal>Bean</literal> 클래스를 사용하여 Web Beans에 주입된 다른 프레임워크에 의해 관리되는 객체를 허용하게 할 수 있습니다. "
+msgstr "Web Beans 사양 (심플 Web Beans 및 엔터프라이즈 Web Beans, 생산자 방식 및 JMS 엔드포인트)에 의해 정의된 것 이상으로 새로운 종류의 Web Beans을 지원하기 위해 <literal>Bean</literal> 클래스를 확장하고 <literal>Manager.addBean()</literal>를 호출하여 인스턴스를 등록할 수 있습니다. 예를 들어, <literal>Bean</literal> 클래스를 사용하여 Web Beans에 주입된 다른 프레임워크에 의해 관리되는 객체를 허용하게 할 수 있습니다. "
#. Tag: para
#: extend.xml:60
Modified: doc/trunk/reference/ko-KR/injection.po
===================================================================
--- doc/trunk/reference/ko-KR/injection.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/injection.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: injection\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-23 00:09+1000\n"
+"PO-Revision-Date: 2009-01-23 11:09+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -26,6 +26,8 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
#. Tag: title
#: injection.xml:4
@@ -705,7 +707,7 @@
"deployment by listing them in <literal>web-beans.xml</literal>."
msgstr ""
"Web Beans는 두 개의 내장된 배치 유형을 정의합니다: <literal>@Production</"
-"literal> 및 <literal>@Standard</literal>. 시스템이 배치되면 기본값으로 내장된 배치 유형과 함께 Web Beans 만이 활성화됩니다. <literal>web-beans.xml</literal>에서 몰록을 나열하여 특정 배치에서 활성화될 추가 배치 유형을 인식할 수 있습니다. "
+"literal> 및 <literal>@Standard</literal>. 시스템이 배치되면 기본값으로 내장된 배치 유형과 함께 Web Beans 만이 활성화됩니다. <literal>web-beans.xml</literal>에서 목록을 나열하여 특정 배치에서 활성화될 추가 배치 유형을 인식할 수 있습니다. "
#. Tag: para
#: injection.xml:224
@@ -1163,8 +1165,8 @@
"Simple Web Beans support only the <literal>@PostConstruct</literal> and "
"<literal>@PreDestroy</literal> callbacks."
msgstr ""
-"Simple Web Beans는 <literal>@PostConstruct</literal> 및 "
-"<literal>@PreDestroy</literal> 콜백 기능만을 지원합니다. "
+"심플 Web Beans는 <literal>@PostConstruct</literal> 및 "
+"<literal>@PreDestroy</literal> 콜백 기능만을 지원합니다. "
#. Tag: para
#: injection.xml:429
@@ -1175,7 +1177,7 @@
"for injection of Java EE resources, EJBs and JPA persistence contexts, "
"respectively. Simple Web Beans do not support the use of "
"<literal>@PersistenceContext(type=EXTENDED)</literal>."
-msgstr "enterprise 및 simple Web Beans는 Java EE 리소스 삽입, EJB 및 JPA 영구적 컨텍스에 대해 <literal>@Resource</literal>, <literal>@EJB</literal> 및 <literal>@PersistenceContext</literal>의 사용을 각각 지원합니다. Simple Web Beans는 <literal>@PersistenceContext(type=EXTENDED)</literal>의 사용을 지원하지 않습니다. "
+msgstr "엔터프라이즈 및 심플 Web Beans는 Java EE 리소스 삽입, EJB 및 JPA 영구적 컨텍스에 대해 <literal>@Resource</literal>, <literal>@EJB</literal> 및 <literal>@PersistenceContext</literal>의 사용을 각각 지원합니다. 심플 Web Beans는 <literal>@PersistenceContext(type=EXTENDED)</literal>의 사용을 지원하지 않습니다. "
#. Tag: para
#: injection.xml:434
Modified: doc/trunk/reference/ko-KR/interceptors.po
===================================================================
--- doc/trunk/reference/ko-KR/interceptors.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/interceptors.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: interceptors\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-19 01:00+1000\n"
+"PO-Revision-Date: 2009-01-23 11:10+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -18,6 +18,8 @@
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
"\n"
+"\n"
+"\n"
#. Tag: title
#: interceptors.xml:4
@@ -220,7 +222,7 @@
msgid ""
"All Web Beans interceptors are simple Web Beans, and can take advantage of "
"dependency injection and contextual lifecycle management."
-msgstr "모든 Web Beans 인터셉터는 단순한 Web Beans으로, 의존성 삽입및 컨텍스트 수명 주기 관리의 장점을 취할 수 있습니다. "
+msgstr "모든 Web Beans 인터셉터는 심플 Web Beans으로, 의존성 삽입및 컨텍스트 수명 주기 관리의 장점을 취할 수 있습니다. "
#. Tag: programlisting
#: interceptors.xml:81
@@ -302,7 +304,7 @@
#: interceptors.xml:105
#, no-c-format
msgid "it lets us enable or disable interceptor classes at deployment time."
-msgstr "배포시 인터셉터 클래스를 활성화 또는 비활성화하게 합니다. "
+msgstr "배치시 인터셉터 클래스를 활성화 또는 비활성화하게 합니다. "
#. Tag: para
#: interceptors.xml:109
@@ -613,7 +615,7 @@
"The <literal>@Interceptors</literal> annotation defined by the EJB "
"specification is supported for both enterprise and simple Web Beans, for "
"example:"
-msgstr "EJB 사양에 의해 정의된 <literal>@Interceptors</literal> 어노테이션은 엔터프라이즈 및 단순 Web Beans 모두를 지원합니다. 예: "
+msgstr "EJB 사양에 의해 정의된 <literal>@Interceptors</literal> 어노테이션은 엔터프라이즈 및 심플 Web Beans 모두를 지원합니다. 예: "
#. Tag: programlisting
#: interceptors.xml:200
Modified: doc/trunk/reference/ko-KR/intro.po
===================================================================
--- doc/trunk/reference/ko-KR/intro.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/intro.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: intro\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-23 02:16+1000\n"
+"PO-Revision-Date: 2009-01-23 11:17+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -21,6 +21,8 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
#. Tag: title
#: intro.xml:4
@@ -88,7 +90,7 @@
"The second existing class is a stateless session bean front-end for an "
"external system that is able to translate sentences from one language to "
"another:"
-msgstr "두 번째 클래스는 하나의 언어에서 다른 언어로 문장을 번역할 수 있는 외부 시스템에 대한 상태 유지 세션 빈 프론트엔드입니다: "
+msgstr "두 번째 클래스는 하나의 언어에서 다른 언어로 문장을 번역할 수 있는 외부 시스템에 대한 무상태 세션 빈 프론트엔드입니다: "
#. Tag: programlisting
#: intro.xml:35
@@ -879,7 +881,7 @@
"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 "심플 Web Bean에 의해 직접적 또는 간접적으로 구현되는 모든 인터페이스는 API 유형의 심플 Web Bean입니다. 클래스 및 상위클래스도 API 유형이 됩니다. "
#. Tag: title
#: intro.xml:358
@@ -1094,13 +1096,13 @@
"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 "방식 반환 유형 및 직접적이나 간접적으로 확장/구현하는 모든 인터페이스 API 유형의 생산자 방식입니다. 반환 유형이 클래스일 경우 모든 상위클래스도 API 유형이 됩니다. "
#. Tag: para
#: intro.xml:445
#, no-c-format
msgid "Some producer methods return objects that require explicit destruction:"
-msgstr ""
+msgstr "일부 생산자 방식은 명시적 파괴를 요청하는 객체를 반환합니다: "
#. Tag: programlisting
#: intro.xml:447
@@ -1120,7 +1122,7 @@
msgid ""
"These producer methods may define matching <emphasis>disposal methods</"
"emphasis>:"
-msgstr ""
+msgstr "이러한 생산자 방식은 <emphasis>폐지 방식</emphasis>과 일치하게 정의될 수 있습니다: "
#. Tag: programlisting
#: intro.xml:451
@@ -1140,7 +1142,7 @@
msgid ""
"This disposal method is called automatically by the Web Bean manager at the "
"end of the request."
-msgstr ""
+msgstr "이러한 폐지 방식은 요청 마지막에 Web Bean 관리자에 의해 자동으로 호출됩니다. "
#. Tag: para
#: intro.xml:456
@@ -1148,13 +1150,13 @@
msgid ""
"We'll talk much more about producer methods in <xref linkend="
"\"producermethods\"/>."
-msgstr ""
+msgstr "<xref linkend=\"producermethods\"/>에서 생산자 방식에 관해 보다 자세하게 다룹니다. "
#. Tag: title
#: intro.xml:461
#, no-c-format
msgid "JMS endpoints"
-msgstr ""
+msgstr "JMS 엔드포인트 "
#. Tag: para
#: intro.xml:463
@@ -1164,5 +1166,5 @@
"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 "마지막으로, JMS 큐 또는 토픽은 Web Bean이 될 수 있습니다. Web Beans는 큐 및 토픽에 메세지를 전달하기 위해 필요한 모든 다양한 JMS 객체의 수명주기 관리에 있어서 개발자에게 단조로움을 완화시킵니다. <xref linkend=\"jms\"/>에서 JMS 엔드포인트를 다루게 됩니다. "
Modified: doc/trunk/reference/ko-KR/part1.po
===================================================================
--- doc/trunk/reference/ko-KR/part1.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/part1.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: part1\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-12 14:19+1000\n"
+"PO-Revision-Date: 2009-01-23 11:18+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -17,6 +17,8 @@
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
+"\n"
+"\n"
#. Tag: para
#: part1.xml:5
@@ -42,8 +44,8 @@
"an improved lifecycle for stateful components, bound to well-defined "
"<emphasis>contexts</emphasis>,"
msgstr ""
-"명확하게 정의된 <emphasis>컨텍스트</emphasis>에 바인딩된 상태 기반 구성 요소"
-"의 수명 주기 개선 "
+"명확하게 정의된 <emphasis>컨텍스트</emphasis>에 바인딩된 상태 유지 구성 요소"
+"의 수명 주기 개선 "
#. Tag: para
#: part1.xml:18
@@ -125,8 +127,8 @@
"how can I add an indirection layer, so that the implementation of this "
"object can vary at deployment time?"
msgstr ""
-"어떻게 하면 우회 계층을 추가하여, 이러한 개체 구현을 배포시 다르게할 수 있을"
-"까요? "
+"어떻게 하면 우회 계층을 추가하여, 이러한 개체 구현을 배치시 다르게할 수 있을"
+"까요? "
#. Tag: para
#: part1.xml:61
@@ -146,7 +148,7 @@
"scenario, without affecting any client."
msgstr ""
"Web Bean은 의존하는 다른 Web Beans의 유형 및 시멘틱 만을 지정합니다. 이는 의존하는 다른 Web Bean 클라이언트 또는 스레딩 모델, 실제적인 수명 주기, 구체적 "
-"구현 방식을 인식할 필요가 없습니다. 더 나아가 이는 의존하는 스레팅 모델, 수명 주기, 구체적 구현 방식은 클라이언트에게 영향을 미치지 않고 운용 방식에 따라 달라질 수 있습니다. "
+"구현 방식을 인식할 필요가 없습니다. 더 나아가 이는 의존하는 스레딩 모델, 수명 주기, 구체적 구현 방식은 클라이언트에게 영향을 미치지 않고 운용 방식에 따라 달라질 수 있습니다. "
#. Tag: para
#: part1.xml:72
@@ -240,7 +242,7 @@
"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는 Seam, Guice, Spring을 포함하여 다수의 기존 Java 프레임워크에 의해 영향을 받았지만 Web Beans은 자체적으로 다음과 같은 고유한 기능을 소유하고 있습니다: Seam 보다 더 타입 안정적, 보다 더 상태 기반적, Spring 보다 덜 XML-중심, Guice 보다 더 웹 및 엔터프라이즈-애플리케이션 기능 "
+msgstr "Web Beans는 Seam, Guice, Spring을 포함하여 다수의 기존 Java 프레임워크에 의해 영향을 받았지만 Web Beans은 자체적으로 다음과 같은 고유한 기능을 소유하고 있습니다: Seam 보다 더 타입 안정적, 보다 더 상태 기반적, Spring 보다 덜 XML-중심, Guice 보다 더 웹 및 엔터프라이즈-애플리케이션 기능 "
#. Tag: para
#: part1.xml:125
Modified: doc/trunk/reference/ko-KR/part2.po
===================================================================
--- doc/trunk/reference/ko-KR/part2.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/part2.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: part2\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-12 17:53+1000\n"
+"PO-Revision-Date: 2009-01-23 11:18+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -16,6 +16,8 @@
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
+"\n"
+"\n"
#. Tag: para
#: part2.xml:5
@@ -29,7 +31,7 @@
#: part2.xml:10
#, no-c-format
msgid "<emphasis>deployment types</emphasis> enable deployment time polymorphism,"
-msgstr "<emphasis>배포 유형</emphasis>은 배포 시간 다형성을 활성화합니다 "
+msgstr "<emphasis>배치 유형</emphasis>은 배치 시간 다형성을 활성화합니다 "
#. Tag: para
#: part2.xml:14
@@ -53,7 +55,7 @@
"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 "이러한 기술로 클라이언트 및 서버의 느슨한 연결을 활성화할 수 있습니다. 클라이언트는 더이상 API 구현으로 바운딩할 수 없으며, 서버 객체의 수명주기를 관리할 수 없습니다. 이러한 접근으로 <emphasis>상태 기반 객체가 서비스하는 것 처럼 상호 작용</emphasis>하게 합니다. "
+msgstr "이러한 기술로 클라이언트 및 서버의 느슨한 연결을 활성화할 수 있습니다. 클라이언트는 더이상 API 구현으로 바운딩할 수 없으며, 서버 객체의 수명주기를 관리할 수 없습니다. 이러한 접근으로 <emphasis>상태 유지 객체가 서비스하는 것 처럼 상호 작용</emphasis>하게 합니다. "
#. Tag: para
#: part2.xml:28
Modified: doc/trunk/reference/ko-KR/part3.po
===================================================================
--- doc/trunk/reference/ko-KR/part3.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/part3.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,14 +8,14 @@
"Project-Id-Version: part3\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-15 20:53+0100\n"
-"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
+"PO-Revision-Date: 2009-01-23 11:11+1000\n"
+"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
-"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
#. Tag: para
#: part3.xml:5
@@ -105,7 +105,7 @@
#: 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 "Web Beans의 <emphasis>전형적인 역할</emphasis>은 이러한 기능에 한 단계 더 나아갑니다. 전형적인 역할은 애플리케이션 구조에서의 일반적인 <emphasis>역할</emphasis>을 모델로 합니다. 이는 범위, 인터셉터 바인딩, 배포 유형 등과 같은 다양한 역할의 속성으로 다시 사용 가능한 단일 패키지로 캡슐화합니다. "
+msgstr "Web Beans의 <emphasis>전형적인 역할</emphasis>은 이러한 기능에 한 단계 더 나아갑니다. 전형적인 역할은 애플리케이션 구조에서의 일반적인 <emphasis>역할</emphasis>을 모델로 합니다. 이는 범위, 인터셉터 바인딩, 배치 유형 등과 같은 다양한 역할의 속성으로 다시 사용 가능한 단일 패키지로 캡슐화합니다. "
#. Tag: para
#: part3.xml:66
Modified: doc/trunk/reference/ko-KR/producermethods.po
===================================================================
--- doc/trunk/reference/ko-KR/producermethods.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/producermethods.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: producermethods\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-15 13:59+1000\n"
+"PO-Revision-Date: 2009-01-23 11:12+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -17,6 +17,7 @@
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n\n"
"\n"
+"\n"
#. Tag: title
#: producermethods.xml:5
@@ -91,7 +92,7 @@
"<blockquote> <para> Web Beans 생산자 방식은 삽입될 객체 소스로 작동합니다, 여기서 </para> <itemizedlist> <listitem> <para> 삽입될 객체는 Web Beans의 인스턴스가 될 필요가 없습니다,</para> </listitem> <listitem> <para> 삽입되야 할 객체의 구체적 타입은 런타임 시 달라질 수 있습니다 </para> </listitem> <listitem> <para> 사용자 정의 초기화가 필요한 객체는 Web Bean 생성자에 의해 실행되지 않습니다</para> </listitem> </itemizedlist> </blockquote> <para> 예를 들어, 생산자 방식은 다음을 허용합니다: </para> <itemizedlist> <listitem> "
"<para>Web Bean으로서 JPA 엔티티 노출,</para> </listitem> <listitem> "
"<para>Web Bean으로서 JDK 클래스 노출,</para> </listitem> <listitem> "
-"<para>동일한 구현 클래스에 대해 다른 범위 또는 초기화를 사용하여 여러 Web Beans를 정의, </para> </listitem> <listitem> <para>런타임 시 다양한 API 유형 구현.</para> </listitem> </itemizedlist> <para> 특히, 생산자 방식은 Web Beans를 사용하여 런타임 다형성을 사용하게 합니다. 이미 알고 있듯이, 배포 유형은 배포 시간 다형성 문제의 강력한 해결책입니다. 하지만 일단 시스템이 운용되면 Web Bean 구현은 고정됩니다. 생산자 방식은 이러한 한계를 갖지 않습니다:</para> <programlisting role=\"JAVA\"><![CDATA"
+"<para>동일한 구현 클래스에 대해 다른 범위 또는 초기화를 사용하여 여러 Web Beans를 정의, </para> </listitem> <listitem> <para>런타임 시 다양한 API 유형 구현.</para> </listitem> </itemizedlist> <para> 특히, 생산자 방식은 Web Beans를 사용하여 런타임 다형성을 사용하게 합니다. 이미 알고 있듯이, 배치 유형은 배치 시간 다형성 문제의 강력한 해결책입니다. 하지만 일단 시스템이 운용되면 Web Bean 구현은 고정됩니다. 생산자 방식은 이러한 한계를 갖지 않습니다:</para> <programlisting role=\"JAVA\"><![CDATA"
"[@SessionScoped\n"
"public class Preferences {\n"
" \n"
Modified: doc/trunk/reference/ko-KR/ri.po
===================================================================
--- doc/trunk/reference/ko-KR/ri.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/ri.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: ri\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-18 16:31+0000\n"
-"PO-Revision-Date: 2009-01-21 13:50+1000\n"
+"PO-Revision-Date: 2009-01-23 11:14+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -21,6 +21,8 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
#. Tag: title
#: ri.xml:4
@@ -49,7 +51,7 @@
"<literal>webbeans-numberguess</literal>, a war example, containing only "
"simple beans, and <literal>webbeans-translator</literal> an ear example, "
"containing enterprise beans. To run the examples you'll need the following:"
-msgstr "Web Beans RI는 배포 가능한 두 가지 애플리케이션 예로 되어 있습니다: war 예에는 단순한 beans 만이 들어 있는 <literal>webbeans-numberguess</literal>가 있고 ear 예에는 엔터프라이즈 beans가 들어 있는 <literal>webbeans-translator</literal>가 있습니다. 예를 실행하려면, 다음 사항이 필요합니다: "
+msgstr "Web Beans RI는 배치 가능한 두 가지 애플리케이션 예로 되어 있습니다: war 예에는 심플 beans 만이 들어 있는 <literal>webbeans-numberguess</literal>가 있고 ear 예에는 엔터프라이즈 beans가 들어 있는 <literal>webbeans-translator</literal>가 있습니다. 예를 실행하려면, 다음 사항이 필요합니다: "
#. Tag: para
#: ri.xml:22
@@ -189,7 +191,7 @@
#: ri.xml:88
#, no-c-format
msgid "Now, you're ready to deploy your first example!"
-msgstr "이제, 첫번째 예제를 배포할 준비가 되었습니다! "
+msgstr "이제, 첫번째 예제를 배치할 준비가 되었습니다! "
#. Tag: para
#: ri.xml:93
@@ -201,7 +203,7 @@
#: ri.xml:99
#, no-c-format
msgid "<literal>ant restart</literal> - deploy the example in exploded format"
-msgstr "<literal>ant restart</literal> - exploded format으로 예제를 배포합니다 "
+msgstr "<literal>ant restart</literal> - exploded 형식으로 예제를 배치합니다 "
#. Tag: para
#: ri.xml:105
@@ -209,13 +211,13 @@
msgid ""
"<literal>ant explode</literal> - update an exploded example, without "
"restarting the deployment"
-msgstr "<literal>ant explode</literal> - 배포 버전을 다시 시작하지 않고 exploded 예제를 업데이트합니다 "
+msgstr "<literal>ant explode</literal> - 배치 버전을 다시 시작하지 않고 exploded 예제를 업데이트합니다 "
#. Tag: para
#: ri.xml:111
#, no-c-format
msgid "<literal>ant deploy</literal> - deploy the example in compressed jar format"
-msgstr "<literal>ant deploy</literal> - 압축된 jar 포맷으로 예제를 배포합니다 "
+msgstr "<literal>ant deploy</literal> - 압축된 jar 포맷으로 예제를 배치합니다 "
#. Tag: para
#: ri.xml:116
@@ -233,7 +235,7 @@
#: ri.xml:128
#, no-c-format
msgid "To deploy the numberguess example:"
-msgstr "numberguess 예제를 배포하려면: "
+msgstr "numberguess 예제를 배치하려면: "
#. Tag: programlisting
#: ri.xml:132
@@ -252,8 +254,8 @@
"Wait for the application to deploy, and enjoy hours of fun at <ulink url="
"\"http://localhost:8080/webbeans-numberguess\"></ulink>!"
msgstr ""
-"애플리케이션이 배포되면 <ulink url="
-"\"http://localhost:8080/webbeans-numberguess\"></ulink>에서 살펴보시기 바랍니다! "
+"애플리케이션이 배치되면 <ulink url="
+"\"http://localhost:8080/webbeans-numberguess\"></ulink>에서 살펴보시기 바랍니다! "
#. Tag: para
#: ri.xml:139
@@ -263,7 +265,7 @@
"text into Latin. The numberguess example is a war example, and uses only "
"simple beans; the translator example is an ear example, and includes "
"enterprise beans, packaged in an EJB module. To try it out:"
-msgstr "Web Beans RI에는 텍스트를 라틴어로 번역하는 두 번째 예제가 있습니다. numberguess 예제는 war 예제로 단순한 beans 만을 사용합니다; 번역 예제는 ear 예제로 엔터프라이즈 beans에 포함되어 EJB 모듈에 패키지되어 있습니다. 이를 꺼내려면 다음을 실행합니다: "
+msgstr "Web Beans RI에는 텍스트를 라틴어로 번역하는 두 번째 예제가 있습니다. numberguess 예제는 war 예제로 심플 beans 만을 사용합니다; 번역 예제는 ear 예제로 엔터프라이즈 beans에 포함되어 EJB 모듈에 패키지되어 있습니다. 이를 꺼내려면 다음을 실행합니다: "
#. Tag: programlisting
#: ri.xml:146
@@ -282,8 +284,8 @@
"Wait for the application to deploy, and visit <ulink url=\"http://"
"localhost:8080/webbeans-translator\"></ulink>!"
msgstr ""
-"애플리케이션이 배포되면 <ulink url=\"http://"
-"localhost:8080/webbeans-translator\"></ulink>에 가보십시오! "
+"애플리케이션이 배치되면 <ulink url=\"http://"
+"localhost:8080/webbeans-translator\"></ulink>에 가보십시오! "
#. Tag: title
#: ri.xml:154
@@ -1182,9 +1184,9 @@
"quite familiar with what a Web Bean looks like by now, so we'll just "
"highlight the most interesting bits here."
msgstr ""
-"가장 흥미로운 코드 부분은 마지막을 위해 남겨두겠습니다! 프로젝트에는 두 개의 단순한 beans인 <literal>SentenceParser</literal> 및 <literal>TextTranslator</"
+"가장 흥미로운 코드 부분은 마지막을 위해 남겨두겠습니다! 프로젝트에는 두 개의 심플 beans인 <literal>SentenceParser</literal> 및 <literal>TextTranslator</"
"literal>와 두 개의 엔터프라이즈 beans인 <literal>TranslatorControllerBean</"
-"literal> 및 <literal>SentenceTranslator</literal>가 있습니다. 이제 Web Bean에 관해 보다 많이 알고 계실 것이므로, 가장 중요한 부분만 여기서 다루겠습니다. "
+"literal> 및 <literal>SentenceTranslator</literal>가 있습니다. 이제 Web Bean에 관해 보다 많이 알고 계실 것이므로, 가장 중요한 부분만 여기서 다루겠습니다. "
#. Tag: para
#: ri.xml:411
Modified: doc/trunk/reference/ko-KR/specialization.po
===================================================================
--- doc/trunk/reference/ko-KR/specialization.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/specialization.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: specialization\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-20 01:34+1000\n"
+"PO-Revision-Date: 2009-01-23 11:14+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,6 +20,9 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
+"\n"
#. Tag: title
#: specialization.xml:4
@@ -35,7 +38,7 @@
"<emphasis>override</emphasis> the implementation of an API at deployment "
"time. For example, the following enterprise Web Bean provides an "
"implementation of the API <literal>PaymentProcessor</literal> in production:"
-msgstr "이미 Web Beans 의존성 삽입 모델은 배포시 API 구현을 <emphasis>덮어쓰기</emphasis> 하게 합니다. 예를 들어, 다음과 같은 엔터프라이즈 Web Bean은 제품에서 API <literal>PaymentProcessor</literal> 구현을 제공합니다: "
+msgstr "이미 Web Beans 의존성 삽입 모델은 배치시 API 구현을 <emphasis>덮어쓰기</emphasis> 하게 합니다. 예를 들어, 다음과 같은 엔터프라이즈 Web Bean은 제품에서 API <literal>PaymentProcessor</literal> 구현을 제공합니다: "
#. Tag: programlisting
#: specialization.xml:11
@@ -174,7 +177,7 @@
msgid ""
"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 "특성화는 단순한 Web Beans 및 엔터프라이즈 Web Beans에만 있는 기능입니다. 특성화 기능을 사용하려면 높은 우선 순위의 Web Bean은 다음 사항을 따라야 합니다: "
+msgstr "특성화는 심플 Web Beans 및 엔터프라이즈 Web Beans에만 있는 기능입니다. 특성화 기능을 사용하려면 높은 우선 순위의 Web Bean은 다음 사항을 따라야 합니다: "
#. Tag: para
#: specialization.xml:65
@@ -189,7 +192,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 "덮어쓰기할 Web Bean이 단순한 Web Bean일 경우 단순한 Web Bean이 되어야 하고 또는 덮어쓰기 할 Web Bean이 엔터프라이즈 Web Bean일 경우 엔터프라이즈 Web Bean이 되어야 합니다 "
+msgstr "덮어쓰기할 Web Bean이 심플 Web Bean일 경우 심플 Web Bean이 되어야 하고 또는 덮어쓰기 할 Web Bean이 엔터프라이즈 Web Bean일 경우 엔터프라이즈 Web Bean이 되어야 합니다 "
#. Tag: para
#: specialization.xml:73
@@ -219,7 +222,7 @@
msgid ""
"We say that the higher-priority Web Bean <emphasis>specializes</emphasis> "
"its superclass."
-msgstr "높은 우선 순위의 Web Bean이 해당 슈퍼클래스(superclass)를 <emphasis>특성화</emphasis>한다고 합니다. "
+msgstr "높은 우선 순위의 Web Bean이 해당 상위클래스를 <emphasis>특성화</emphasis>한다고 합니다. "
#. Tag: title
#: specialization.xml:85
@@ -240,8 +243,8 @@
"the binding types of the superclass are automatically inherited by the Web "
"Bean annotated <literal>@Specializes</literal>, and"
msgstr ""
-"슈퍼클래스의 바인딩 유형은 <literal>@Specializes</literal>로 어노테이션된 Web "
-"Bean에 의해 자동으로 상속됩니다 "
+"상위클래스의 바인딩 유형은 <literal>@Specializes</literal>로 어노테이션된 Web "
+"Bean에 의해 자동으로 상속됩니다 "
#. Tag: para
#: specialization.xml:95
@@ -250,8 +253,8 @@
"the Web Bean name of the superclass is automatically inherited by the Web "
"Bean annotated <literal>@Specializes</literal>, and"
msgstr ""
-"슈퍼클래스의 Web Bean 이름은 <literal>@Specializes</literal>로 어노테이션된 Web "
-"Bean에 의해 자동으로 상속됩니다 "
+"상위클래스의 Web Bean 이름은 <literal>@Specializes</literal>로 어노테이션된 Web "
+"Bean에 의해 자동으로 상속됩니다 "
#. Tag: para
#: specialization.xml:99
@@ -260,7 +263,7 @@
"producer methods, disposal methods and observer methods declared by the "
"superclass are called upon an instance of the Web Bean annotated "
"<literal>@Specializes</literal>."
-msgstr "슈퍼클래스에 의해 명시된 생산자 방식, 폐지 방식 및 옵저버 방식은 <literal>@Specializes</literal>로 어노테이션된 Web Bean 인스턴스를 호출합니다. "
+msgstr "상위클래스에 의해 명시된 생산자 방식, 폐지 방식 및 옵저버 방식은 <literal>@Specializes</literal>로 어노테이션된 Web Bean 인스턴스를 호출합니다. "
#. Tag: para
#: specialization.xml:105
@@ -284,7 +287,7 @@
"all API types of the superclass are API types of the Web Bean annotated "
"<literal>@Specializes</literal> (all local interfaces of the superclass "
"enterprise bean are also local interfaces of the subclass),"
-msgstr "슈퍼클래스의 모든 API 유형은 <literal>@Specializes</literal>로 어노테이션된 Web Bean의 API 유형입니다 (슈퍼클래스 엔터프라이즈 bean의 모든 로컬 인터페이스는 하부클래스의 로컬 인터페이스도 됩니다) "
+msgstr "상위클래스의 모든 API 유형은 <literal>@Specializes</literal>로 어노테이션된 Web Bean의 API 유형입니다 (상위클래스 엔터프라이즈 빈의 모든 로컬 인터페이스는 하부클래스의 로컬 인터페이스도 됩니다) "
#. Tag: para
#: specialization.xml:119
@@ -293,13 +296,13 @@
"the deployment type of the Web Bean annotated <literal>@Specializes</"
"literal> has a higher precedence than the deployment type of the superclass, "
"and"
-msgstr "<literal>@Specializes</literal>로 어노테이션된 Web Bean의 배치 유형은 슈퍼클래스의 배치 유형보다 높은 우선 순위를 갖습니다 "
+msgstr "<literal>@Specializes</literal>로 어노테이션된 Web Bean의 배치 유형은 상위클래스의 배치 유형보다 높은 우선 순위를 갖습니다 "
#. Tag: para
#: specialization.xml:124
#, no-c-format
msgid "there is no other enabled Web Bean that also specializes the superclass."
-msgstr "슈퍼클래스를 특성화하는 활성화된 Web Bean이 없습니다. "
+msgstr "상위클래스를 특성화하는 활성화된 Web Bean이 없습니다. "
#. Tag: para
#: specialization.xml:129
@@ -316,5 +319,5 @@
"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."
-msgstr "따라서, <literal>@Specializes</literal>라고 어노테이션된 Web Bean이 배치되어 활성화된 시스템의 어떤 배치에서도 슈퍼클래스는 <emphasis>절대로</emphasis> 호출되지 않음을 확인할 수 있습니다. "
+msgstr "따라서, <literal>@Specializes</literal>라고 어노테이션된 Web Bean이 배치되어 활성화된 시스템의 어떤 배치에서도 상위클래스는 <emphasis>절대로</emphasis> 호출되지 않음을 확인할 수 있습니다. "
Modified: doc/trunk/reference/ko-KR/xml.po
===================================================================
--- doc/trunk/reference/ko-KR/xml.po 2009-01-23 00:56:43 UTC (rev 1186)
+++ doc/trunk/reference/ko-KR/xml.po 2009-01-23 01:21:07 UTC (rev 1187)
@@ -8,7 +8,7 @@
"Project-Id-Version: xml\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-06 11:30+0000\n"
-"PO-Revision-Date: 2009-01-18 18:00+1000\n"
+"PO-Revision-Date: 2009-01-23 11:16+1000\n"
"Last-Translator: Eunju Kim <eukim(a)redhat.com>\n"
"Language-Team: Korean <ko(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -20,6 +20,8 @@
"\n"
"\n"
"\n"
+"\n"
+"\n"
#. Tag: title
#: xml.xml:4
@@ -151,7 +153,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 "<literal>Date</literal>는 단순한 Web Bean임을 명시해야 할 모든 코드입니다! <literal>Date</literal>의 인스턴스는 기타 다른 Web Bean에 의해 삽입될 수 있습니다: "
+msgstr "<literal>Date</literal>는 심플 Web Bean임을 명시해야 할 모든 코드입니다! <literal>Date</literal>의 인스턴스는 기타 다른 Web Bean에 의해 삽입될 수 있습니다: "
#. Tag: programlisting
#: xml.xml:62
@@ -171,7 +173,7 @@
msgid ""
"We can declare the scope, deployment type and interceptor binding types "
"using direct child elements of the Web Bean declaration:"
-msgstr "Web Bean 명시의 직접적인 자식 요소를 사용하여 범위, 배포 유형, 인터셉터 바인딩 유형을 명시할 수 있습니다: "
+msgstr "Web Bean 명시의 직접적인 자식 요소를 사용하여 범위, 배치 유형, 인터셉터 바인딩 유형을 명시할 수 있습니다: "
#. Tag: programlisting
#: xml.xml:72
@@ -277,7 +279,7 @@
msgid ""
"Interceptors and decorators are just simple Web Beans, so they may be "
"declared just like any other simple Web Bean:"
-msgstr "인터셉터 및 데코레이터는 간단한 Web Beans이므로, 기타 다른 간단한 Web Bean같이 나타낼 수 있습니다: "
+msgstr "인터셉터 및 데코레이터는 심플 Web Beans이므로, 기타 다른 심플 Web Bean같이 나타낼 수 있습니다: "
#. Tag: programlisting
#: xml.xml:90
@@ -352,7 +354,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 "<literal><Name></literal> 요소는 초기화 영역값 설정과 함께 <literal>@Dependent</literal> 범위의 간단한 Web Bean 및 <literal>Name</literal> 클래스를 명시합니다. Web Bean은 특정한 컨테이너 생성 바인딩이 있으므로 명시된 특정 삽입 지점에만 삽입할 수 있습니다. "
+msgstr "<literal><Name></literal> 요소는 초기화 영역값 설정과 함께 <literal>@Dependent</literal> 범위의 심플 Web Bean 및 <literal>Name</literal> 클래스를 명시합니다. Web Bean은 특정한 컨테이너 생성 바인딩이 있으므로 명시된 특정 삽입 지점에만 삽입할 수 있습니다. "
#. Tag: para
#: xml.xml:116
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1186 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-22 19:56:43 -0500 (Thu, 22 Jan 2009)
New Revision: 1186
Removed:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
Log:
Merged ContextTest and ContextManagementTest, implemented testGetContextWithNoRegisteredContextsFails()
Deleted: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java 2009-01-23 00:52:16 UTC (rev 1185)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextManagementTest.java 2009-01-23 00:56:43 UTC (rev 1186)
@@ -1,75 +0,0 @@
-package org.jboss.webbeans.tck.unit.context;
-
-import javax.webbeans.ContextNotActiveException;
-
-import org.jboss.webbeans.tck.AbstractTest;
-import org.jboss.webbeans.tck.impl.SpecAssertion;
-import org.jboss.webbeans.tck.impl.SpecVersion;
-import org.testng.annotations.Test;
-
-/**
- *
- * @author Nicklas Karlsson
- *
- */
-@SpecVersion("20081206")
-public class ContextManagementTest extends AbstractTest
-{
- /**
- * For each of the built-in normal scopes, contexts propagate across any Java
- * method call, including invocation of EJB local business methods.
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6")
- public void testBuiltInNormalScopedContextsPropagateAcrossAnyJavaMethodCall()
- {
- assert false;
- }
-
- /**
- * The built-in contexts do not propagate across remote method invocations or
- * to asynchronous processes such as JMS message listeners or EJB timer
- * service timeouts
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6")
- public void testBuiltInNormalScopedContextsDoNotPropagateAcrossRemoteMethodInvocations()
- {
- assert false;
- }
-
- /**
- * The built-in contexts do not propagate across remote method invocations or
- * to asynchronous processes such as JMS message listeners or EJB timer
- * service timeouts
- */
- @Test(groups = { "stub", "contexts" })
- @SpecAssertion(section = "9.6")
- public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
- {
- assert false;
- }
-
- /**
- * If no active context object exists for the given scope type, getContext()
- * must throw a ContextNotActiveException.
- */
- @Test(groups = { "stub", "contexts" }, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "9.7")
- public void testGettingContextNotActiveFails()
- {
- assert false;
- }
-
- /**
- * If more than one active context object exists for the given scope type,
- * getContext() must throw an IllegalStateException.
- */
- @Test(groups = { "stub", "contexts" }, expectedExceptions = ContextNotActiveException.class)
- @SpecAssertion(section = "9.7")
- public void testGettingContextWithTooManyActiveFails()
- {
- assert false;
- }
-
-}
\ No newline at end of file
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-23 00:52:16 UTC (rev 1185)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/ContextTest.java 2009-01-23 00:56:43 UTC (rev 1186)
@@ -21,6 +21,11 @@
}
+ private @interface Unregistered
+ {
+
+ }
+
private static class DummyContext implements Context
{
@@ -37,10 +42,9 @@
public boolean isActive()
{
return true;
- }
+ }
+ }
- }
-
@Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
public void testGetContextWithNoActiveContextsFails()
{
@@ -58,11 +62,10 @@
manager.getContext(Dummy.class);
}
- @Test(expectedExceptions={ContextNotActiveException.class}, groups={"stub", "manager"}) @SpecAssertion(section="9.6")
+ @Test(expectedExceptions={ContextNotActiveException.class}, groups={"manager"}) @SpecAssertion(section="9.6")
public void testGetContextWithNoRegisteredContextsFails()
{
- manager.getContext(RequestScoped.class);
- assert false;
+ manager.getContext(Unregistered.class);
}
@Test(groups={"manager"}) @SpecAssertion(section="9.6")
@@ -71,4 +74,39 @@
manager.getContext(RequestScoped.class);
}
+ /**
+ * For each of the built-in normal scopes, contexts propagate across any Java
+ * method call, including invocation of EJB local business methods.
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6")
+ public void testBuiltInNormalScopedContextsPropagateAcrossAnyJavaMethodCall()
+ {
+ assert false;
+ }
+
+ /**
+ * The built-in contexts do not propagate across remote method invocations or
+ * to asynchronous processes such as JMS message listeners or EJB timer
+ * service timeouts
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6")
+ public void testBuiltInNormalScopedContextsDoNotPropagateAcrossRemoteMethodInvocations()
+ {
+ assert false;
+ }
+
+ /**
+ * The built-in contexts do not propagate across remote method invocations or
+ * to asynchronous processes such as JMS message listeners or EJB timer
+ * service timeouts
+ */
+ @Test(groups = { "stub", "contexts" })
+ @SpecAssertion(section = "9.6")
+ public void testBuiltInNormalScopedContextsDoNotPropagateAcrossAsynchronousMethodInvocations()
+ {
+ assert false;
+ }
+
}
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1185 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-22 19:52:16 -0500 (Thu, 22 Jan 2009)
New Revision: 1185
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
Log:
One more :-)
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-23 00:47:31 UTC (rev 1184)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-23 00:52:16 UTC (rev 1185)
@@ -216,8 +216,7 @@
@Override
protected void preCheckSpecialization()
{
- // Need to do getDeclaredMethod!
- if (declaringBean.getAnnotatedItem().getSuperclass().getMethod(getAnnotatedItem().getAnnotatedMethod()) == null)
+ if (declaringBean.getAnnotatedItem().getSuperclass().getDeclaredMethod(getAnnotatedItem().getAnnotatedMethod()) == null)
{
throw new DefinitionException("Specialized producer method does not override a method on the direct superclass");
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java 2009-01-23 00:47:31 UTC (rev 1184)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java 2009-01-23 00:52:16 UTC (rev 1185)
@@ -118,6 +118,8 @@
*/
public AnnotatedMethod<?> getMethod(Method method);
+ public AnnotatedMethod<?> getDeclaredMethod(Method method);
+
/**
* Gets all with parameters annotated with annotationType
*
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java 2009-01-23 00:47:31 UTC (rev 1184)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedClass.java 2009-01-23 00:52:16 UTC (rev 1185)
@@ -85,4 +85,9 @@
return delegate().isParameterizedType();
}
+ public AnnotatedMethod<?> getDeclaredMethod(Method method)
+ {
+ return delegate().getDeclaredMethod(method);
+ }
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java 2009-01-23 00:47:31 UTC (rev 1184)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedClassImpl.java 2009-01-23 00:52:16 UTC (rev 1185)
@@ -598,6 +598,19 @@
return null;
}
+ public AnnotatedMethod<?> getDeclaredMethod(Method method)
+ {
+ // TODO Cache?
+ for (AnnotatedMethod<?> annotatedMethod : declaredMethods)
+ {
+ if (annotatedMethod.getName().equals(method.getName()) && Arrays.equals(annotatedMethod.getParameterTypesAsArray(), method.getParameterTypes()))
+ {
+ return annotatedMethod;
+ }
+ }
+ return null;
+ }
+
/**
* Gets a string representation of the class
*
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-01-23 00:47:31 UTC (rev 1184)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-01-23 00:52:16 UTC (rev 1185)
@@ -96,7 +96,7 @@
deployBeans(FurnitureShop_Broken.class);
}
- @Test(groups="broken", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
public void testSpecializedMethodIndirectlyOverridesAnotherProducerMethod()
{
deployBeans(ShoeShop_Broken.class);
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1184 - tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-01-22 19:47:31 -0500 (Thu, 22 Jan 2009)
New Revision: 1184
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/HighSchool_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
Log:
Specialization and tests
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-23 00:46:28 UTC (rev 1183)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-23 00:47:31 UTC (rev 1184)
@@ -128,6 +128,12 @@
protected void init()
{
mergedStereotypes = new MergedStereotypes<T, E>(getAnnotatedItem().getMetaAnnotations(Stereotype.class));
+ if (isSpecializing())
+ {
+ preCheckSpecialization();
+ initSpecialization();
+ postCheckSpecialization();
+ }
initType();
initPrimitive();
log.debug("Building Web Bean bean metadata for " + getType());
@@ -139,12 +145,6 @@
initTypes();
initProxyable();
checkRequiredTypesImplemented();
- if (isSpecializing())
- {
- preCheckSpecialization();
- initSpecialization();
- postCheckSpecialization();
- }
}
/**
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 2009-01-23 00:46:28 UTC (rev 1183)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-01-23 00:47:31 UTC (rev 1184)
@@ -29,7 +29,6 @@
import javax.webbeans.DefinitionException;
import javax.webbeans.Dependent;
import javax.webbeans.Interceptor;
-import javax.webbeans.Specializes;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.bean.proxy.EnterpriseBeanProxyMethodHandler;
@@ -89,10 +88,6 @@
protected EnterpriseBean(AnnotatedClass<T> type, ManagerImpl manager)
{
super(type, manager);
- if (type.isAnnotationPresent(Specializes.class))
- {
- this.specializedBean = EnterpriseBean.of(type.getSuperclass(), manager);
- }
init();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-23 00:46:28 UTC (rev 1183)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-23 00:47:31 UTC (rev 1184)
@@ -24,6 +24,7 @@
import javax.webbeans.DefinitionException;
import javax.webbeans.Disposes;
import javax.webbeans.Observes;
+import javax.webbeans.Specializes;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.MetaDataCache;
@@ -213,10 +214,25 @@
}
@Override
+ protected void preCheckSpecialization()
+ {
+ // Need to do getDeclaredMethod!
+ if (declaringBean.getAnnotatedItem().getSuperclass().getMethod(getAnnotatedItem().getAnnotatedMethod()) == null)
+ {
+ throw new DefinitionException("Specialized producer method does not override a method on the direct superclass");
+ }
+ }
+
+ @Override
+ protected void initSpecialization()
+ {
+ this.specializedBean = ProducerMethodBean.of(declaringBean.getAnnotatedItem().getSuperclass().getMethod(getAnnotatedItem().getAnnotatedMethod()), SimpleBean.of(declaringBean.getAnnotatedItem().getSuperclass(), manager), manager);
+ }
+
+ @Override
public boolean isSpecializing()
{
- // TODO Auto-generated method stub
- return false;
+ return getAnnotatedItem().isAnnotationPresent(Specializes.class);
}
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-23 00:46:28 UTC (rev 1183)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-23 00:47:31 UTC (rev 1184)
@@ -30,7 +30,6 @@
import javax.webbeans.ExecutionException;
import javax.webbeans.Initializer;
import javax.webbeans.InjectionPoint;
-import javax.webbeans.Specializes;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.MetaDataCache;
@@ -105,10 +104,6 @@
protected SimpleBean(AnnotatedClass<T> type, ManagerImpl manager)
{
super(type, manager);
- if (type.isAnnotationPresent(Specializes.class))
- {
- this.specializedBean = SimpleBean.of(type.getSuperclass(), manager);
- }
init();
}
@@ -352,7 +347,7 @@
protected void preCheckSpecialization()
{
super.preCheckSpecialization();
- if (manager.getEjbDescriptorCache().containsKey(getSpecializedBean().getType()))
+ if (manager.getEjbDescriptorCache().containsKey(getAnnotatedItem().getSuperclass().getType()))
{
throw new DefinitionException("Simple bean must specialize a simple bean");
}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/HighSchool_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/HighSchool_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/HighSchool_Broken.java 2009-01-23 00:47:31 UTC (rev 1184)
@@ -1,12 +1,13 @@
package org.jboss.webbeans.tck.unit.inheritance.specialization.producer.method;
+import javax.webbeans.Named;
import javax.webbeans.Produces;
import javax.webbeans.Specializes;
class HighSchool_Broken extends School
{
- @Override @Produces @Specializes @AnotherDeploymentType
+ @Override @Produces @Specializes @AnotherDeploymentType @Named
public Pupil getStarPupil()
{
return super.getStarPupil();
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-01-23 00:46:28 UTC (rev 1183)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/inheritance/specialization/producer/method/ProducerMethodSpecializationTest.java 2009-01-23 00:47:31 UTC (rev 1184)
@@ -32,7 +32,7 @@
return deploymentTypes;
}
- @Test(groups="broken") @SpecAssertion(section = {"4.3.1", "3.4.5"})
+ @Test @SpecAssertion(section = {"4.3.1", "3.4.5"})
public void testSpecializingBeanHasBindingsOfSpecializedAndSpecializingBean()
{
deployBeans(JewelryShop.class);
@@ -41,7 +41,7 @@
assert annotationSetMatches( manager.resolveByType(Product.class, EXPENSIVE_LITERAL).iterator().next().getBindings(), Expensive.class, Sparkly.class);
}
- @Test(groups="broken") @SpecAssertion(section = {"4.3.1", "3.4.5"})
+ @Test @SpecAssertion(section = {"4.3.1", "3.4.5"})
public void testSpecializingBeanHasNameOfSpecializedBean()
{
deployBeans(JewelryShop.class);
@@ -49,39 +49,48 @@
assert manager.resolveByType(Product.class, new AnnotationLiteral<Sparkly>(){}).iterator().next().getName().equals("expensiveGift");
}
- @Test(groups="broken", expectedExceptions=DefinitionException.class) @SpecAssertion(section = "4.3.1")
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section = "4.3.1")
public void testSpecializingAndSpecializedBeanHasName()
{
- //deployBeans(HighSchool_Broken.class);
+ deployBeans(HighSchool_Broken.class);
}
- @Test(groups="broken") @SpecAssertion(section={"4.3.1", "3.4.5"})
- public void testSpecializedBeanNotInstantiated()
+ @Test @SpecAssertion(section={"4.3.1", "3.4.5"})
+ public void testSpecializedBeanNotInstantiated() throws Exception
{
deployBeans(JewelryShop.class, Shop.class);
- Product product = manager.getInstanceByType(Product.class, EXPENSIVE_LITERAL);
- assert product instanceof Necklace;
+ new RunInDependentContext()
+ {
+
+ @Override
+ protected void execute() throws Exception
+ {
+ Product product = manager.getInstanceByType(Product.class, EXPENSIVE_LITERAL);
+ assert product instanceof Necklace;
+ }
+
+ }.run();
}
- @Test(groups="broken", expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
public void testSpecializingBeanDoesNotHaveHigherPrecedenceThanSpecializedBean()
{
deployBeans(ClothesShop_Broken.class);
}
- @Test(groups="broken", expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
+ @Test(expectedExceptions=InconsistentSpecializationException.class) @SpecAssertion(section="4.3.1")
public void testTwoBeansSpecializeTheSameBean()
{
deployBeans(PictureShop_Broken.class, Bookshop_Broken.class);
}
- @Test(groups="broken", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
public void testSpecializedStaticMethod()
{
deployBeans(FurnitureShop_Broken.class);
}
- @Test(groups="broken", expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
+ @Test(expectedExceptions=DefinitionException.class) @SpecAssertion(section="3.4.5")
public void testSpecializedMethodDoesNotOverrideAnotherProducerMethod()
{
deployBeans(FurnitureShop_Broken.class);
16 years, 8 months
[webbeans-commits] Webbeans SVN: r1183 - in tck/trunk/impl/src/main/java/org/jboss/webbeans/tck: unit/context and 2 other directories.
by webbeans-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-01-22 19:46:28 -0500 (Thu, 22 Jan 2009)
New Revision: 1183
Added:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/City.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityBinding.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityInterface.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer2.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Espoo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Forssa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hamina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Helsinki.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hyvinkaa.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jamsa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Joensuu.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jyvaskyla.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kaarina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kotka_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kuopio_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Loviisa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Maarianhamina_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Mikkeli_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Nokia_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Peraseinajoki.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Porvoo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Raisio_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Salo_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Uusikaupunki_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vaasa.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vantaa_Broken.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation2.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java
tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java
Log:
refactored passivating tests
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java 2009-01-23 00:31:15 UTC (rev 1182)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/integration/context/passivating/PassivatingContextTest.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -1,13 +1,5 @@
package org.jboss.webbeans.tck.integration.context.passivating;
-import java.io.IOException;
-import java.util.Set;
-
-import javax.webbeans.DefinitionException;
-import javax.webbeans.IllegalProductException;
-import javax.webbeans.UnserializableDependencyException;
-import javax.webbeans.manager.Bean;
-
import org.jboss.webbeans.tck.AbstractTest;
import org.jboss.webbeans.tck.impl.SpecAssertion;
import org.jboss.webbeans.tck.impl.SpecVersion;
@@ -33,440 +25,8 @@
deployBeans(Turku.class);
}
- /**
- * Simple Web Beans are not required to be serializable. If a simple Web Bean
- * declares a passivating scope, and the implementation class is not
- * serializable, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = DefinitionException.class)
- @SpecAssertion(section = "9.5")
- public void testSimpleWebBeanWithNonSerializableImplementationClassFails()
- {
- deployBeans(Hamina_Broken.class);
- }
/**
- * Simple Web Beans are not required to be serializable. If a simple Web Bean
- * declares a passivating scope, and the implementation class is not
- * serializable, a DefinitionException is thrown by the Web Bean manager at
- * initialization time.
- */
- @Test(groups = {"contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testSimpleWebBeanWithSerializableImplementationClassOK()
- {
- createSimpleBean(Jyvaskyla.class);
- }
-
- /**
- * the Web Bean declares a passivating scope type, and context passivation
- * occurs, or
- *
- * @throws IOException
- * @throws ClassNotFoundException
- */
- @Test(groups = { "contexts", "passivation" , "stub" })
- @SpecAssertion(section = "9.5")
- public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
- {
- assert false;
- }
-
- @SuppressWarnings("unchecked")
- private <T> boolean testSerialize(Bean<T> bean) throws IOException, ClassNotFoundException
- {
- manager.addBean(bean);
- T instance = manager.getInstance(bean);
- byte[] data = serialize(instance);
- T resurrected = (T) deserialize(data);
- return resurrected.toString().equals(instance.toString());
- }
-
- /**
- * the Web Bean is an EJB stateful session bean, and it is passivated by the
- * EJB container.
- *
- * @throws ClassNotFoundException
- * @throws IOException
- */
- // TODO requires an EJB instance
- @Test(groups = { "contexts", "passivation", "broken", "stub" })
- @SpecAssertion(section = "9.5")
- public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
- {
- assert false;
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentInterceptorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- deployBeans(Kaarina_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentDecoratorsOfStatefulEnterpriseBeanMustBeSerializable()
- {
- deployBeans(Porvoo_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentInterceptorsOfWebBeanWithPassivatingScopeMustBeSerializable()
- {
- deployBeans(Kotka_Broken.class);
- }
-
- /**
- * On the other hand, dependent objects (including interceptors and
- * decorators with scope @Dependent) of a stateful session bean or of a Web
- * Bean with a passivating scope must be serialized and deserialized along
- * with their owner
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentDecoratorsOfWebBeansWithPassivatingScopeMustBeSerializable()
- {
- deployBeans(Raisio_Broken.class);
- }
-
- /**
- * EJB local objects are serializable. Therefore, any reference to an
- * enterprise Web Bean of scope @Dependent is serializable.
- *
- * @throws ClassNotFoundException
- * @throws IOException
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
- {
- deployBeans(Vaasa.class, Helsinki.class);
- Set<Bean<Vaasa>> vaasaBeans = manager.resolveByType(Vaasa.class);
- assert vaasaBeans.size() == 1;
- assert testSerialize(vaasaBeans.iterator().next());
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
- {
- deployBeans(Violation.class, Espoo_Broken.class);
- manager.getInstanceByType(Espoo_Broken.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Vantaa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
- {
- createSimpleBean(Joensuu.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Loviisa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(Forssa_Broken.class, Violation.class);
- }
-
- /**
- * If a simple Web Bean of scope @Dependent and a non-serializable
- * implementation class is injected into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * UnserializableDependencyException must be thrown by the Web Bean manager
- * at initialization time.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
- @SpecAssertion(section = "9.5")
- public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- deployBeans(Peraseinajoki.class, Violation.class, Violation2.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- * @throws NoSuchMethodException
- * @throws SecurityException
- */
- @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
- {
- deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
- manager.getInstanceByType(Maarianhamina_Broken.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Nokia_Broken.class);
- manager.getInstanceByType(Nokia_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" })
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- createSimpleBean(CityProducer2.class);
- createSimpleBean(Hyvinkaa.class);
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Loviisa_Broken.class);
- manager.getInstanceByType(Loviisa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer2.class, Kuopio_Broken.class);
- manager.getInstanceByType(Kuopio_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" , "broken"}, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- // TODO Not quite sure what this test is doing
- //deployBeans(CityProducer3.class, Jamsa_Broken.class);
- //manager.getInstanceByType(Jamsa_Broken.class).ping();
- assert false;
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- *
- */
- @Test(groups = { "contexts", "passivation", "stub"}, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws Exception
- {
- // TODO This doesn't test injction in a SFSB, but into a Enterprise bean
- //deployBeans(CityProducer.class, Pietarsaari_Broken.class);
- //manager.getInstanceByType(Pietarsaari_Broken.class);
- assert false;
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Uusikaupunki_Broken.class);
- manager.getInstanceByType(Uusikaupunki_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation"})
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
- {
- deployBeans(CityProducer.class, Salo_Broken.class);
- manager.getInstanceByType(Salo_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Loviisa_Broken.class);
- manager.getInstanceByType(Loviisa_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
- {
- deployBeans(CityProducer.class, Mikkeli_Broken.class);
- manager.getInstanceByType(Mikkeli_Broken.class).ping();
- }
-
- /**
- * If a producer method or field of scope @Dependent returns a
- * non-serializable object for injection into a stateful session bean, into a
- * non-transient field, Web Bean constructor parameter or initializer method
- * parameter of a Web Bean which declares a passivating scope type, or into a
- * parameter of a producer method which declares a passivating scope type, an
- * IllegalProductException is thrown by the Web Bean manager.
- */
- @Test(groups = { "contexts", "passivation", "broken" }, expectedExceptions = IllegalProductException.class)
- @SpecAssertion(section = "9.5")
- public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
- {
- // TODO Not quite sure what this test is doing
- deployBeans(CityProducer.class, Jamsa_Broken.class);
- manager.getInstanceByType(Jamsa_Broken.class).ping();
- assert false;
- }
-
- /**
* The Web Bean manager must guarantee that JMS endpoint proxy objects are
* serializable.
*/
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/City.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/City.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/City.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,8 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+class City
+{
+ public void ping() {
+
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityBinding.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityBinding.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityBinding.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+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.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.Dependent;
+import javax.webbeans.InterceptorBindingType;
+
+@InterceptorBindingType
+@Dependent
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+@interface CityBinding
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityInterface.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityInterface.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityInterface.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,6 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+interface CityInterface
+{
+ public void foo();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.webbeans.Dependent;
+import javax.webbeans.Produces;
+
+class CityProducer
+{
+ @Produces @Dependent public Violation reference = new Violation();
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer2.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer2.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/CityProducer2.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.webbeans.Dependent;
+import javax.webbeans.Produces;
+
+class CityProducer2
+{
+ @Produces
+ @Dependent
+ public Violation create()
+ {
+ return new Violation();
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Espoo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Espoo_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Espoo_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,18 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@Stateful
+@SessionScoped
+class Espoo_Broken
+{
+ @Current
+ Violation reference;
+
+ @Remove
+ public void bye() {
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Forssa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Forssa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Forssa_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Forssa_Broken implements Serializable
+{
+ private static final long serialVersionUID = 2155797154677120837L;
+
+ public Forssa_Broken() {
+ }
+
+ @Initializer
+ public Forssa_Broken(@Current Violation reference) {
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hamina_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hamina_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hamina_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Hamina_Broken
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Helsinki.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Helsinki.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Helsinki.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,11 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.ejb.Stateful;
+import javax.webbeans.Dependent;
+
+@Dependent
+@Stateful
+class Helsinki
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hyvinkaa.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hyvinkaa.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Hyvinkaa.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@SuppressWarnings("serial")
+@SessionScoped
+class Hyvinkaa implements Serializable
+{
+ @SuppressWarnings("unused")
+ @Current
+ private transient Violation reference;
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jamsa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jamsa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jamsa_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,24 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Produces;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Jamsa_Broken extends City implements Serializable
+{
+ private static final long serialVersionUID = 8228981889946806181L;
+
+ public Jamsa_Broken()
+ {
+ }
+
+ @Produces
+ @SessionScoped
+ public Violation create(@Current Violation violation)
+ {
+ return violation;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Joensuu.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Joensuu.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Joensuu.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@SuppressWarnings("serial")
+@SessionScoped
+class Joensuu implements Serializable
+{
+ @SuppressWarnings("unused")
+ @Current
+ private transient Violation reference;
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jyvaskyla.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jyvaskyla.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Jyvaskyla.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,12 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.SessionScoped;
+
+@SuppressWarnings("serial")
+@SessionScoped
+class Jyvaskyla implements Serializable
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kaarina_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kaarina_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kaarina_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,20 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.SessionScoped;
+
+@Stateful
+@SessionScoped
+class Kaarina_Broken
+{
+ @CityBinding
+ public void foo()
+ {
+ }
+
+ @Remove
+ public void bye()
+ {
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kotka_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kotka_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kotka_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Kotka_Broken implements Serializable
+{
+ private static final long serialVersionUID = -1208921426884983474L;
+
+ @CityBinding
+ public void foo() {
+
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kuopio_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kuopio_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Kuopio_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,22 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Kuopio_Broken extends City implements Serializable
+{
+ private static final long serialVersionUID = 2446135216757213774L;
+
+ public Kuopio_Broken() {
+
+ }
+
+ @Initializer
+ public void init(@Current Violation reference) {
+
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Loviisa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Loviisa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Loviisa_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,21 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Loviisa_Broken extends City implements Serializable
+{
+ private static final long serialVersionUID = -2866858442948392508L;
+
+ public Loviisa_Broken() {
+ }
+
+ @Initializer
+ public Loviisa_Broken(@Current Violation reference) {
+
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Maarianhamina_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Maarianhamina_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Maarianhamina_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@Stateful
+@SessionScoped
+class Maarianhamina_Broken
+{
+ @SuppressWarnings("unused")
+ @Current
+ private Violation reference;
+
+ @Remove
+ public void bye() {
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Mikkeli_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Mikkeli_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Mikkeli_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,23 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.Initializer;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Mikkeli_Broken extends City implements Serializable
+{
+ private static final long serialVersionUID = -3853118456066667893L;
+
+ public Mikkeli_Broken()
+ {
+ }
+
+ @Initializer
+ public Mikkeli_Broken(@Current Violation reference)
+ {
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Nokia_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Nokia_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Nokia_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Nokia_Broken extends City implements Serializable
+{
+ private static final long serialVersionUID = -9104722758108835718L;
+
+ @SuppressWarnings("unused")
+ @Current
+ private Violation reference;
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/PassivatingContextTest.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,483 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.IOException;
+import java.util.Set;
+
+import javax.webbeans.DefinitionException;
+import javax.webbeans.IllegalProductException;
+import javax.webbeans.UnserializableDependencyException;
+import javax.webbeans.manager.Bean;
+
+import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.tck.impl.SpecAssertion;
+import org.jboss.webbeans.tck.impl.SpecVersion;
+import org.jboss.webbeans.tck.unit.context.passivating.CityProducer;
+import org.jboss.webbeans.tck.unit.context.passivating.CityProducer2;
+import org.jboss.webbeans.tck.unit.context.passivating.Espoo_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Forssa_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Hamina_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Helsinki;
+import org.jboss.webbeans.tck.unit.context.passivating.Hyvinkaa;
+import org.jboss.webbeans.tck.unit.context.passivating.Jamsa_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Joensuu;
+import org.jboss.webbeans.tck.unit.context.passivating.Jyvaskyla;
+import org.jboss.webbeans.tck.unit.context.passivating.Kaarina_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Kotka_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Kuopio_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Loviisa_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Maarianhamina_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Mikkeli_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Nokia_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Peraseinajoki;
+import org.jboss.webbeans.tck.unit.context.passivating.Porvoo_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Raisio_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Salo_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Uusikaupunki_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Vaasa;
+import org.jboss.webbeans.tck.unit.context.passivating.Vantaa_Broken;
+import org.jboss.webbeans.tck.unit.context.passivating.Violation;
+import org.jboss.webbeans.tck.unit.context.passivating.Violation2;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+@SpecVersion("20081206")
+public class PassivatingContextTest extends AbstractTest
+{
+
+ /**
+ * Simple Web Beans are not required to be serializable. If a simple Web Bean
+ * declares a passivating scope, and the implementation class is not
+ * serializable, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = DefinitionException.class)
+ @SpecAssertion(section = "9.5")
+ public void testSimpleWebBeanWithNonSerializableImplementationClassFails()
+ {
+ deployBeans(Hamina_Broken.class);
+ }
+
+ /**
+ * Simple Web Beans are not required to be serializable. If a simple Web Bean
+ * declares a passivating scope, and the implementation class is not
+ * serializable, a DefinitionException is thrown by the Web Bean manager at
+ * initialization time.
+ */
+ @Test(groups = {"contexts", "passivation" })
+ @SpecAssertion(section = "9.5")
+ public void testSimpleWebBeanWithSerializableImplementationClassOK()
+ {
+ createSimpleBean(Jyvaskyla.class);
+ }
+
+ /**
+ * the Web Bean declares a passivating scope type, and context passivation
+ * occurs, or
+ *
+ * @throws IOException
+ * @throws ClassNotFoundException
+ */
+ @Test(groups = { "contexts", "passivation" , "stub" })
+ @SpecAssertion(section = "9.5")
+ public void testSimpleWebBeanDeclaringPassivatingScopeIsSerializedWhenContextIsPassivated() throws IOException, ClassNotFoundException
+ {
+ assert false;
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> boolean testSerialize(Bean<T> bean) throws IOException, ClassNotFoundException
+ {
+ manager.addBean(bean);
+ T instance = manager.getInstance(bean);
+ byte[] data = serialize(instance);
+ T resurrected = (T) deserialize(data);
+ return resurrected.toString().equals(instance.toString());
+ }
+
+ /**
+ * the Web Bean is an EJB stateful session bean, and it is passivated by the
+ * EJB container.
+ *
+ * @throws ClassNotFoundException
+ * @throws IOException
+ */
+ // TODO requires an EJB instance
+ @Test(groups = { "contexts", "passivation", "broken", "stub" })
+ @SpecAssertion(section = "9.5")
+ public void testStatefulEJBIsSerializedWhenPassivatedByEJBContainer() throws IOException, ClassNotFoundException
+ {
+ assert false;
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentInterceptorsOfStatefulEnterpriseBeanMustBeSerializable()
+ {
+ deployBeans(Kaarina_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentDecoratorsOfStatefulEnterpriseBeanMustBeSerializable()
+ {
+ deployBeans(Porvoo_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentInterceptorsOfWebBeanWithPassivatingScopeMustBeSerializable()
+ {
+ deployBeans(Kotka_Broken.class);
+ }
+
+ /**
+ * On the other hand, dependent objects (including interceptors and
+ * decorators with scope @Dependent) of a stateful session bean or of a Web
+ * Bean with a passivating scope must be serialized and deserialized along
+ * with their owner
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentDecoratorsOfWebBeansWithPassivatingScopeMustBeSerializable()
+ {
+ deployBeans(Raisio_Broken.class);
+ }
+
+ /**
+ * EJB local objects are serializable. Therefore, any reference to an
+ * enterprise Web Bean of scope @Dependent is serializable.
+ *
+ * @throws ClassNotFoundException
+ * @throws IOException
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "9.5")
+ public void testDependentEJBsAreSerializable() throws IOException, ClassNotFoundException
+ {
+ deployBeans(Vaasa.class, Helsinki.class);
+ Set<Bean<Vaasa>> vaasaBeans = manager.resolveByType(Vaasa.class);
+ assert vaasaBeans.size() == 1;
+ assert testSerialize(vaasaBeans.iterator().next());
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "stub", "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoStatefulSessionBeanFails()
+ {
+ deployBeans(Violation.class, Espoo_Broken.class);
+ manager.getInstanceByType(Espoo_Broken.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Vantaa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "9.5")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoTransientFieldOK()
+ {
+ createSimpleBean(Joensuu.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Loviisa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(Forssa_Broken.class, Violation.class);
+ }
+
+ /**
+ * If a simple Web Bean of scope @Dependent and a non-serializable
+ * implementation class is injected into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * UnserializableDependencyException must be thrown by the Web Bean manager
+ * at initialization time.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = UnserializableDependencyException.class)
+ @SpecAssertion(section = "9.5")
+ public void testSimpleDependentWebBeanWithNonSerializableImplementationInjectedIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ deployBeans(Peraseinajoki.class, Violation.class, Violation2.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ *
+ * @throws NoSuchMethodException
+ * @throws SecurityException
+ */
+ @Test(groups = { "contexts", "passivation", "integration", "broken" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws SecurityException, NoSuchMethodException
+ {
+ deployBeans(CityProducer2.class, Maarianhamina_Broken.class);
+ manager.getInstanceByType(Maarianhamina_Broken.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Nokia_Broken.class);
+ manager.getInstanceByType(Nokia_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
+ {
+ createSimpleBean(CityProducer2.class);
+ createSimpleBean(Hyvinkaa.class);
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Loviisa_Broken.class);
+ manager.getInstanceByType(Loviisa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer2.class, Kuopio_Broken.class);
+ manager.getInstanceByType(Kuopio_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" , "broken"}, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerMethodReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ // TODO Not quite sure what this test is doing
+ //deployBeans(CityProducer3.class, Jamsa_Broken.class);
+ //manager.getInstanceByType(Jamsa_Broken.class).ping();
+ assert false;
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ *
+ */
+ @Test(groups = { "contexts", "passivation", "stub"}, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoStatefulSessionBeanFails() throws Exception
+ {
+ // TODO This doesn't test injction in a SFSB, but into a Enterprise bean
+ //deployBeans(CityProducer.class, Pietarsaari_Broken.class);
+ //manager.getInstanceByType(Pietarsaari_Broken.class);
+ assert false;
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoNonTransientFieldOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Uusikaupunki_Broken.class);
+ manager.getInstanceByType(Uusikaupunki_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation"})
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoTransientFieldOfWebBeanWithPassivatingScopeOK()
+ {
+ deployBeans(CityProducer.class, Salo_Broken.class);
+ manager.getInstanceByType(Salo_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoConstructorParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Loviisa_Broken.class);
+ manager.getInstanceByType(Loviisa_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoInitializerParameterOfWebBeanWithPassivatingScopeFails()
+ {
+ deployBeans(CityProducer.class, Mikkeli_Broken.class);
+ manager.getInstanceByType(Mikkeli_Broken.class).ping();
+ }
+
+ /**
+ * If a producer method or field of scope @Dependent returns a
+ * non-serializable object for injection into a stateful session bean, into a
+ * non-transient field, Web Bean constructor parameter or initializer method
+ * parameter of a Web Bean which declares a passivating scope type, or into a
+ * parameter of a producer method which declares a passivating scope type, an
+ * IllegalProductException is thrown by the Web Bean manager.
+ */
+ @Test(groups = { "contexts", "passivation", "broken" }, expectedExceptions = IllegalProductException.class)
+ @SpecAssertion(section = "9.5")
+ public void testDependentScopedProducerFieldReturnsNonSerializableObjectForInjectionIntoProducerMethodParameterWithPassivatingScopeFails()
+ {
+ // TODO Not quite sure what this test is doing
+ deployBeans(CityProducer.class, Jamsa_Broken.class);
+ manager.getInstanceByType(Jamsa_Broken.class).ping();
+ assert false;
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Peraseinajoki.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Peraseinajoki.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Peraseinajoki.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,16 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.webbeans.Current;
+import javax.webbeans.Produces;
+import javax.webbeans.SessionScoped;
+
+class Peraseinajoki extends City
+{
+
+ @Produces @SessionScoped
+ public Violation2 create(@Current Violation reference)
+ {
+ return new Violation2();
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Porvoo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Porvoo_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Porvoo_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,19 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+import javax.webbeans.SessionScoped;
+
+@Stateful
+@SessionScoped
+class Porvoo_Broken implements CityInterface
+{
+ public void foo()
+ {
+ }
+
+ @Remove
+ public void bye()
+ {
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Raisio_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Raisio_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Raisio_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,15 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Raisio_Broken implements CityInterface, Serializable
+{
+ private static final long serialVersionUID = 2726489129474229549L;
+
+ public void foo()
+ {
+ }
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Salo_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Salo_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Salo_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Salo_Broken extends City implements Serializable
+{
+ private static final long serialVersionUID = 5500591077418621816L;
+
+ @SuppressWarnings("unused")
+ @Current
+ private transient Violation reference;
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Uusikaupunki_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Uusikaupunki_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Uusikaupunki_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,17 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Uusikaupunki_Broken extends City implements Serializable
+{
+ private static final long serialVersionUID = 5097928748462594346L;
+
+ @SuppressWarnings("unused")
+ @Current
+ private Violation reference;
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vaasa.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vaasa.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vaasa.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,14 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@SuppressWarnings("serial")
+@SessionScoped
+class Vaasa implements Serializable
+{
+ @SuppressWarnings("unused")
+ @Current private Helsinki ejb;
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vantaa_Broken.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vantaa_Broken.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Vantaa_Broken.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,30 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import java.io.Serializable;
+
+import javax.webbeans.Current;
+import javax.webbeans.SessionScoped;
+
+@SessionScoped
+class Vantaa_Broken implements Serializable
+{
+ private static final long serialVersionUID = -1686562136639336613L;
+
+ @Current
+ private Violation reference;
+
+ public Violation getReference()
+ {
+ return reference;
+ }
+
+ public void setReference(Violation reference)
+ {
+ this.reference = reference;
+ }
+
+ public String test() {
+ return reference.toString();
+ }
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.webbeans.Dependent;
+
+@Dependent
+class Violation
+{
+
+}
Added: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation2.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation2.java (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/context/passivating/Violation2.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -0,0 +1,9 @@
+package org.jboss.webbeans.tck.unit.context.passivating;
+
+import javax.webbeans.Dependent;
+
+@Dependent
+class Violation2
+{
+
+}
Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java 2009-01-23 00:31:15 UTC (rev 1182)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/lookup/byname/InstantiationByNameTest.java 2009-01-23 00:46:28 UTC (rev 1183)
@@ -71,15 +71,4 @@
{
assert false;
}
-
- /*
-
- @Test(groups="el") @SpecAssertion(section="4.10")
- public void test
- {
- assert false;
- }
-
- */
-
}
16 years, 8 months