You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ted Steen <te...@gmail.com> on 2005/09/21 11:15:50 UTC

hivetranse-0.5.0-B3 question

Hi!

I'm trying to setup hivetranse+tapestry here and i have configured
hivemind.xml like this:
-------------------------------
	<implementation service-id="hivetranse.hibernate3.SessionFactoryBuilder">
		<invoke-factory model="primitive">
			<construct class="net.sourceforge.hivetranse.transaction.hibernate3.SessionFactoryBuilderImpl">
				<log/>
			</construct>
		</invoke-factory>
	</implementation>

	<service-point id="HibernateSession" interface="org.hibernate.Session">
		<invoke-factory service-id="hivetranse.hibernate3.SessionFactory"
model="singleton">
			<!-- config file="hibernate-config.xml">
				<property name="hibernate.connection.password" value="${password}"/>
			</config -->
		</invoke-factory>
	</service-point>
	
	<contribution configuration-id="hivetranse.core.TransactionDefaults">
		<defaults>
			<exception name="java.lang.Throwable" rollback="true" />
			<method pattern="*" demarcation="Supports" />
		</defaults>
	</contribution>

	<service-point id="BlaskanManager"
interface="se.liu.studorg.blaskan.web.BlaskanManager">
		<invoke-factory>
			<construct class="se.liu.studorg.blaskan.web.BlaskanManager">
				<!-- service>HibernateSession</service -->
			</construct>
		</invoke-factory>
		<!-- interceptor service-id="hivetranse.core.TransactionInterceptor">
			<method pattern="*" demarcation="Required"/>
		</interceptor -->
	</service-point>
	
	<!-- contribution configuration-id="hivemind.EagerLoad">
		<load service-id="HibernateSession" />
	</contribution -->

-------------------------------

Now the problem is that when i try to get the service "BlaskanManager"
(using @InjectObject("service:se.liu.studorg.blaskan.web.BlaskanManager"))
i get this error:
Error at context:/WEB-INF/hivemodule.xml, line 38, column 87:
Parameters to service implementation factory
hivetranse.hibernate3.SessionFactory contains no contributions but
expects exactly one contribution.


I can't figure out why and how I should contribute this thing.

Thanks!
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: hivetranse-0.5.0-B3 question

Posted by Ted Steen <te...@gmail.com>.
problem solved.
I needed to include the configuration, like this;
        <service-point id="HibernateSession" interface="org.hibernate.Session">
               <invoke-factory service-id="hivetranse.hibernate3.SessionFactory"
model="singleton">
                       <config file="hibernate-config.xml">
                               <property
name="hibernate.connection.password" value="${password}"/>
                       </config>
               </invoke-factory>
       </service-point>

