Jabber and Orion

2001-07-05 Thread Elhadi barkat

Has anyone tried Jabber with Orion? what is your experience?
Hadi

Jabber is an instant messaging server similar to ICQ..., completely built on
XML
www.jabber.org






JMS for non-java clients !!

2001-07-03 Thread Elhadi barkat

hi,
is it possible to use the JMS Server with non -java applications as JMS
Clients?
(both pub/sub & p2p)


Hadi







Orion tries to use more connections that the maximum # of connections that are allowed! Why?

2001-04-05 Thread Elhadi barkat

If I use Orion's connection pool with a database that has only a few
connections (5-10)
and I explicitly define it in the data-sources.xml file

Why do I get error messages saying that the maximum number of applications
is already connected to the database.
"
2001-04-05 15:16:30,012 ERROR [ApplicationServerThread]
(Controller.java:87) -
com.evermind.server.rmi.OrionRemoteException: javax.ejb.EJBException:
Error saving state: [IBM][CLI Driver] SQL1040N  The maximum number of
applications is already connected to the database.  SQLSTATE=57030; nested
exception is:javax.ejb.EJBException:
Error saving state: [IBM][CLI Driver] SQL1040N  The maximum number of
applications is already connected to the database.  SQLSTATE=57030
"

as I understand the connection pool, Orion should not use connections if the
maximum allowed is already in use?
could someone explain me Orion's Connection pool with a limited
database(limited number of conections)

Thanks
Hadi






RE: java.lang.NoSuchMethodError: javax.naming.Context: method getNameInNamespace()

2001-03-30 Thread Elhadi barkat

just a guess!
I would try to redeploy the server
but before, erase all previous deployments files

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Oscar S.
Garcia
Sent: vendredi, 30. mars 2001 11:01
To: Orion-Interest
Subject: java.lang.NoSuchMethodError: javax.naming.Context: method
getNameInNamespace()



Question: What could be the problem with the error like this?

Error:

Auto-deploying travelagent (Assembly had been updated)...

java.lang.NoSuchMethodError: javax.naming.Context: method
getNameInNamespace()Ljava/lang/String; not found

 at com.evermind.naming.archive.jr.toString(JAX)

 at java.lang.String.valueOf(Compiled Code)

 at java.lang.StringBuffer.append(StringBuffer.java:365)

 at com.evermind.server.ServerComponent.ay(JAX)

 at com.evermind.server.ejb.EJBPackageDeployment.aev(JAX)

 at com.evermind.server.ejb.EJBContainer.bz(Compiled Code)

 at com.evermind.server.Application.bz(Compiled Code)

 at com.evermind.server.Application.gf(JAX)

 at com.evermind.server.ApplicationServer.rv(JAX)

 at com.evermind.server.ApplicationServer.aqb(Compiled Code)

 at com.evermind.server.ApplicationServer.gf(JAX)

 at com.evermind.server.hg.run(JAX)

 at com.evermind.util.f.run(Compiled Code)



Oscar S. Garcia
Senior Analyst/Programmer
ITS International Inc.
Tel: 913-0707 to 10







RE: java.lang.OutOfMemoryError

2001-03-27 Thread Elhadi barkat

This is beacause Orion doesn't free unused beans
you need to use the inactivity-timeout attribute in the orion-ejb-jar.xml
file
it serves to free unused beans :


H.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of theo van
niekerk
Sent: mardi, 27. mars 2001 16:31
To: Orion-Interest
Subject: java.lang.OutOfMemoryError


Hi there

Orion is a great application server for small web apps. (We have deployed 2
small sites using orion with success).

But the moment you start thinking of using it for bigger more serious apps
it will always throw a java.lang.OutOfMemoryError

The problem: Orion does not passivate EJB's.

Attached an EAR file that will show this.

How to deploy..

Change your server.xml file to include something like..



Start orion the normal way..

java -jar orion.jar

Well, I don't know how to execute an external client that reference classes
inside a jar that is inside an ear, but the following works fine..

Unjar/Unzip the EAR
Unjar/Unzip the JARS

(I've used the directory structures..
c:\work\oriontest
c:\work\oriontest\test-ejb
c:\work\oriontest\test-client

and orion.jar is in..

c:\PRG\orion)

execute..
c:\work\oriontest\test-client\test.cmd

or cd to..
c:\work\oriontest

and execute..
c:\java\jdk1.3\bin\java -cp .;test-client;test-ejb;c:\PRG\orion\orion.jar
tests.TestClient 1 10 2000


