logo       

Re: ComponentManager injection in 2.2?: msg#00764

cms.sakai.devel

Subject: Re: ComponentManager injection in 2.2?

DO NOT try to inject the component manager. Use the cover. There's a little boot-straping problem asking the component manager for the component manager (which is after all what injection boils down to).

Use the cover. If you need it at all.

- Glenn

Glenn R. Golden
Software Architect, University Of Michigan
ggolden@xxxxxxxxx



On Apr 28, 2006, at 3:37 PM, Charles Severance wrote:

Injecting the ComponentManager... Hmmm. Never thought of that one. If you are switching to all injection - why do you need the CompnentManager at all :)

/Chuck

On Apr 28, 2006, at 3:27 PM, Zeckoski, Aaron wrote:

(Sorry for all the questions... can you tell I am switching all my code
from covers to Spring injection?)

I am injecting the Component Manager and I keep ending up with a null
pointer exception. I have tried injecting it into the backing bean using
my faces-config like so:

<managed-property>
<description>componentManager</description>
<property-name>componentManager</property-name>
<value>#{Components ["org.sakaiproject.component.api.ComponentManager"]}<
/value>
</managed-property>

And using my spring file like so:
<bean id="backingBean"
class="edu.vt.sakai.tool.BackingBean">
<property name="componentManager">
<ref bean="org.sakaiproject.component.api.ComponentManager" />
</property>
</bean>

If I use the cover (org.sakaiproject.component.cover.ComponentManager) I
get a nice non-null ComponentManager.

Is there anything obviously wrong with my code?
-AZ

--
Aaron Zeckoski (aaronz@xxxxxx)
Lead Developer - Learning Technologies - Virginia Tech

----------------------
This automatic notification message was sent by Sakai Collab (http://collab.sakaiproject.org/portal) from the DG: Development site.
You can modify how you receive notifications at My Workspace > Preferences.




----------------------
This automatic notification message was sent by Sakai Collab (http://collab.sakaiproject.org/portal) from the DG: Development site.
You can modify how you receive notifications at My Workspace > Preferences.


----------------------
This automatic notification message was sent by Sakai Collab
(http://collab.sakaiproject.org/portal) from the DG: Development site.
You can modify how you receive notifications at My Workspace > Preferences.




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise