RE: Help: deadlock with concurent access to entity bean

2001-01-18 Thread Juan Lorandi (Chile)

Oracle, MS SQL, Sybase 11 & 12, Hypersonic
database-schemas are key in this...

However, I don't store files in the database but have built a service that
sync's a number of dir's in a cluster/island, so it handles all file
replication
without hitting the DB; I map Objects to clob in Oracle, VARBINARY in Sybase
& MSSQL.
I haven't persisted any object above 30 K
-Original Message-
From: Agus K. Pranantoseno [mailto:[EMAIL PROTECTED]]
Sent: Miércoles, 17 de Enero de 2001 22:52
To: Orion-Interest
Subject: Re: Help: deadlock with concurent access to entity bean


Do u succedded using BLOB to map a picture ?? do u experiance size limit ??
i have tried CMP picture bean myself (mapped to bean) but somehow on image
more than 1k it's failed to store to the db (no exception thrown) so i used
LONG RAW instead (i used oracle as db). what database do u used ??

- Original Message -
From: Juan Lorandi (Chile) <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 5:36 AM
Subject: RE: Help: deadlock with concurent access to entity bean


check Bug #161 & Bug #170 in bugzilla...
supposedly there's a workaround to Bug #170, but I'm not clear on exactly
how to use it

JP

-Original Message-
From: Elhadi barkat [mailto:[EMAIL PROTECTED]]
Sent: Miércoles, 17 de Enero de 2001 16:57
To: Orion-Interest
Subject: Help: deadlock with concurent access to entity bean


Hi,
During heavy test of my CMP picture bean (mapped to a table with a BLOB),
deadlocks occur when I try to access it concurently from different clients,
a threaded java application, a web client and a proprietary messaging
service within orion

The result is that my db table is no more accessible and I don't get any
exceptions

Could someone give me a push on this issue. I'm stucked on it for the day
Hadi

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
Sent: mercredi, 17. janvier 2001 19:10
To: Orion-Interest
Cc: Claes Theander
Subject: Re: Stand-alone-client


Try using:
   prop.setProperty(
  "java.naming.factory.initial",
  "com.evermind.server.rmi.ApplicationClientInitialContextFactory");

> Hello!
>
> I'm trying to connect to my EJB's from a stand alone client like this:
>
> Properties prop = new Properties();
>
>
prop.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMII
nitialContextFactory");
>
>
> prop.setProperty("java.naming.provider.url","ormi://localhost/myApp");
> prop.setProperty("java.naming.security.principal","admin");
> prop.setProperty("java.naming.security.credentials","123");
> Context con = new InitialContext(prop);
> boundObject = con.lookup("java:comp/env/ejb/XXXHome");
> xxxHome =
> (XXXHome)PortableRemoteObject.narrow(boundObject,XXXHome.class);
>
> Im getting this error message:
> "javax.naming.NameNotFoundException: java:comp/env/ejb/XXHome not
> found."
> I know that the EJB's are working cause I'm able to access them from a
> jsp-page.
> I have refs to the EJB in application-client.xml.
>
> Any suggestions ?
> /C.
>
>
>
>
>










RE: Help: deadlock with concurent access to entity bean

2001-01-18 Thread Elhadi barkat

Storing Images works for me using DB2
it should also works with DBs supporting BLOB
1) first check that your db schema config file defines a mapping between
java.io.Serializable and BLOB

2) implement a Picture class that implements
Serializable
--->
public class Picture implements Serializable {
  public Object data;
  public Picture(){}
  public void setData(byte[] data) {
this.data = data.clone();
  }

  public byte[] getData() {
   return (byte[])data;
  }
}

3) in your bean declare your picture as an instance of Picture class and
deploy it as a container
managed field

Hope it'll work for you

As you read it in my previous message, I'm facing deadlocks with a heavy
concurent access to PictureBean
I'm still searching for a solution


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Agus K.
Pranantoseno
Sent: jeudi, 18. janvier 2001 02:52
To: Orion-Interest
Subject: Re: Help: deadlock with concurent access to entity bean


Do u succedded using BLOB to map a picture ?? do u experiance size limit ??
i have tried CMP picture bean myself (mapped to bean) but somehow on image
more than 1k it's failed to store to the db (no exception thrown) so i used
LONG RAW instead (i used oracle as db). what database do u used ??

- Original Message -
From: Juan Lorandi (Chile) <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 5:36 AM
Subject: RE: Help: deadlock with concurent access to entity bean


check Bug #161 & Bug #170 in bugzilla...
supposedly there's a workaround to Bug #170, but I'm not clear on exactly
how to use it

JP

-Original Message-
From: Elhadi barkat [mailto:[EMAIL PROTECTED]]
Sent: Miércoles, 17 de Enero de 2001 16:57
To: Orion-Interest
Subject: Help: deadlock with concurent access to entity bean


Hi,
During heavy test of my CMP picture bean (mapped to a table with a BLOB),
deadlocks occur when I try to access it concurently from different clients,
a threaded java application, a web client and a proprietary messaging
service within orion

The result is that my db table is no more accessible and I don't get any
exceptions

Could someone give me a push on this issue. I'm stucked on it for the day
Hadi

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
Sent: mercredi, 17. janvier 2001 19:10
To: Orion-Interest
Cc: Claes Theander
Subject: Re: Stand-alone-client


Try using:
   prop.setProperty(
  "java.naming.factory.initial",
  "com.evermind.server.rmi.ApplicationClientInitialContextFactory");

