Re: URGENT: talking with other app server?

2000-11-08 Thread Shailesh Joshi

Hi James.

I think , you can implement it.
Your servlet  will just act as a client for other Application server.

For weblogic, you can download the evaluation version of Weblogic which is
free.
After deploying the bean to Weblogic you can include following lines
in the servlet.

Properties p = new Properties();
p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialC
ontextFactory");

p.put(javax.naming.Context.PROVIDER_URL,"t3://host-IP:7001");
p.put(Context.SECURITY_PRINCIPAL,"username");
p.put(Context.SECURITY_CREDENTIALS,"password");

 Context cx = new InitialContext(p);
 Object objHome  = cx.lookup("jndi-name"); [jndi-name  which is
specified in weblogic-ejb-jar.xml]
.etc.

While running Orion you have to also provide the classpath for Weblogic to
get Initial Context factory
which can be
weblogic-root\classes .


- Original Message -
From: James Ho [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, November 07, 2000 9:31 AM
Subject: URGENT: talking with other app server?


 Hi everyone.

 Is it possible for a servlet deployed in orion talk to other app server
 to access its beans?  if so, how? what is the requirement?


 I have got Orion using JNDI to use another Orion's bean, my main concern
 is the fact that when initiating the JNDI context, I would have to
 setthe property:
 Properties props = new Properties();
 props.put("java.naming.factory.initial",
 "com.evermind.server.rmi.RMIInitialContextFactory");
 props.put("java.naming.provider.url", provider.getPath());
 props.put("java.naming.security.principal",
 provider.getRemoteLogin());
 props.put("java.naming.security.credentials",
 provider.getRemotePasswd());
 props.put("dedicated.connection","true");
 props.put("classLoader",StampHome.class.getClassLoader());
 context = new InitialContext(props);

 What if talking with weblogic?  I would have to change the
 ContextFactory..can I download any impl from weblogic and use it (for
 free) ?

 If you can help, please reply Asap, thanks a million!

 James.





Re: EJB-lookup problems with moved Product ejb example

2000-10-17 Thread Shailesh Joshi

Hi Vivek.

I think, the error you got in the fifth step is because you have changed
from  ejbsamples domain to pricing. So you have to specify it in the
URL.
You can use following lines while running the client.

Properties p = new Properties();


p.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClient
InitialContextFactory");
  p.put(Context.PROVIDER_URL,"ormi://IPAddress/pricing");
  p.put(Context.SECURITY_PRINCIPAL,"username");
  p.put(Context.SECURITY_CREDENTIALS,"password");

  Context context = new InitialContext(p);
.....context.lookup(..)  etc.

Shailesh Joshi
Java Programmer
Versaware (India) Ltd.

- Original Message -
From: Vivek Iyer [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, October 17, 2000 8:40 AM
Subject: EJB-lookup problems with moved "Product" ejb example




 Hello all,

 I'm getting a frustrating problem trying to bring up the "Product" entity
bean
 inside Orion 1.4.0 (after latest autoupdate - though I had the problem
with
 1.3.4 as well). It only happens _after_ I move the location of the class
files
 from d:\orion\demo\ejb\product to d:\vivek\pricing\ejb\product.

 The error I get is (ultimately):

 D:\vivek\pricing\ejb\productjava ProductClient
 Communication error: Error reading application-client descriptor: No
 location specified and no suitable instance of the type 'Product' found
 for the ejb-ref MyProduct

 Is this an obvious problem? I can't believe this is just happening because
I
 change the location of the class files and meta-inf files. I noticed
someone
 else got this error some time ago, but no solution was posted.  Here's the
gory
 story, steps 1 through 7:

 System: WinNT4 SP6
 JDK: 1.2.2
 CLASSPATH: .;
 d:\orion\orion.jar;d:\orion\jndi.jar;d:\orion\servlet.jar;d:\orion\ejb.jar

 1. INITIALIZED ORION, deployed the ejbsamples, and the "ProductClient"
 successfully ran, out-of-the-box. All classes are located in
 d:\orion\demo\ejb\product\

 2. COPIED the jndi.properties, ProductEJB, ProductHome and Product (remote
 interface) and ProductClient to d:\vivek\pricing\ejb\product\ and all the
 meta-inf files (application-client.xml, ejb-jar.xml,
 orion-application-client.xml) _without change_, recompiled all the files.
Added
 an application.xml file into d:\vivek\pricing\ejb\meta-inf\application.xml
with
 the following lines -

 application
  display-namePricing/display-name
  module
   ejbproduct/ejb
  /module
 /application

 3. COMMENTED out the "ejbsamples" part of orion's server.xml. Deleted that
 application's deployment files. Added the following application to
server.xml:

 application name="pricing" path="d:\\vivek\\pricing\\ejb" /

 4. RESTARTED Orion. Observed that

 Auto-deploying pricing (New server version detected)...
 Auto-deploying product (No previous deployment found)... done.
 Orion/1.4.0 initialized

 5. RAN ProductClient, and got this message -

 D:\vivek\pricing\ejb\productjava ProductClient
 Exception in thread "main" java.lang.SecurityException: No such
domain/applicati
 on: ejbsamples
 at com.evermind.server.rmi.bd.gk(JAX)
 at com.evermind.server.rmi.bd.gk(JAX)
 at com.evermind.server.rmi.bd.f3(JAX)
 at com.evermind.server.rmi.RMIServer.f3(JAX, Compiled Code)
 at com.evermind.server.rmi.RMIContext.lookup(JAX)
 at com.evermind.server.administration.LazyResourceFinder.f3(JAX)
 at
com.evermind.server.administration.LazyResourceFinder.getEJBHome(JAX)

 at com.evermind.server.Application.aqo(JAX, Compiled Code)
 at
com.evermind.server.ApplicationClientInitialContextFactory.getInitial
 Context(JAX, Compiled Code)
 at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
 72)
 at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250
 )
 at javax.naming.InitialContext.init(InitialContext.java:226)
 at javax.naming.InitialContext.init(InitialContext.java:182)
 at ProductClient.main(ProductClient.java:18)

 6. ALTERED the second line of jndi.properies:
 OLD: java.naming.provider.url=ormi://localhost/ejbsamples
 NEW: java.naming.provider.url=ormi://localhost/
 (What's up with this, anyway??)

 7. RE-RAN ProductClient, and now get the final message -

 D:\vivek\pricing\ejb\productjava ProductClient
 Communication error: Error reading application-client descriptor: No
location sp
 ecified and no suitable instance of the type 'Product' found for the
ejb-ref MyP
 roduct

 Any assistance would be appreciated. I'm sure I had this working in a much
older
  version
 of Orion, and it seems to have broken, dont know why.

 Thanks,

 Vivek







Re: Orion and MySQL

2000-10-10 Thread Shailesh Joshi
Title: Orion and MySQL



Hi Dube , Craig .

I have deployedan entity 
bean[CMP] inthe MySQL  database.

I am 
specifyingdatabase-schemas\mysql.xml  modifications in 
data-sources.xml as it is.

1]database-schemas\mysql.xml 

