Re: DB changes not reflected in CMP bean.

2000-11-27 Thread Winston Ng

Thanks! It works great now.

Made the changes in orion-ejb-jar.xml and any updates to the db by other
sources is pretty much updated instantly.

Does anyone knows if this feature is stated in the EJB standards?

Winston

- Original Message -
From: "Sven van 't Veer" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Friday, November 24, 2000 2:25 AM
Subject: Re: DB changes not reflected in CMP bean.




 Winston Ng wrote:
 
  Hi All,
 
  This is more of an EJB question.
 
  I wrote a simple app using a CMP bean that talks to an Oracle DB.
 
  Started the server and was able to get/set information to the bean and
  subsequently see the changes in the DB.
 
  However, if I make any updates to the DB from sqlplus and commit the
  changes, they are not reflected in the Entity bean! The changes are only
  reflected if I restart Orion.
 
  Is this normal? What should I do to have the bean reflect changes in the
  database? Is that what BMP bean is for??
 Yes that is absolutely normal. You can however in orion-ejb.xml set
 exclusive-write-access="false" in entity-deployment.

 Sven
 --


==
 Sven E. van 't Veer
 http://www.cachoeiro.net
 Java Developer [EMAIL PROTECTED]


==


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





RE: DB changes not reflected in CMP bean.

2000-11-24 Thread Jarek Skreta

This is a very interesting question. A lot of sources claim that the update
of beans should be automatic. Otherwise how would you connect the
application to any legacy database system which can be updated bypassing the
beans.
We've just only started with Orion so I don't know the answer yet but will
do some research.

Also a kind request: could you tell us what needs to be done to connect
Oracle to Orion (we run 8.1.5 on NT)?
Many thanks,

Jarek

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Winston Ng
 Sent: 23 November 2000 20:12
 To: Orion-Interest
 Subject: DB changes not reflected in CMP bean.


 Hi All,

 This is more of an EJB question.

 I wrote a simple app using a CMP bean that talks to an Oracle DB.

 Started the server and was able to get/set information to the bean and
 subsequently see the changes in the DB.

 However, if I make any updates to the DB from sqlplus and commit the
 changes, they are not reflected in the Entity bean! The changes are only
 reflected if I restart Orion.

 Is this normal? What should I do to have the bean reflect changes in the
 database? Is that what BMP bean is for??

 Thanks for any help.
 Winston Ng.




 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com







Re: DB changes not reflected in CMP bean.

2000-11-24 Thread Sven van 't Veer



Winston Ng wrote:
 
 Hi All,
 
 This is more of an EJB question.
 
 I wrote a simple app using a CMP bean that talks to an Oracle DB.
 
 Started the server and was able to get/set information to the bean and
 subsequently see the changes in the DB.
 
 However, if I make any updates to the DB from sqlplus and commit the
 changes, they are not reflected in the Entity bean! The changes are only
 reflected if I restart Orion.
 
 Is this normal? What should I do to have the bean reflect changes in the
 database? Is that what BMP bean is for??
Yes that is absolutely normal. You can however in orion-ejb.xml set
exclusive-write-access="false" in entity-deployment.

Sven
-- 
==
Sven E. van 't Veer  
http://www.cachoeiro.net
Java Developer  [EMAIL PROTECTED]
==




RE: DB changes not reflected in CMP bean.

2000-11-24 Thread Mike Cannon-Brookes

You need to set "exclusive-write-access" to "true" (this slows the CMP down
because it checks the DB before every operation for a write).

-mike

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Jarek Skreta
 Sent: Friday, November 24, 2000 8:49 PM
 To: Orion-Interest
 Subject: RE: DB changes not reflected in CMP bean.


 This is a very interesting question. A lot of sources claim that
 the update
 of beans should be automatic. Otherwise how would you connect the
 application to any legacy database system which can be updated
 bypassing the
 beans.
 We've just only started with Orion so I don't know the answer yet but will
 do some research.

 Also a kind request: could you tell us what needs to be done to connect
 Oracle to Orion (we run 8.1.5 on NT)?
 Many thanks,

 Jarek

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Winston Ng
  Sent: 23 November 2000 20:12
  To: Orion-Interest
  Subject: DB changes not reflected in CMP bean.
 
 
  Hi All,
 
  This is more of an EJB question.
 
  I wrote a simple app using a CMP bean that talks to an Oracle DB.
 
  Started the server and was able to get/set information to the bean and
  subsequently see the changes in the DB.
 
  However, if I make any updates to the DB from sqlplus and commit the
  changes, they are not reflected in the Entity bean! The changes are only
  reflected if I restart Orion.
 
  Is this normal? What should I do to have the bean reflect changes in the
  database? Is that what BMP bean is for??
 
  Thanks for any help.
  Winston Ng.
 
 
 
 
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com
 
 