> Hello!
>
> I'm trying to connect to my EJB's from a stand alone client like this:
>
> Properties prop = new Properties();
>
>
prop.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMII
nitialContextFactory");
>
>
> prop.setProperty("java.naming.provider.url","ormi://localhost/myApp");
> prop.setProperty("java.naming.security.principal","admin");
> prop.setProperty("java.naming.security.credentials","123");
> Context con = new InitialContext(prop);
> boundObject = con.lookup("java:comp/env/ejb/XXXHome");
> xxxHome =
> (XXXHome)PortableRemoteObject.narrow(boundObject,XXXHome.class);
>
> Im getting this error message:
> "javax.naming.NameNotFoundException: java:comp/env/ejb/XXHome not
> found."
> I know that the EJB's are working cause I'm able to access them from a
> jsp-page.
> I have refs to the EJB in application-client.xml.
>
> Any suggestions ?
> /C.
>
>
>
>
>












Re: Help: deadlock with concurent access to entity bean

2001-01-17 Thread Agus K. Pranantoseno

Do u succedded using BLOB to map a picture ?? do u experiance size limit ??
i have tried CMP picture bean myself (mapped to bean) but somehow on image
more than 1k it's failed to store to the db (no exception thrown) so i used
LONG RAW instead (i used oracle as db). what database do u used ??

- Original Message -
From: Juan Lorandi (Chile) <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 5:36 AM
Subject: RE: Help: deadlock with concurent access to entity bean


check Bug #161 & Bug #170 in bugzilla...
supposedly there's a workaround to Bug #170, but I'm not clear on exactly
how to use it

JP

-Original Message-
From: Elhadi barkat [mailto:[EMAIL PROTECTED]]
Sent: Miércoles, 17 de Enero de 2001 16:57
To: Orion-Interest
Subject: Help: deadlock with concurent access to entity bean


Hi,
During heavy test of my CMP picture bean (mapped to a table with a BLOB),
deadlocks occur when I try to access it concurently from different clients,
a threaded java application, a web client and a proprietary messaging
service within orion

The result is that my db table is no more accessible and I don't get any
exceptions

Could someone give me a push on this issue. I'm stucked on it for the day
Hadi

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
Sent: mercredi, 17. janvier 2001 19:10
To: Orion-Interest
Cc: Claes Theander
Subject: Re: Stand-alone-client


Try using:
   prop.setProperty(
  "java.naming.factory.initial",
  "com.evermind.server.rmi.ApplicationClientInitialContextFactory");

> Hello!
>
> I'm trying to connect to my EJB's from a stand alone client like this:
>
> Properties prop = new Properties();
>
>
prop.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMII
nitialContextFactory");
>
>
> prop.setProperty("java.naming.provider.url","ormi://localhost/myApp");
> prop.setProperty("java.naming.security.principal","admin");
> prop.setProperty("java.naming.security.credentials","123");
> Context con = new InitialContext(prop);
> boundObject = con.lookup("java:comp/env/ejb/XXXHome");
> xxxHome =
> (XXXHome)PortableRemoteObject.narrow(boundObject,XXXHome.class);
>
> Im getting this error message:
> "javax.naming.NameNotFoundException: java:comp/env/ejb/XXHome not
> found."
> I know that the EJB's are working cause I'm able to access them from a
> jsp-page.
> I have refs to the EJB in application-client.xml.
>
> Any suggestions ?
> /C.
>
>
>
>
>










RE: Help: deadlock with concurent access to entity bean

2001-01-17 Thread Juan Lorandi (Chile)

check Bug #161 & Bug #170 in bugzilla...
supposedly there's a workaround to Bug #170, but I'm not clear on exactly
how to use it

JP

-Original Message-
From: Elhadi barkat [mailto:[EMAIL PROTECTED]]
Sent: Miércoles, 17 de Enero de 2001 16:57
To: Orion-Interest
Subject: Help: deadlock with concurent access to entity bean


Hi,
During heavy test of my CMP picture bean (mapped to a table with a BLOB),
deadlocks occur when I try to access it concurently from different clients,
a threaded java application, a web client and a proprietary messaging
service within orion

The result is that my db table is no more accessible and I don't get any
exceptions

Could someone give me a push on this issue. I'm stucked on it for the day
Hadi

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
Sent: mercredi, 17. janvier 2001 19:10
To: Orion-Interest
Cc: Claes Theander
Subject: Re: Stand-alone-client


Try using:
   prop.setProperty(
  "java.naming.factory.initial",
  "com.evermind.server.rmi.ApplicationClientInitialContextFactory");

> Hello!
>
> I'm trying to connect to my EJB's from a stand alone client like this:
>
> Properties prop = new Properties();
>
>
prop.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMII
nitialContextFactory");
>
>
> prop.setProperty("java.naming.provider.url","ormi://localhost/myApp");
> prop.setProperty("java.naming.security.principal","admin");
> prop.setProperty("java.naming.security.credentials","123");
> Context con = new InitialContext(prop);
> boundObject = con.lookup("java:comp/env/ejb/XXXHome");
> xxxHome =
> (XXXHome)PortableRemoteObject.narrow(boundObject,XXXHome.class);
>
> Im getting this error message:
> "javax.naming.NameNotFoundException: java:comp/env/ejb/XXHome not
> found."
> I know that the EJB's are working cause I'm able to access them from a
> jsp-page.
> I have refs to the EJB in application-client.xml.
>
> Any suggestions ?
> /C.
>
>
>
>
>