dev@glassfish.java.net

RE: How to initialize Habitat with new version of HK2 in unit testing environment

From: Dapeng Hu <dapeng.hu_at_oracle.com>
Date: Fri, 20 Jul 2012 02:31:09 -0700 (PDT)

Thanks a lot.

?

Regards

?

From: Andriy Zhdanov
Sent: 2012Äê7ÔÂ20ÈÕ 15:40
To: dev_at_glassfish.java.net
Subject: Re: How to initialize Habitat with new version of HK2 in unit testing environment

?

Hi Dapeng,

If you refer to HK2 trunk, you may see http://java.net/projects/hk2/sources/svn/content/trunk/hk2/examples/ctm/src/test/java/org/glassfish/examples/ctm/runme/CTMTest.java?rev=3710

Thank you.

On 7/20/12 9:00 AM, Dapeng Hu wrote:

Hi:

?

I have a unit testcase which contains the following codes. It has passed with the old version of HK2 but always returns null with HK2 v2.0.

habitat.getByType(ApplicationArchivist.class);

?

Who has an example about how to initialize the Habitat with new HK2 in unit testing environment?

?

Regards

?

cid:CDF643B8-3803-4A72-AB35-BE2FD51C3CDC
Dapeng Hu | Senior Techinical Staff ?| 86-10-61065511
Oracle?Weblogic Server Development
Oracle Building | Zhongguanchun Software Park | Bejing, 100193, P.R.C

?

?