Hi,
From the debugger, I see it tries to resolve an autowire by navigating the
composoite chain which finally reaches the top composite whose parent is
null. I think we should check and retun null because the target of the
autowire is not found (ServletHost in my case).
Thanks,
Raymond
----- Original Message -----
From: "Raymond Feng" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, October 02, 2006 11:00 AM
Subject: Re: component hierarchy refactorings and system service support
Hi, Jim.
Your changes seem to be causing some regressions. I got the following
exception in a web srevice sample now.
Thread [main] (Suspended (exception NullPointerException))
DefaultRuntime(CompositeComponentExtension).resolveSystemInstance(Class<T>)
line: 390
CompositeComponentImpl(CompositeComponentExtension).resolveSystemInstance(Class<T>)line:
390
CompositeComponentImpl(CompositeComponentExtension).resolveSystemInstance(Class<T>)
line: 390
CompositeComponentImpl(CompositeComponentExtension).resolveSystemInstance(Class<T>)
line: 390 SystemOutboundAutowire.getTargetService() line: 84
SystemWireObjectFactory.getInstance() line: 40 MethodInjector<T>.inject(T)
line: 46 SystemAtomicComponentImpl(PojoAtomicComponent).createInstance()
line: 123 ModuleScopeContainer.eagerInitComponents() line: 144
ModuleScopeContainer.onEvent(Event) line: 72
CompositeComponentImpl(AbstractSCAObject).publish(Event) line: 94
CompositeComponentImpl(AbstractCompositeComponent).publish(Event) line:
136 CompositeComponentImpl(AbstractCompositeComponent).start() line: 106
HelloWorldWSClientTestCase(SCATestCase).deployExtension(CompositeComponent,String,
URL) line: 98 HelloWorldWSClientTestCase(SCATestCase).setUp() line: 58
HelloWorldWSClientTestCase.setUp() line: 29
HelloWorldWSClientTestCase(TestCase).runBare() line: 125
TestResult$1.protect() line: 106 TestResult.runProtected(Test,
Protectable) line: 124 TestResult.run(TestCase) line: 109
HelloWorldWSClientTestCase(TestCase).run(TestResult) line: 118
TestSuite.runTest(Test, TestResult) line: 208 TestSuite.run(TestResult)
line: 203 JUnit3TestReference.run(TestExecution) line: 128
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 460
RemoteTestRunner.runTests(TestExecution) line: 673 RemoteTestRunner.run()
line: 386 RemoteTestRunner.main(String[]) line: 196Any
clue?Thanks,Raymond----- Original Message -----From: "Jim Marino"
<[EMAIL PROTECTED]>To: <[email protected]>Sent: Monday,
October 02, 2006 12:10 AMSubject: component hierarchy refactorings and
system service support> Hi,>> I checked some changes in to support system
services scoped to acomposite hierarchy in the Java SCA runtime. This will
allow us to addsupport for things such as type systems specific to an
application andprogramming model extensions such as OpenJPA and
Hibernate.>> As part of this, the SystemCompositeComponent and
AutowireComponentspecializations have been removed, leaving
CompositeComponentImpl as thecomposite implementation that forms both the
application and system runtimetrees. Previously, each composite contained
one set of children. This hasbeen changed so that each composite will
contain a collection ofapplication and system children in separate
namespaces. Each composite onthe "application" side of the runtime
composite hierarchy may contain bothapplication and system children. For
example, normal user-providedapplication artifacts and system services
such as a type registry or EJB3entity manager factory. Composites on the
"system" side of the runtimewill only contain system artifacts as
children and will not have anyapplication children (the collections will
be empty).>> The application and system sides of the
CompositeComponentImpl aredistinct. Fro example, autowiring on the system
side will traverse up thesystem side of the runtime hierarchy while
application components may notautowire to system targets. Since system
and application children arekept separate to avoid collisions, additional
APIs have been added toCompositeComponent for navigating the hierarchy
(e.g. getSystemChild).>> Also, in line with these changes, I removed
AutowireComponent and movedthe methods up to CompositeComponent. In
addition to removing casts, thiswill allow us to add support for
autowiring application components, whichwill hopefully be included in the
SCA specs soon.>> Finally, I moved SystemAtomicComponent to SPI so that
people can createcustom system extensions. This will allow us to add
support for OpenJPA andHibernate where an EntityManagerFactory and
SessionFactory respectively aremanaged by a custom system atomic
component contained in an applicationcomposite. An injector can be used
to access that system component andinject a JPA EntityManager or
Hibernate Session onto a component instance.Similarly, a type system
helper could be stored in a system component foruse by an application.>>
Jim>> --------------------------------------------------------------------->
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]