There's been a bit of chat about that recently on the list.  If you have non
JBoss modification of your persistence, you'll probably want to use commit
option B or C for entity beans.  Commit option A assumes exclusive access to
persistence.

Using commit options B/C isn't quite as speedy as A.  If your legacy apps
modify the db at relatively infrequent times, you may be able to use commit
option A with some custom cache tools.  Mark a bean as "dirty" or something,
and next access it will reload.  Check the list for notes with subject
"External Data Modification" for some details.

Mike

On (09/05/01 16:52), Rafael Alves Chaves wrote:
> 
> > The ejbCreate method or postCreate of Documento must insure that all the beans
> > properties are set.
> 
> Thanks, Victor, this was my fault. 
> 
> > There is no need for the container to call ejbFindByPrimaryKey if the bean is
> > already in the container's cache. 
> 
> If I have a legacy application changing the database concurrently with
> BMP beans, I will need to turn off the cache? How?
> 
> Thank you all.
> 
>     Rafael  
> 
> 
> > --Victor
> > 
> > 
> > Rafael Alves Chaves wrote:
> > 
> > > Hi,
> > >
> >sd >   I'm having a strange problem with entity beans in JBoss. For debugging
> > > purposes, I have instrumented ALL callback and business  methods to
> > > generate an output identifying the called method and, when useful, its
> > > arguments.
> > >
> > >   Below is the trace generated after two different clients are executed.
> > > The first creates a session bean, and through this session bean, creates
> > > an entity bean. The second client just searches for the created entity,
> > > and outputs its properties to the screen.
> > >
> > > The first client creates a stateful session bean (ObjetoSistema):
> > >
> > > [ObjetoSistema] ObjetoSistemaBean.setSessionContext(<context>)
> > > [ObjetoSistema] ObjetoSistemaBean.ejbCreate(1000,2)
> > >
> > > The same client calls some methods:
> > >
> > > [ObjetoSistema] ObjetoSistema.addDocumento("Teste-1000-0.txt",<conteudo>)
> > >
> > > To finish, the client will "commit" the session bean, calling
> > > "persiste()", which creates a new entity bean (Documento), which is BMP:
> > >
> > > [ObjetoSistema] ObjetoSistema.persiste()
> > > [Documento] DocumentoBean.ejbCreate(1000,2,"Teste-1000-0.txt","2/A/1000")
> > > [Documento] DocumentoBean.ejbPostCreate(1000,2,"Teste-1000-0.txt","2/A/1000")
> > >
> > > The client then finishes the session object:
> > >
> > > [ObjetoSistema] ObjetoSistemaBean.ejbRemove()
> > >
> > > Now the strange things: The second client calls
> > > DocumentoHome.findByPrimaryKey, but the bean class
> > > DocumentoBean.ejbFindByPrimaryKey doesn't get called, although the client
> > > receives a reference to the found bean. The problem is that all properties
> > > of this bean are null, and this null values are automatically synchronized
> > > on the database when the client calls the acessor methods:
> > >
> > > [Documento] DocumentoBean.setEntityContext()
> > > [Documento] DocumentoBean.getNome ()
> > > [Documento] DocumentoBean.ejbStore ()
> > > [Documento] DocumentoBean.getCaminho ()
> > > [Documento] DocumentoBean.ejbStore ()
> > >
> > > Does anyone has any idea about this behaviour? I'm using JBoss 2.2.1.
> > >
> > > Thanks for any clue...
> > >
> > >     Rafael
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > 
> > 
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> > 
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


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

Reply via email to