?xml version="1.0"?!DOCTYPE 
database-schema PUBLIC "-//Evermind//- Database schema" "http://www.orionserver.com/dtds/database-schemas.dtd"!-- 
Author : Shailesh Joshi --database-schema name="Mysql" 
not-null="not null" null="" primary-key="primary 
key"type-mapping type="java.lang.String" 
name="varchar(255)" /type-mapping type="int" name="integer" 
/type-mapping type="float" name="float" 
/type-mapping type="double" name="double" 
/type-mapping type="byte" name="smallint" 
/type-mapping type="char" name="char(1)" 
/type-mapping type="short" name="integer" 
/type-mapping type="boolean" name="bit" 
/type-mapping type="java.util.Date" name="datetime" 
/disallowed-field 
name="password" /disallowed-field name="username" 
/disallowed-field name="date" 
/disallowed-field name="text" 
//database-schema



2]Part added to 
data-sources.xml

data-source  name="MySQL" 
 class="com.evermind.sql.ConnectionDataSource" 
 location="jdbc/DefaultDS"  
pooled-location="jdbc/DefaultPooledDS"  
xa-location="jdbc/xa/DefaultXADS"  
ejb-location="jdbc/DefaultEJBDS"  
url="jdbc:mysql://IPAddress/Test" 
[Test is my database]  
connection-driver="org.gjt.mm.mysql.Driver"  
username="x"  password="x"  
inactivity-timeout="30"  
schema="database-schemas/mysql.xml"  / 

 

 
Shailesh Joshi
 
 
Java Programmer
 
 
Versaware(India) Ltd.

  - Original Message - 
  From: 
  Dube, Craig 
  
  To: Orion-Interest 
  Sent: Tuesday, October 10, 2000 1:24 
  AM
  Subject: Orion and MySQL
  
  I am trying to set up orion to use MySQL instead of 
  HypersonicSQL. I'm looking for some advice on how to properly setup 
  Orion to use the MySQL database that I have installed.
  So far I have used the MySQL admin tool to creat a database 
  called oriondb. I have also edited the "data-sources.xml" and added a 
  "mysql.xml" file under the database-schemas directory. Here is a piece 
  of the "data-sources.xml" file and a piece of the "mysql.xml":
  data-sources.xml   data-source 
   
  class="com.evermind.sql.DriverManagerDataSource"  name="MySQL"  location="jdbc/DefaultCoreDS"  xa-location="jdbc/xa/DefaultXADS"  ejb-location="jdbc/DefaultDS"  pooled-location="jdbc/DefaultPooledDS" 
   
  connection-driver="org.gjt.mm.mysql.Driver"  username="root"  password="root"  
  url="jdbc:mysql://localhost/mysql/data/oriondb"  inactivity-timeout="30"  schema="database-schemas/mysql.xml"  / 
  mysql.xml -  database-schema name="MySQL" not-null="not null" null="" 
  primary-key="primary key"  
  type-mapping type="java.lang.String" name="char (255)" / 
   type-mapping type="int" name="int" 
  /  type-mapping type="long" 
  name="int" /  type-mapping 
  type="float" name="float" /  
  type-mapping type="double" name="double" /  type-mapping type="byte" name="smallint" 
  /  type-mapping type="char" 
  name="char" /  type-mapping 
  type="short" name="short" /  
  type-mapping type="java.util.Date" name="timestamp" / 
