-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Man do i feel like an idiot... it was package level.
We're doing a little Spring/HiveMind comparison, and Spring could
create those instances with package level visibility.
Thanks!
Jason
Achim Huegen wrote:
| Is your class defined public or like in the pasted code only with
| package level access? This could cause such a problem
|
| Achim
|
| Jason Vinson wrote:
|
| First of all, i'm very new to and very impressed with HiveMind.
| The documentaion is clear and consise for the most part, so i've
| had some good success with strict JavaBean properties style wiring
| with hive modules. Now I am seeing some weird behavior when i add
| a no-args constructor. I have something like the following:
|
| [com.myapp.Service] interface Service { ~ public void doStuff(); }
|
|
| [com.myapp.access.AccessService] class AccessService implements
| Service {
|
| ~ private Map myMap();
|
| ~ public void doStuff() { /*do something*/ }
|
| ~ public AccessService () { ~ myMap = new HashMap(); ~ } }
|
| And in my hivemodule:
|
| <module id="ioc" version="1.0.0"> ~ <service-point
| id="AccessService" interface="com.myapp.Service"> ~
| <create-instance class="com.myapp.access.AccessService"/> ~
| </service-point> </module>
|
| So when i do the following in my unit test: ~
| registry.getService("ioc.AccessService", Service.class);
|
| I see something like this:
|
| org.apache.hivemind.ApplicationRuntimeException: Unable to
| construct service ioc.AccessService: Unable to find a constructor
| for class com.myapp.access.AccessService.
|
| Any idea what i may be doing wrong? If there's a default
| constructor, do i need to invoke-factory instead of
| create-instance?
|
| Any input would be appreciated, Jason
|>
|>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
|>
|>
| ---------------------------------------------------------------------
| To unsubscribe, e-mail:
| [EMAIL PROTECTED] For additional
| commands, e-mail: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB99ICAQ71cZOfvEQRAvx+AJ9kpCCPoZYreQcIiKb11yC9PFfNRQCeND9K
9ioXENU4pXvlCYq+/yrWEEg=
=ti7K
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]