"Bhattacharyya, Ana" wrote:

> Hi
> Thanx for the reply --- can u tell me where I can set this flag --- rather
> which deployment descriptor --- I set this flag -- ejb-jar.xml or
> weblogic-jar...

the weblogic one. See
http://www.weblogic.com/docs50/classdocs/API_ejb/EJB_environment.html#1048164

> Can u attach some example DD where u have done this??
> BTW using the WLS 5.0 b2 I am not getting the same connection handle but
> still TX is getting managed -- any clues??
> I am invoking create of entity beans E1 and E2 from one method of session
> bean S1 --- all are TX Required. I am using BMP  -- and I am printing the
> handles of the connection I get in each of the create -- they are giving
> diff toString() values!!!! am I doing some thing wrong --- or this is the
> correct behaviour???
>

Not sure about this, but I guess their pooling system returns "weblogic
connections", which just wrap the actual connections to the DB (they probably do
that to disable set-auto-commit). So the connection object you get is not the
actual DB connection used. Try to print the class name of the returned
connection.

JB.

>
> TIA
> Anamitra
>
> -----Original Message-----
> From: Jean-Baptiste Nizet [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 02, 2000 4:24 AM
> To: [EMAIL PROTECTED]
> Subject: Re: CMP entity bean and session bean...
>
> "Bhattacharyya, Ana" wrote:
>
> > Hi all
> > I am using weblogic 5.0 beta for my project. I have the following doubts
> > which needs to te cleared before I can proceed further with the design.
> >
> > I want to connect to an Oracle8i database.What are the options I have ---
> > 1. Use Weblogics driver -- if it has one (Not sure whether it has one for
> > Oracle8i).
> > 2. Use Oracles thin driver.
> > If I go for the 2nd option can I use the connection pooling mechanism of
> > weblogic?? ie the question
> > basically boils down to whether I can use a driver of my choice and still
> > develope a connection pool
> > using weblogic.properties file.
> >
>
> Yes, I do it with success.
>
> >
> > I am planning to use both session beans and entity beans in my project.
> > Session beans will act a facade
> > to the entity beans. The clients will never access the entity beans
> > directly. Clients will allways
> > request the session bean which in turn may redirect the request to the
> > entity bean and aswell do some
> > business validations/transactions. I am planning to use CMP for entity
> beans
> > and normal JDBC
> > access for Session beans. All the methods will have transaction attribute
> > set as TX_REQUIRED. I will
> > use the thin JDBC driver for Oracle8i. I want to use connection pooling
> > also.
> > Lets take a practical scenarion now. The client sends some data to the
> > session bean to create an Account.
> > The session bean first validates the data and then calls the CMP Entity
> > beans create. Then it does some
> > modification in the database and then returns. I want the whole thing to
> > happen in one transaction.
> > The problem is I am not going to write a single line of JDBC code for the
> > entity bean. But I will have to
> > write JDBC code for the database interactions the session bean is doing.
> So
> > can the container manage this
> > for me?? ie I will be taking a connection for the session bean operation
> and
> > container will be taking a connection
> > for entity bean operation --- how does it do the synchronization of these
> > two connections???
> >
>
> The connection pooling mechanism takes care of this. When you require a
> connection to the datasource, it returns the connection already associated
> to
> the current transaction if it exists. You don't have to care about this. You
> have to be aware, however, that if your session bean tries to access data
> just
> created or modified by your entity bean (in the same transaction), it won't
> see
> the modifications, since they will only occur at commit time. You can change
> this behaviour by setting a flag (delay-update-until-end-of-tx IIRC) to
> false,
> but this will decrease your performance.
>
> JB.
>
> >
> > TIA
> > Anamitra
> >
> >
> ===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff EJB-INTEREST".  For general help, send email to
> > [EMAIL PROTECTED] and include in the body of the message "help".
>
> --
> Jean-Baptiste Nizet
> [EMAIL PROTECTED]
>
> R&D Engineer, S1 Belgium
> Excelsiorlaan 87
> B-1930 Zaventem
> +32 2 714 45 42
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

--
Jean-Baptiste Nizet
[EMAIL PROTECTED]

R&D Engineer, S1 Belgium
Excelsiorlaan 87
B-1930 Zaventem
+32 2 714 45 42

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to