RE: DB changes not reflected in CMP bean.

2000-11-24 Thread Jarek Skreta

Winston,

The good news is that the beans do get updated automatically in the CMP
model on Orion. At least when we run the CMP Primer example. Not quite sure
why your set up does not work.
Is it possible that they get updated after a long delay? In that case it
could be something to do with setting transactions.

Jarek

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Winston Ng
 Sent: 23 November 2000 20:12
 To: Orion-Interest
 Subject: DB changes not reflected in CMP bean.


 Hi All,

 This is more of an EJB question.

 I wrote a simple app using a CMP bean that talks to an Oracle DB.

 Started the server and was able to get/set information to the bean and
 subsequently see the changes in the DB.

 However, if I make any updates to the DB from sqlplus and commit the
 changes, they are not reflected in the Entity bean! The changes are only
 reflected if I restart Orion.

 Is this normal? What should I do to have the bean reflect changes in the
 database? Is that what BMP bean is for??

 Thanks for any help.
 Winston Ng.




 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com







RE: DB changes not reflected in CMP bean.

2000-11-24 Thread Jarek Skreta

Hi,

We are using Oracle 8.1.5 with NT 4. It all runs on the same box. Maybe by
chance but we managed to connect first time. Here are some settings which
may be of help:

1. We use ODBC with Oracle ODBC driver.

2. tnsnames.ora entry for the service used by ODBC:

ORASERV1 =
  (DESCRIPTION =
(SOURCE_ROUTE = OFF)
(ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
  (ADDRESS = (PROTOCOL = IPC)(Key = oraserv1))
  (ADDRESS = (PROTOCOL = TCP)(HOST = compserv01)(PORT = 1521))
  (ADDRESS = (PROTOCOL = NMP)(Server = compserv01)(Pipe = ORAPIPE))
)
(CONNECT_DATA =
  (SID = oraserv1)
  (SRVR = DEDICATED)
)
  )

where: 'oraserv1' is the database SID, 'compserv01' is server's name

Your listener should be configured to use any of these protocols. Possibly
all of them.

3. Settings used in data-sources.xml

data-source
class="com.evermind.sql.ConnectionDataSource"
name="Oracle"
location="jdbc/DefaultCoreDS"
xa-location="jdbc/xa/DefaultXADS"
ejb-location="jdbc/DefaultDS"
connection-driver="sun.jdbc.odbc.JdbcOdbcDriver"
username="danny"
password="murphy"
url="jdbc:odbc:yourdsn"
inactivity-timeout="30"
/

where 'yourdsn' is the ODBC DSN name.

Hope this is of help.

Jarek

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of John N. Alegre
 Sent: 24 November 2000 19:40
 To: Orion-Interest
 Subject: Re: DB changes not reflected in CMP bean.


 We have got this to work on Oracle running on Solaris and Linux.  All
 attempts to use Oracle 8.1.5 on NT are failing.  The error returned by
 Orion shows a failure in TNS lookup. However, we can write
 straight Java JDBC
 code and connect just fine.  sqlnet also connects just fine using
 the same URL
 and driver.  The failure only occurs on NT Oracle with Orion.

 I would be glad to elaborate with error codes and sample Java
 source files if
 desired.

 Is anyone using Oracle on NT with Orion?

 Peace
 john
 On 24-Nov-00 Sven van 't Veer wrote:
 
 
  To connect to Oracle you would need the oracle type4 jdbc
 drivers and create
  a
  datasource in orion/config/data-sources.xml.
 
 
 
  Sven
 
 
  --
 
 ==
 
  
 
  Sven E. van 't Veer
  http://www.cachoeiro.net
  Java Developer  [EMAIL PROTECTED]
 
 ==
 
  
 
 
 

 --
 E-Mail: John N. Alegre [EMAIL PROTECTED]
 Date: 24-Nov-00
 Time: 13:32:46

 This message was sent by XFMail
 --