disallowed-field name="password" / 
   disallowed-field name="username" 
  /  disallowed-field 
  name="date" /  
  disallowed-field name="order" /  
  /database-schema 
  I was very unsure as to what I should use for the "location" 
  tags in the data-sources file. Also, with the "mysql.xml" file, I copied 
  the Hypersonic schema file and removed the boolean type-mapping (I thought 
  this might be my problem).
  The error I get when I deply states "SQL error: Communication 
  link failure: Bad handshake". If anyone has successfully deployed MySQL 
  with Orion, I would be very much interested in the contents of their xml 
  files.
  - CJD 


Re: Stopping the Server

2000-10-09 Thread Shailesh Joshi



Hi Miles ,

Youmight be using the port no in the url 
while stopping the server.
(e.g. ormi://localhost:80)
If you are using it omit it.

The same exception I got while getting 
Initial Context, if port no. is specified.
It works fine without giving the port 
no.

 
Shailesh Joshi
 
 
Java Programmer
Versaware(India) 
 Ltd.


  - Original Message - 
  From: 
  Miles 
  Daffin 
  To: Orion-Interest 
  Sent: Monday, October 09, 2000 4:49 
  PM
  Subject: Stopping the Server
  
  Hi,
  
  Any ideas why I get this when issuing the command 
  to stop the server?
  
  Error: javax.naming.NamingException: Lookup 
  error: java.io.StreamCorruptedException: Caught EOFException while reading the 
  stream header; nested exception 
  is: 
  java.io.StreamCorruptedException: Caught EOFException while reading the stream 
  header
  
  Thanks.
  --Miles DaffinJava Developer, 
  Netherlands.
  
  Land: +31 (0)10 476 2412Mobile: +31 (0)6 2959 
  1423Permanent email: [EMAIL PROTECTED]


Classpath : Orion On Linux

2000-09-28 Thread Mr Shailesh Joshi

Hi All


I  have installed Orion 1.3.8 on Linux server.

I have  deployed  beans and running  clients successfully.
The  problem  is the server can't  get  the  Driver in  Class.forName("
");
I  have  copied driver  class in the orion-root  directory; set the
classpath .
But still the server is not able to get the class ?

FROM  WHERE  ORION TAKES  THE  CLASSPATH  ?

With regards
   Shailesh





Re: Client : Communication error

2000-08-23 Thread Mr Shailesh Joshi

Hello Sridhar,

What  you can  try is

   Properties p = new Properties();


p.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClient
InitialContextFactory");
p.put(Context.PROVIDER_URL,"ormi://localhost/ejbsamples");
p.put(Context.SECURITY_PRINCIPAL,"admin");
p.put(Context.SECURITY_CREDENTIALS,"123");

   Context context = new InitialContext(p);

in the CartClient application.


Shailesh


- Original Message -
From: Sridhar Manickam [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Sunday, August 20, 2000 12:23 AM
Subject: Client : Communication error


 Hi,

 After successfully deploying the cart demo bean on the server, Iam
 running the CartClient and get the following error

 Communication error: Need to specify class name in environment or system
 property: java.naming.factory.initial

 Could someone tell me what Iam doing wrong. I pretty much followed the
 instructions from the orion docs.


 Thanks,
 -Sridhar