Hi,

One problem with this is that (I think) it forces your app to rely on a
jdbc datasource persistence layer.  This is not always appropriate.  Even
if you are using a rdms for persistence, the JCA cci stuff suggests an
alternative and perhaps more db-independent access method (I haven't looked
at it much, but I think it involves using stored proc. for data access
updating and encapsulating db differences in sp syntax in the driver)

david jencks

On 2001.04.24 11:16:43 -0400 Daniel Cardin wrote:
> Anyone successfully managed using a CachedRowSet of some kind?
> 
> The way I understand it, it would be the vehicle of choice to pass data
> between the EJB and the client...
> 
> CachedRowSet crs = new CachedRowSet();
> crs.setDataSourceName("somedatasource");
> crs.setCommand("Select * from sometable");
> crs.execute();
>     
> return crs;
> 
> I'd like your thoughts/experiences with that.
> 
> Alternatively, if anyone of you uses Borland's DataExpress components,
> are TableDataSet serializable and
> transportable from EJB to client ? (This could actually prove more
> useful to me, albeit less "portable")
> 
> Cheers,
> 
> Daniel
> 
> -----Message d'origine-----
> De : Guy Rouillier [mailto:[EMAIL PROTECTED]]
> Envoyé : 24 avril, 2001 11:07 
> À : [EMAIL PROTECTED]
> Objet : Re: [JBoss-user] Jboss-bug or misunderstanding ? (Loosing
> reference to JBoss object)
> 
> 
> From reading your text below, it sounds like you are returning a
> ResultSet
> object to the client and letting the client next() through it.  If I'm
> interpreting that properly, you should not do this.  Only the EJB on
> JBoss
> should talk to the database.  All within a single method, obtain the
> connection, execute the query, get the ResultSet, loop through the
> result
> set and do something with it, close the result set, statement and
> connection, and then return.  As to what to do with the ResultSet, you
> can
> materialize it as a set of Java objects or (as we prefer to do) and XML
> string.
> 
> ----- Original Message -----
> From: "René Rolander Nygaard" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 24, 2001 3:57 AM
> Subject: RE: [JBoss-user] Jboss-bug or misunderstanding ? (Loosing
> reference
> to JBoss object)
> 
> 
> > René Rolander Nygaard wrote:
> >
> > > We are getting pretty desperate regarding this question, so I
> > have to ask
> > > again!
> >
> > Dude, try rephrasing the question.  The following paragraph makes
> > no sense.
> 
> Sorry - i will try once more.
> 
> > > Through our speed-testing we are seeing more strange behaviors.
> > > It seems as JBoss looses the reference to an object if you
> speed-clicks.
> > > This can only mean that the problems occurs because the same session
> is
> > > trying to access the same object more than once.
> >
> > What is "speed-clicks"?  What does "looses the reference to an
> > object" mean?
> This was actually from my originally mail where i wrote that we
> "speed-tested" the system by clicking on a menu-item, which caused a
> reload
> in another frame on the screen.
> 
> The "looses a reference" is that we have a reference from our jsp page
> through a bean to a JBoss stateless session bean.
> We select data from a resultset, and after we cycled through all items,
> we
> try to close the connection, the statement etc. but these objects are
> null!
> We still have a reference to the JBoss stateless session bean, but we
> fear
> that it is either a different stateless bean than we started with,
> OR it has been re-initialized.
> 
> >
> >
> > > If you from a jsp page force a reload before the last page-load was
> > > finished, it seems that the reference from the jsp page through
> > to the JBoss
> > > stateless bean is lost!
> > >
> > > Can we expect that in one work-cycle we get a reference to at
> different
> > > JBoss stateless bean, and if this is the case - we cannot clean
> > up after us
> > > self.
> > >
> > > The scenario again:
> > > A jsp page gets a reference to a stateless session bean
> > > The jsp page starts traverse a resultset
> > > <Here we reload the page!>
> > > The disconnect functions all fail because the objects == null!
> > > Sorry about this, but i cannot see this any other way than a
> > JBoss bug...
> >
> > Do you realise that the same JSP instance can service multiple
> requests
> > simultaneously.  If you are storing things in instance variables then
> > the second request will overwrite them before the first completes.
> This
> > is basic JSP/servlet stuff.
> 
> Hmm. Yes - but here we make a <USEBEAN> on a page object (and we also
> tried
> making the bean session).
> Then we cycle through all data
> finally we call the Close all function.
> When we are running in the same jsp page, can we expect that the data
> contained in one jsp page is overridden if the user click's to quickly ?
> I hope this is not the case.
> 
> Thnx for the response dude! ;-)
> 
>  - René Rolander Nygaard
> >
> > Toby.
> >
> >
> > _______________________________________________
> > 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