PARAMS..
index of first bean to create = 1
create 10 beans
refresh home reference every 2000 creations (thought it could make a
difference)

and after 6410 creations..

Created bean...6410
Exception in thread "main" java.lang.OutOfMemoryError
at com.evermind.server.rmi.bb.invokeMethod(JAX)
at com.evermind.server.rmi.a2.invoke(JAX)
at com.evermind.server.rmi.a3.invoke(JAX)
at __Proxy0.create(Unknown Source)
at tests.TestClient.loopTest(TestClient.java:33)
at tests.TestClient.main(TestClient.java:39)

And about 7 seconds later on the server side..
a single bean gets passivated

Good Luck











db2 : database agent could not be started to service a request

2001-03-26 Thread Elhadi barkat

I'm running Orion with a db2 v7.1 database that only allows 5 simultaneous
connections
Sometimes, I get the an error that says: database agent could not be started
to service the request
When I look at my code, I can see that the exception is generated by a
finder method on an entity bean
(custom finder not a Primary Key finder)
is it because there are no available connections?
Why does the error happen since I'm using conncetion pooling?
is it related to bug #368 () ?
Is it related to data-sources.xml and connection pool configuration?

thanks,
Hadi


Below is my exception's stack trace

45605898 ERROR [ApplicationServerThread] (CoverageAgentBean.java:67) -
Remote Exception
com.evermind.server.rmi.OrionRemoteException: Database error: [IBM][CLI
Driver][DB2/LINUX] SQL1224N  A database agent could not be started to
service a request, or was terminated as a result of a database system
shutdown or a force command.  SQLSTATE=55032

at
BaseStationHome_EntityHomeWrapper107.findByStatus(BaseStationHome_EntityHome
Wrapper107.java:651)
at
com.shockfish.spotme.system.ejbmanager.CoverageAgentBean.getActiveBaseStatio
ns(CoverageAgentBean.java:63)
at
CoverageAgent_StatelessSessionBeanWrapper20.getActiveBaseStations(CoverageAg
ent_StatelessSessionBeanWrapper20.java:133)
at
com.shockfish.spotme.utils.net.NetTools.sendToAllBaseStations(NetTools.java:
38)
at
com.shockfish.spotme.system.ejbmanager.CoverageAgentBean.requestCoverageFrom
BaseStation(CoverageAgentBean.java:102)
at
CoverageAgent_StatelessSessionBeanWrapper20.requestCoverageFromBaseStation(C
overageAgent_StatelessSessionBeanWrapper20.java:211)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.bd.dr(JAX)
at com.evermind.util.f.run(JAX)

Nested exception is:
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL1224N  A
database agent could not be started to service a request, or was terminated
as a result of a database system shutdown or a force command.
SQLSTATE=55032

at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGe
nerator.java:241)
at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGe
nerator.java:186)
at
COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGen
erator.java:419)
at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java
:1029)
at
COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(DB2PreparedStatement.
java:655)
at com.evermind.sql.ap.executeQuery(JAX)
at com.evermind.sql.ap.executeQuery(JAX)
at
BaseStationHome_EntityHomeWrapper107.findByStatus(BaseStationHome_EntityHome
Wrapper107.java:535)
at
com.shockfish.spotme.system.ejbmanager.CoverageAgentBean.getActiveBaseStatio
ns(CoverageAgentBean.java:63)
at
CoverageAgent_StatelessSessionBeanWrapper20.getActiveBaseStations(CoverageAg
ent_StatelessSessionBeanWrapper20.java:133)
at
com.shockfish.spotme.utils.net.NetTools.sendToAllBaseStations(NetTools.java:
38)
at
com.shockfish.spotme.system.ejbmanager.CoverageAgentBean.requestCoverageFrom
BaseStation(CoverageAgentBean.java:102)
at
CoverageAgent_StatelessSessionBeanWrapper20.requestCoverageFromBaseStation(C
overageAgent_StatelessSessionBeanWrapper20.java:211)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.bd.dr(JAX)
at com.evermind.util.f.run(JAX)





RE: Trouble with the mailing list since Monday

2001-03-26 Thread Elhadi barkat

I didn't notice any problem with the mailing list yesterday
H.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Randahl Fink
Isaksen
Sent: mardi, 27. mars 2001 08:43
To: Orion-Interest
Subject: Trouble with the mailing list since Monday


