G
guess85
Hi everybody. I try to write a factory using IoC pattern. This factory
open an ontology model and returns a unique reference to this model.
The associated bean have scope application. This model is used in many
class. In every class I have a reference to this model like :
MyModelFactory factory;
and I use this reference to get the model with:
OntModel model=factory.getModel();
and in the faces-config.xml I have:
<managed-bean>
<description>Bean of the student</description>
<managed-bean-name>studentBean</managed-bean-name>
<managed-bean-class>beanDomain.StudentBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>factory</property-name>
<value>#{myModelFactory}</value>
</managed-property>
</managed-bean>
But when i try use factory.getModel() it returns an empty value. It
seems like it don't have any reference to the factory bean. Why? There
is something wrong? Thanks..
open an ontology model and returns a unique reference to this model.
The associated bean have scope application. This model is used in many
class. In every class I have a reference to this model like :
MyModelFactory factory;
and I use this reference to get the model with:
OntModel model=factory.getModel();
and in the faces-config.xml I have:
<managed-bean>
<description>Bean of the student</description>
<managed-bean-name>studentBean</managed-bean-name>
<managed-bean-class>beanDomain.StudentBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>factory</property-name>
<value>#{myModelFactory}</value>
</managed-property>
</managed-bean>
But when i try use factory.getModel() it returns an empty value. It
seems like it don't have any reference to the factory bean. Why? There
is something wrong? Thanks..