I think I'm using BMP, you can see the XML file following:

* ejb-jar.xml:
<entity>
<ejb-name>Impuesto</ejb-name>
<home>com.logicFactory.tienda.ImpuestoHome</home>
<remote>com.logicFactory.tienda.Impuesto</remote>
<ejb-class>com.logicFactory.tienda.ImpuestoEJB</ejb-class>
<prim-key-class>java.lang.String</prim-key-class>
<persistence-type>Bean</persistence-type>
<reentrant>true</reentrant>
<ejb-ref>
<ejb-ref-name>ejb/Log</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.logicFactory.log.LogHome</home>
<remote>com.logicFactory.log.Log</remote>
<ejb-link>Log</ejb-link>
</ejb-ref>
<resource-ref>
<res-ref-name>jdbc/basedatosDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>

* jboss.xml:
<entity>
<ejb-name>Impuesto</ejb-name>
<jndi-name>ImpuestoHome</jndi-name>
<resource-ref>
<res-ref-name>jdbc/basedatosDS</res-ref-name>
<resource-name>basedatosDB</resource-name>
</resource-ref>
<configuration-name>OpcionB</configuration-name>
</entity>
</enterprise-beans>
<container-configurations>
<container-configuration>
<container-name>OpcionB</container-name>
<call-logging>false</call-logging>
<container-invoker>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker</container-invoker>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityInstanceInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntitySynchronizationInterceptor</interceptor>
</container-interceptors>
<instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
<instance-cache>org.jboss.ejb.plugins.EntityInstanceCache</instance-cache>
<persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</persistence-manager>
<transaction-manager>org.jboss.tm.TxManager</transaction-manager>
<container-invoker-conf>
<RMIObjectPort>4444</RMIObjectPort>
<Optimized>True</Optimized>
</container-invoker-conf>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>1000</max-capacity>
<overager-period>300</overager-period>
<max-bean-age>600</max-bean-age>
<resizer-period>400</resizer-period>
<max-cache-miss-period>60</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
<cache-load-factor>0.75</cache-load-factor>
</cache-policy-conf>
</container-cache-conf>
<container-pool-conf>
<MaximumSize>100</MaximumSize>
<MinimumSize>10</MinimumSize>
</container-pool-conf>
<commit-option>B</commit-option>
</container-configuration>
</container-configurations>
----- Original Message -----
From: jK.MkIII
Sent: Wednesday, July 18, 2001 1:39 PM
Subject: Re: [JBoss-user] Primitive Types in Entity beans

Miguel Angel Medina Lopez wrote:
Hi:

I'm implementing an entity bean that manage persintence (BMP). I declare
the entity variables with primitive types like float and boolean.

The problem is that the values of these variables seem to be lost, but
if I use a object from Float class (an not from float type) it's work
well.

Is that normal? I always must use java classes and not primitive types?

Hmm? With BMP (Bean Managed Persistency) you can have your variable stored in whatever format you wish, even convert them to gifs if you wish.. because you will be doing SQL calls (or what ever) that store and load them.

Are you sure you aren't talking about CMP (Container Managed Persistency) where container handles stuff that keeps entity beans persistent? Haven't worked with them yet so can't answer from top of my head.

--
    jK.MkIII
 
  _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to