I just wanted to check if anyone else on the list have had trouble getting
the e-mails from the list. As of monday our mail server has started to can
all e-mails from the list, saying they contain errors. All our other e-mails
are delivered, so it seems our mail server works fine. Up until monday we
have been receiving each and every mail from the list, but then all of a
sudden this happens - has the list servers configuration been changed
recently, maybe?

Anyone?

R.







RE: How to start Orion from an application?

2001-03-26 Thread Elhadi barkat

I've written the following code to start Orion from another application

import com.evermind.server.*;
public class MemoryMonitor {
...
public static void main(String args[]) {
try {
ApplicationServer.main(new String[] {});

  }catch (Exception e) {
cat.error("error in memory monitoring Program", e);
}
}

The server is started but I think that it is not done the clean way because
When I run my J2EE Applications, I get Naming Error:
Orion/1.4.7 initialized
[NetTools] JNDI Error :java:comp/env namespace is only available from within
a J2EE component
2001-03-26 09:56:29,978 ERROR [ApplicationServerThread]
(DBAgentBean.java:148) -  JNDI naming errorjava:comp/env namespace is only
available from within a J2EE component
javax.naming.NamingException: java:comp/env namespace is only available from
within a J2EE component
at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLCon
text.java:392)
at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
com.shockfish.spotme.utils.ejbmanager.DBAgentBean.transmitDatabase(DBAgentBe
an.java:73)
at
DBAgent_StatelessSessionBeanWrapper24.transmitDatabase(DBAgent_StatelessSess
ionBeanWrapper24.java:52)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.bd.dr(JAX)
at com.evermind.util.f.run(JAX)

I think I need to pass arguments to the main method? or maybe there is
smthng I'm missing?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert Krueger
Sent: lundi, 26. mars 2001 12:58
To: Orion-Interest
Subject: Re: How to start Orion from an application?


just check the manifest of orion.jar

Main-Class: com.evermind.server.ApplicationServer

hth,

robert


At 10:18 26.03.2001 , you wrote:
>Instead of launching the application server with java -jar orion.jar
>I would like to do it from an application
>I guess I need to know which classes I need to start and how to do it
>Does anyone know the way to achieve this?
>Hadi
>

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de







How to start Orion from an application?

2001-03-26 Thread Elhadi barkat

Instead of launching the application server with java -jar orion.jar
I would like to do it from an application
I guess I need to know which classes I need to start and how to do it
Does anyone know the way to achieve this?
Hadi



BEGIN:VCARD
VERSION:2.1
N:Barkat;Elhadi;;M.
FN:Elhadi Barkat
NICKNAME:hadi
ORG:shockfish
TEL;HOME;VOICE:+41(0)213117289
TEL;CELL;VOICE:+41(0)763810511
ADR;WORK:;;PSE - EPFL;Lausanne;VD;1015;Switzerland
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:PSE - EPFL=0D=0ALausanne, VD 1015=0D=0ASwitzerland
ADR;HOME:;;Rue de la Tour 35;Lausanne;VD;1004;Switzerland
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Rue de la Tour 35=0D=0ALausanne, VD 1004=0D=0ASwitzerland
URL:http://diwww.epfl.ch/~ebarkat
URL:http://www.shockfish.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20001026T133703Z
END:VCARD



RE: Impossible getting the attention of the orion (support) team. Are they still around?

2001-03-20 Thread Elhadi barkat

Is release 1.4.8 already available, because I'm having the same bug?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Douma, Ate
Sent: mardi, 20. mars 2001 14:42
To: Orion-Interest
Subject: RE: Impossible getting the attention of the orion (support)
team. Are they still around?


FYI:

My reported bug was fixed by the orion team (to be release in 1.4.8) within
2.5 hours after entering it into Bugzilla.

Can't really ask for more, can I?

Ate


