tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joe <fischauto...@yahoo.de>
Subject Re: @PreDestroy in embedded unit test
Date Mon, 31 May 2010 07:07:20 GMT
Am 28.05.2010 23:03, schrieb David Blevins:

> With those snapshots you should be able to shutdown the container system in your test
case with code like this:
>    @Before
>    public void setUp() throws Exception{
>        Properties p = new Properties();
>
>        //Set some other properties like datasources ...
>        p.put("openejb.embedded.initialcontext.close", "destroy");
>
>        context = new InitialContext(p);
>    }
>
>    @After
>    public void tearDown() throws Exception{
>        context.close();
>    }
> Hope this helps!

Great, thx.


Mime
View raw message