On 9/21/05, Ted Steen <te...@gmail.com> wrote:
> I was thinking hivetranse was a nice way to solve where to place the
> hibernate session.
> aren't there anyone out there who could help me with this?
> I think it is a simple hivemind problem.
>
> On 9/21/05, Ted Steen <te...@gmail.com> wrote:
> > Hi!
> >
> > I'm trying to setup hivetranse+tapestry here and i have configured
> > hivemind.xml like this:
> > -------------------------------
> >         <implementation service-id="hivetranse.hibernate3.SessionFactoryBuilder">
> >                 <invoke-factory model="primitive">
> >                         <construct class="net.sourceforge.hivetranse.transaction.hibernate3.SessionFactoryBuilderImpl">
> >                                 <log/>
> >                         </construct>
> >                 </invoke-factory>
> >         </implementation>
> >
> >         <service-point id="HibernateSession" interface="org.hibernate.Session">
> >                 <invoke-factory service-id="hivetranse.hibernate3.SessionFactory"
> > model="singleton">
> >                         <!-- config file="hibernate-config.xml">
> >                                 <property name="hibernate.connection.password" value="${password}"/>
> >                         </config -->
> >                 </invoke-factory>
> >         </service-point>
> >
> >         <contribution configuration-id="hivetranse.core.TransactionDefaults">
> >                 <defaults>
> >                         <exception name="java.lang.Throwable" rollback="true" />
> >                         <method pattern="*" demarcation="Supports" />
> >                 </defaults>
> >         </contribution>
> >
> >         <service-point id="BlaskanManager"
> > interface="se.liu.studorg.blaskan.web.BlaskanManager">
> >                 <invoke-factory>
> >                         <construct class="se.liu.studorg.blaskan.web.BlaskanManager">
> >                                 <!-- service>HibernateSession</service -->
> >                         </construct>
> >                 </invoke-factory>
> >                 <!-- interceptor service-id="hivetranse.core.TransactionInterceptor">
> >                         <method pattern="*" demarcation="Required"/>
> >                 </interceptor -->
> >         </service-point>
> >
> >         <!-- contribution configuration-id="hivemind.EagerLoad">
> >                 <load service-id="HibernateSession" />
> >         </contribution -->
> >
> > -------------------------------
> >
> > Now the problem is that when i try to get the service "BlaskanManager"
> > (using @InjectObject("service:se.liu.studorg.blaskan.web.BlaskanManager"))
> > i get this error:
> > Error at context:/WEB-INF/hivemodule.xml, line 38, column 87:
> > Parameters to service implementation factory
> > hivetranse.hibernate3.SessionFactory contains no contributions but
> > expects exactly one contribution.
> >
> >
> > I can't figure out why and how I should contribute this thing.
> >
> > Thanks!
> > /ted
> >
>
>
> --
> /ted
>


--
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: hivetranse-0.5.0-B3 question

Posted by Ted Steen <te...@gmail.com>.
I was thinking hivetranse was a nice way to solve where to place the
hibernate session.
aren't there anyone out there who could help me with this?
I think it is a simple hivemind problem.

On 9/21/05, Ted Steen <te...@gmail.com> wrote:
> Hi!
>
> I'm trying to setup hivetranse+tapestry here and i have configured
> hivemind.xml like this:
> -------------------------------
>         <implementation service-id="hivetranse.hibernate3.SessionFactoryBuilder">
>                 <invoke-factory model="primitive">
>                         <construct class="net.sourceforge.hivetranse.transaction.hibernate3.SessionFactoryBuilderImpl">
>                                 <log/>
>                         </construct>
>                 </invoke-factory>
>         </implementation>
>
>         <service-point id="HibernateSession" interface="org.hibernate.Session">
>                 <invoke-factory service-id="hivetranse.hibernate3.SessionFactory"
> model="singleton">
>                         <!-- config file="hibernate-config.xml">
>                                 <property name="hibernate.connection.password" value="${password}"/>
>                         </config -->
>                 </invoke-factory>
>         </service-point>
>
>         <contribution configuration-id="hivetranse.core.TransactionDefaults">
>                 <defaults>
>                         <exception name="java.lang.Throwable" rollback="true" />
>                         <method pattern="*" demarcation="Supports" />
>                 </defaults>
>         </contribution>
>
>         <service-point id="BlaskanManager"
> interface="se.liu.studorg.blaskan.web.BlaskanManager">
>                 <invoke-factory>
>                         <construct class="se.liu.studorg.blaskan.web.BlaskanManager">
>                                 <!-- service>HibernateSession</service -->
>                         </construct>
>                 </invoke-factory>
>                 <!-- interceptor service-id="hivetranse.core.TransactionInterceptor">
>                         <method pattern="*" demarcation="Required"/>
>                 </interceptor -->
>         </service-point>
>
>         <!-- contribution configuration-id="hivemind.EagerLoad">
>                 <load service-id="HibernateSession" />
>         </contribution -->
>
> -------------------------------
>
> Now the problem is that when i try to get the service "BlaskanManager"
> (using @InjectObject("service:se.liu.studorg.blaskan.web.BlaskanManager"))
> i get this error:
> Error at context:/WEB-INF/hivemodule.xml, line 38, column 87:
> Parameters to service implementation factory
> hivetranse.hibernate3.SessionFactory contains no contributions but
> expects exactly one contribution.
>
>
> I can't figure out why and how I should contribute this thing.
>
> Thanks!
> /ted
>


--
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org