Skip to content

Commit

Permalink
Test for bug reported by Mark Struberg on weld-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Feb 16, 2010
1 parent 13456d5 commit 70f1515
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/src/test/java/org/jboss/weld/tests/serialization/Foo.java
@@ -0,0 +1,11 @@
package org.jboss.weld.tests.serialization;

public class Foo
{

public Foo(String name)
{

}

}
@@ -0,0 +1,19 @@
package org.jboss.weld.tests.serialization;

import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;

@SessionScoped
public class FooConsumer implements Serializable
{

@Inject Foo foo;

public void ping()
{

}

}
@@ -0,0 +1,14 @@
package org.jboss.weld.tests.serialization;

import javax.enterprise.inject.Produces;

public class FooProducer
{

@Produces
public Foo produceFoo()
{
return new Foo("foo");
}

}
Expand Up @@ -41,4 +41,10 @@ public void testConversationManagerSerializable()
assert deserializedCMgr.getConversationInstance() != null;
assert deserializedCMgr.getConversationInstance().get() != null;
}

@Test(description="http://lists.jboss.org/pipermail/weld-dev/2010-February/002265.html")
public void testNonSerializableProductInjectedIntoSessionScopedBean()
{
getReference(FooConsumer.class).ping();
}
}

0 comments on commit 70f1515

Please sign in to comment.