> -Original Message-
> From: Douma, Ate [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 20, 2001 11:04 AM
> To: Orion-Interest
> Subject: RE: Impossible getting the attention of the orion (support)
> team. Are they still around?
> 
> 
> As of today, we receive the maillist directly again.
> Furthermore, I received my bugzilla account password and 
> already entered our
> problem in bugzilla (bug 368).
> The mailserver problem thus seems to be resolved by orion (we 
> didn't have to
> do anything).
> 
> Thumbs up for orion for the quick response.
> Now if they could resolve our real problem (almost) just as 
> quickly ... :-)
> 
> All in all, my confidence in orion has been partly restored.
> Lets hope they get their application server support back into 
> high speed
> soon.
> 
> Ate
> 
> > -Original Message-
> > From: Douma, Ate [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, March 19, 2001 12:47 PM
> > To: Orion-Interest
> > Subject: RE: Impossible getting the attention of the orion (support)
> > team. Are they still around?
> > 
> > 
> > FYI:
> > 
> > I received a very quick response from Karl Avedal on me 
> > previous posting.
> > It looks like their mail doesn't get through to our 
> > mailserver since they
> > switched servers early january.
> > 
> > We are again in contact and I'm very much relieved about that.
> > 
> > Hopefully, we can resolve our problems quickly now.
> > 
> > Ate Douma.
> > 
> > > -Original Message-
> > > From: Douma, Ate 
> > > Sent: Monday, March 19, 2001 11:24 AM
> > > To: 'Orion-Interest'
> > > Subject: Impossible getting the attention of the orion 
> > (support) team.
> > > Are they still around?
> > > 
> > > 
> > > Hello all,
> > > 
> > > I've been trying for weeks now getting any response from the 
> > > orion team to no avail.
> > > 
> > > First of all, I wanted to post a serious problem in Bugzilla 
> > > but for that I need a account password.
> > > I've tried and tried, but never ever received a password 
> > > after creating a new account or after requesting the account 
> > > password to be send again.
> > > 
> > > Then I tried sending a message directly to orion support. 
> > No response.
> > > 
> > > Then I posted my problem to this list 
> > > http://www.mail-archive.com/orion-interest@orionserver.com/msg
> > > 09692.html (Serious problem with Orion transaction 
> > > processing: multiple connections used within a single 
> > > transaction) februari 13, 2001, including a test case.
> > > 
> > > I mailed this problem again to [EMAIL PROTECTED] 
> > > februari 19, 2001. No response.
> > > 
> > > I mailed Magnus Stenman directly on februari 27 explaining 
> > > these problems and requesting access to Bugzilla. No response.
> > > 
> > > I'm not clear what options are left, but we are seriously 
> > > considering other application servers right now as this kind 
> > > of support is really not acceptable in the long run. At least 
> > > a simple acknowledgment of the reception of the problem would 
> > > give us the idea that someone is actually monitoring 
> > > [EMAIL PROTECTED] mailbox. It doesn't seems to be the 
> > > case right now.
> > > 
> > > Having to switch to another application server is something I 
> > > really don't like.
> > > Overall I like the orion application server very much 
> > > (certainly for development).
> > > We consider the bug we encountered as very, very serious 
> > > which will have to be solved otherwise we just don't have 
> > > another option.
> > > The bad (non-existing?) support makes this truly serious.
> > > 
> > > If anyone did have some contact with the orion team 
> > > (mailbased or otherwise) in the last month's I would be very 
> > > grateful to know how they did that.
> > > 
> > > The same question I have for anyone how was able to create a 
> > > Bugzilla account recently.
> > > 
> > > Lastly, somewhat less important: does anyone receive the 
> > > orion-interest maillist still directly to their mailbox?
> > > Since Januari 11, 2001, we didn't receive any mail anymore, 
> > > and can therefore only access the maillist at 
> > http://www.mail-archive.com/orion-interest@orionserver.com. 
> > (re)Subscribing
> > again didn't help a bit, not even using new mailaccount.
> > 
> > 
> > Ate
> > 
> > +---+
> > | Ate Douma  iWise B.V. |
> > |Hoofdstraat 2a-4a  |
> > | mailto:[EMAIL PROTECTED]

How to log datasource.verbose info to a file?

2001-03-14 Thread Elhadi barkat

I'm printing datasource information to the console by launching Orion with
java -Ddatasource.verbose=true -jar orion.jar
In fact I would like to log this information to a file in order to track it
more easily
Has anyone succeded in doing this?





Preparing Performance Tests...

2001-03-12 Thread Elhadi barkat

I'm actually preparing performance tests for our applications
and I have two questions:
How to get logs about database connections' handling made by the container?
How to monitor the memory used by Orion itself + the applications running on
the server?
 I would appreciate any answer on these two topics

Hadi





has anyone achieved to configure DB Connection Pool w/ DB2 ?

2001-01-19 Thread Elhadi barkat

Hi,
Under stress, one of my beans is causing deadlocks!!
I'm wondering if it is a connection pool problem or not
Does anyone of you configured DBConnectionPool succesfully with DB2

I have a maximum of 5 connections and I'm using this db configuation
file:







I'm really strugguling on this bug, please help!!

Hadi





workaround for bug #170

2001-01-18 Thread Elhadi barkat

Yesterday, I've posted a message about a deadlock with concurent access to
an entity bean
Juan Lorandi told me about bug #170. I found it in bugzilla but couldn't
find its workaround

If one could send it to me it would be great

Hadi







RE: IBM DB2 database schema

2001-01-18 Thread Elhadi barkat

take a look at this message
http://www.mail-archive.com/orion-interest@orionserver.com/msg07615.html

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of hartmut wilms
Sent: jeudi, 18. janvier 2001 09:43
To: Orion-Interest
Subject: IBM DB2 database schema


Hello everyone,

has anybody created a DB2 database-schema? I copied oracle.xml and changed
some mappings. But I'm no DB2-dude, so I would really appreciate a working
DB2 schema.

I got some errors when auto-creating tables. Something must be wrong...






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.
>
>
>
>
>












Help: deadlock with concurent access to entity bean

2001-01-17 Thread Elhadi barkat

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.
>
>
>
>
>







ejbLoad : Error retrieving a picture from DB

2000-12-27 Thread Elhadi barkat

Hi,
I have a problem with Blobs&Entity Beans with
Orion 1.2 and DB2 7.1

I'm getting the following exception while retrieving a picture from DB into
an entity bean
Error in ejbLoad : java.lng.AbstractMethodError:
COM/ibm/db2/jdbc/app/DB2ResultSet.getBlob

Nested exception is:
java.lng.AbstractMethodError: COM/ibm/db2/jdbc/app/DB2ResultSet.getBlob
at PhotoBean.ejbLoad(PhotoBean.java:146)
at
Photo_EntityBeanWrapper117.loadState(Photo_EntityBeanWrapper117.java:426)
at
PhotoHome_EntityHomeWrapper198.findExistingEntity(PhotoHome_EntityHomeWrappe
r198:37)
at
PhotoHome_EntityHomeWrapper198.findByPrimaryKey(PhotoHome_EntityHomeWrapper1
98.java:232)


my entity bean contains [ id(int) +  array of bytes to hold the picture]
the table [id + Blob]

my code in ejbLoad :

Context ctx = new InitialContext();
DataSource datasource = (DataSource) ctx.lookup("jdbc/DefaultEJBDS");
conn = datasource.getConnection();
ps = conn.prepareStatement("SELECT photoImage FROM photo WHERE photoId=?");
ps.setInt(1, id);
rs = ps.executeQuery();

if (rs.next()) {
String colName = "image";
Blob blobObj = rs.getBlob(colName);
if (blobObj == null){
System.out.println("[PhotoBean|ejbLoad] Error creating Blob object - 
Blob
object is null");
}else{
int imgSize = (int)blobObj.length();
// Create byte[] data array to store picture data temporarily
// before writing it to a file
image = new byte[imgSize];
// Retrieve the picture as a binary stream from the Blob object
InputStream is = blobObj.getBinaryStream();
// Store the binary stream from above into image byte[] array
is.read(image);
  }
}

db2.xml schema:
---


In the beggining I was afraid that JDBC driver for DB2 doesn't supports
blobs
but the same code works often just after the insert of the picture in
DB(???)

How do I fix this? Any clues?
Regards
Hadi





RE: apache SOAP

2000-11-01 Thread Elhadi barkat - s h o c k f i s h /



derek,
 
we've 
just started using Apache SOAP on Orion;
 
Our 
project requests to allow mobile stations as well as basestations/relays to talk 
to servlets and EJBs in our Orion AS
and 
send the data back and forth. We use 
SOAP(XML/HTTP)
 
we 
wrote a SOAP generic Client in Java(for easy testing) and started 
writing an EJB access over SOAP based on Apache's 
RPCRouterServlet
For 
this, we're facing a lot of issues in addition to the fact 
that Apache's SOAP APi is quite hard to 
master
 
 
Which 
format should we use in order to let the client know the less possible 
about implementation in the server?
 
and 
many other points we could discuss
 
h a d 
i /

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Derek 
  AkersSent: mercredi, 1. novembre 2000 17:23To: 
  Orion-InterestSubject: apache SOAP
  has anyone successfully, or is anyone currently 
  working on, installing and using Apache SOAP on orion?  I am attempting 
  to do this now... perhaps we can be of help to one 
another?