Re: Best way to add user records to EJBUserManager...

2002-01-08 Thread Patrick Lightbody

Instead of coding to EJBUserManager directly, I would highly recommend you
check out OpenSymphony's OSUser module. It is an abstracted user management
layer that works with Orion, Jboss, and Resin, and soon Weblogic, Websphere,
and JRun. Using OSUser will truly make your application work on any J2EE
application.

-Pat

- Original Message -
From: Alex Paransky [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Monday, January 07, 2002 9:43 PM
Subject: Best way to add user records to EJBUserManager...


 I am using EJBUserManager for security in Orion.  What is the best way to
 update users?  Should I directly use EJBUser EJB or use the API's in the
 UserManager.  If UserManager is the answer, then how do I get access to it
 while running in Orion?

 Thanks

 -AP_






RE: JMS hangs on TopicSession.createSubscriber

2002-01-08 Thread Carroll, Jim



I found several references to this bug in the mailing list archives but
it still seems to be a problem (in 1.5.2). The workaround suggested was
to stop the TopicConnection associated with the TopicSession and then do
the createSubscriber and then restart the connection but when I do that,
it hangs in the TopicConnection.start() call.

Does anyone have a fix or workaround for this?

Thanks




Follow-up: Deploying Orion1.5.2 App on WebLogic6.1

2002-01-08 Thread John . Miller



Sent an email a 
while ago about migrating an app developed on Orion 1.5.2 to WebLogic 6.1 and as 
requested amletting you know about the 'quirks' I 
encountered!

As its an intranet 
app and aint gonna have that many hits I didn't opt for using Apache to server 
static content, but my impression is that if you are gonna get a lot of hits 
they recommend using Apache. Setting this up didn't look that complicated and 
there are plenty info on doing this.

If you are using 
Oracle and the type4 JDBC drivers, there are quite a few issues WebLogic has. 
For example, if you do a select for update and autocommit is on, it messes up. 
Cant list them all, but had to do quite a few tweaks to the code to get it to 
work. There is a lot of information on these issues and I recommend reading it 
thoroughly before (which I didn't :) Its understandable why Oracle are using 
Orion for their app server.

In terms of 
Deployment, Weblogic 6.1 is really designed for EJB 2.0 and deploying 
appsas ear, war, and jar files via the gui console. But as I built mine 
exploded and EJB1.1 it was a bit fiddly to get it to work, but not impossible. 
The biggest prob I encountered was that it doesn't automatically generate its 
version of orion-ejb-jar.xml (weblogic-ejb-jar.xml). You have to create this 
yourself but its not complicated.

I had problems with 
the servers mime-types. If you have any odd mime-types (and by odd I mean a ms 
word file) you need to specify mime mappings in your WEB-INF/web.xml . There is 
no mime list like the file mime.types in Orion.

Overall, most of the 
problems I had was really figuring out how WebLogic works. It is way more 
complicated then Orion, which I think is intentional on BEA's part, and really 
really expensive. After using WebLogic, I have become an even bigger fan of 
Orion!

Hope you find this 
info useful. If you have any questions let me know!

Johnny

Confidentiality 
Notice:The information in this e-Mail message is confidential 
and for the use of the named recipients only. The information may be protected 
by privilege, work product immunity or other applicable law.If you are not 
the intended recipient - the retention, dissemination, distribution or copying 
of this e-Mail message is strictly prohibited. If you receive this e-Mail 
message in error, please notify me immediately by telephone (44 207 384 8102) or 
e-Mail ([EMAIL PROTECTED]).



Orion dies to java.lang.VerifyError

2002-01-08 Thread Jaakko Saari

Anyone else has this problem with older Orion? This started happening on 
monday.

My 1.4.5 Orion dies on boot to:
Exception in thread main java.lang.VerifyError: (class: 
com/evermind/server/ApplicationServer, method: ux signature: ()V) 
Incompatible object argument for invokespecial

I've narrowed the issue being on 1.4.5 Orion, since identical setup with 
1.5.2 works without problems and a mint installation of 1.4.5 produces 
the same error. I'm using 1.3.1_02 JVM on Win32 and Solaris platforms.

__
Tämän ilmaisen suomalaisen sähköpostin tarjosi http://www.jippii.fi/
Käy tutustumassa netin parhaaseen pelipaikkaan Pasimaailmaan.





jms problem

2002-01-08 Thread Markus Rinderer

hi !
i am trying to subscribe to topics from my java standalone client
application. everything works fine if i use OpenJMS with Orion Application
server. when using orion's JMS server i run into the following problem:

the client successfully subscribes to the first topic, but hangs when
subscribung to the second topic while calling createSubscriber in
TopicSession.
here is a code snippet:

public OrionJMSSubscriberWrapper(Context context,
   TopicConnection connection,
   String topicName) throws JMSException,
NamingException {

  subscriberSession = connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
  topic = (Topic)context.lookup(topicName);
   Trace.mar(create subscriber);
  subscriber = subscriberSession.createSubscriber(topic, null, true);
  Trace.mar(created subscriber);
   }

as i said, the first topic works fine, the second hangs at the
createSubscriber line. i changed the order of the topics, it is always just
one that is subscribed successfully.
anyone ever had this problem?
thanks for your help!
markus





question about ip allocation

2002-01-08 Thread Morten Raahede Knudsen

Hi

I'm sorry if this is a newbie question, but I haven't found the answer in
the archive.
My machine has two IP addresses.
In my web-site.xml I have specifically set Orion to use one of those ip
addresses.
It only answers on that specific ip address.
However, when another server (IIS) tries to use the other IP adress on the
same port number (80),
IIS refuses to start as it replies (Address already in use)

Does anyone have a solution?

Thanks in advance
Morten Raahede Knudsen


 Morten Raahede Knudsen [EMAIL PROTECTED]
 Programmør

 Bilpriser.dk
 Tolderlundsvej 16
 DK-5000 Odense C

 Telefon +45 6314 6065
 Telefax +45 6619 2164

 Ved du hvad din bil er værd? Besøg http://www.bilpriser.dk






Re: Orion dies to java.lang.VerifyError

2002-01-08 Thread Kesav Kumar

If you have two different versions of orion servers communicating each other
you will get this kind of error.

Kesav Kumar

- Original Message -
From: Jaakko Saari [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 5:20 AM
Subject: Orion dies to java.lang.VerifyError


 Anyone else has this problem with older Orion? This started happening on
 monday.

 My 1.4.5 Orion dies on boot to:
 Exception in thread main java.lang.VerifyError: (class:
 com/evermind/server/ApplicationServer, method: ux signature: ()V)
 Incompatible object argument for invokespecial

 I've narrowed the issue being on 1.4.5 Orion, since identical setup with
 1.5.2 works without problems and a mint installation of 1.4.5 produces
 the same error. I'm using 1.3.1_02 JVM on Win32 and Solaris platforms.

 __
 Tämän ilmaisen suomalaisen sähköpostin tarjosi http://www.jippii.fi/
 Käy tutustumassa netin parhaaseen pelipaikkaan Pasimaailmaan.







Passing Interface as an EJB parameter?

2002-01-08 Thread Keith Kee

Hi:
  Is it legal to pass an interface like List as a parameter to a remote
interface of an EJB? Conversely, how about returning an interace like List
as the return type? Since List is an interface and not serializable, I
wonder if it would be marshalled/unmarshalled correctly.

Thanks,
keith





RE: Best way to add user records to EJBUserManager...

2002-01-08 Thread The elephantwalker

second try

-Original Message-
From: The elephantwalker [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 08, 2002 8:16 AM
To: Orion-Interest; [EMAIL PROTECTED]
Subject: RE: Best way to add user records to EJBUserManager...


The best way to add users in Orion is with Orion's roleManager interface.
This abstracts the usermanager, so that you can define your usermanager api
with xml configuration.


Check-out this trail the docs here:

http://www.orionserver.com/docs/api/com/evermind/security/RoleManager.html

At our site, we use the RoleManager to do all of our user management. If
later we decided to migrate to an LDAP usermanager from EJBUserManager,
aside from moving the database, all we need to do is change the
orion-application.xml user-manager tag...with no changes to our application
code.

Nifty, eh!

regards,

the elephantwalker
www.elephantwalker.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Monday, January 07, 2002 9:44 PM
To: Orion-Interest
Subject: Best way to add user records to EJBUserManager...


I am using EJBUserManager for security in Orion.  What is the best way to
update users?  Should I directly use EJBUser EJB or use the API's in the
UserManager.  If UserManager is the answer, then how do I get access to it
while running in Orion?

Thanks

-AP_







RE: Help: Out of Memory Error...

2002-01-08 Thread Mohammed Islam


don't send this mail  to me


Mohammed Islam
Fulcrum Analytics,  Inc.(formerly Cyber Dialogue )
Phone:  212-651-9263






Re: question about ip allocation

2002-01-08 Thread Graham Bennett

On Tue, Jan 08, 2002 at 04:36:28PM +0100, Morten Raahede Knudsen wrote:
 I'm sorry if this is a newbie question, but I haven't found the answer
 in the archive.  My machine has two IP addresses.  In my web-site.xml
 I have specifically set Orion to use one of those ip addresses.

try adding a host=x.x.x.x attribute to the web-site tag in
default-web-site.xml

cheers,

-- 
Graham Bennett
[EMAIL PROTECTED]  ICQ: 17566658




Understanding paths

2002-01-08 Thread OrionDummy




Yo,
Could someone explain the ./"a folder" and ../"a folder" used in the config file.

thanks
dummy


Re: Passing Interface as an EJB parameter?

2002-01-08 Thread Kesav Kumar

Legally You can declare return types any Interface though the interface may
not be extending from Serializable.
The marshalling and UnMarshalling happens on the object at runtime the
object which you are returning must be serializable.

Kesav Kumar

- Original Message -
From: Keith Kee [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 10:26 AM
Subject: Passing Interface as an EJB parameter?


 Hi:
   Is it legal to pass an interface like List as a parameter to a remote
 interface of an EJB? Conversely, how about returning an interace like List
 as the return type? Since List is an interface and not serializable, I
 wonder if it would be marshalled/unmarshalled correctly.

 Thanks,
 keith







Re: question about ip allocation

2002-01-08 Thread Jaikoo

Try changing the port number that Orion accepts requests from 80 to a
different unused value e.g 2002.
So that the url will look something like http://127.0.0.1:2002

Hope this helps...

Jaikoo

- Original Message -
From: Morten Raahede Knudsen [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 3:36 PM
Subject: question about ip allocation


Hi

I'm sorry if this is a newbie question, but I haven't found the answer in
the archive.
My machine has two IP addresses.
In my web-site.xml I have specifically set Orion to use one of those ip
addresses.
It only answers on that specific ip address.
However, when another server (IIS) tries to use the other IP adress on the
same port number (80),
IIS refuses to start as it replies (Address already in use)

Does anyone have a solution?

Thanks in advance
Morten Raahede Knudsen


 Morten Raahede Knudsen [EMAIL PROTECTED]
 Programmør

 Bilpriser.dk
 Tolderlundsvej 16
 DK-5000 Odense C

 Telefon +45 6314 6065
 Telefax +45 6619 2164

 Ved du hvad din bil er værd? Besøg http://www.bilpriser.dk










Re: Understanding paths

2002-01-08 Thread Tim Courtney

./ means current directory
ie $ORIONHOME/config/

../ means parent directory
ie $ORIONHOME/

OrionDummy wrote:

 Yo,

 Could someone explain the ./a folder and ../a folder used in the 
 config file.

  

 thanks

 dummy







RE: Best way to add user records to EJBUserManager...

2002-01-08 Thread The elephantwalker

The best way to add users in Orion is with Orion's roleManager interface.
This abstracts the usermanager, so that you can define your usermanager api
with xml configuration.


Check-out this trail the docs here:

http://www.orionserver.com/docs/api/com/evermind/security/RoleManager.html

At our site, we use the RoleManager to do all of our user management. If
later we decided to migrate to an LDAP usermanager from EJBUserManager,
aside from moving the database, all we need to do is change the
orion-application.xml user-manager tag...with no changes to our application
code.

Nifty, eh!

regards,

the elephantwalker
www.elephantwalker.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Paransky
Sent: Monday, January 07, 2002 9:44 PM
To: Orion-Interest
Subject: Best way to add user records to EJBUserManager...


I am using EJBUserManager for security in Orion.  What is the best way to
update users?  Should I directly use EJBUser EJB or use the API's in the
UserManager.  If UserManager is the answer, then how do I get access to it
while running in Orion?

Thanks

-AP_







Re: Best way to add user records to EJBUserManager...

2002-01-08 Thread Scott Farquhar

Alex,

The Atlassian user admin tool does what you want - no coding required.

Download it here:
http://www.atlassian.com/software/tools/

You can use it to users in XML files, EJB's - anything that implements 
the UserManager interface in Orion.

Cheers,
Scott

-- 
Scott Farquhar :: [EMAIL PROTECTED]

Atlassian :: http://www.atlassian.com
  Supporting YOUR J2EE World


Alex Paransky wrote:

 I am using EJBUserManager for security in Orion.  What is the best way to
 update users?  Should I directly use EJBUser EJB or use the API's in the
 UserManager.  If UserManager is the answer, then how do I get access to it
 while running in Orion?
 
 Thanks
 
 -AP_
 
 
 
 






Re: Passing Interface as an EJB parameter?

2002-01-08 Thread Stephen Davidson

Keith Kee wrote:

 Hi:
   Is it legal to pass an interface like List as a parameter to a remote
 interface of an EJB? Conversely, how about returning an interace like List
 as the return type? Since List is an interface and not serializable, I
 wonder if it would be marshalled/unmarshalled correctly.
 
 Thanks,
 keith

Yes, you can pass the Interface.  The underlying object must be serializable, however. 
 Personally, I use ArrayList in this scenario.

-Steve

-- 
Stephen Davidson
Java Consultant
Delphi Consultants, LLC
http://www.delphis.com
Phone: 214-696-6224 x208





user manager, principals shutdown

2002-01-08 Thread Tim Courtney

I need some help fixing something I broke.

I stepped through the user manager tutorial on orionsupport ( 
http://uk.orionsupport.com/articles/usermanager.html ) and managed to 
put BASIC authentication on a certain directory on my site.

But since then, it seems I deleted the information that allows the 
shutdown command
 java -jar admin.jar ormi://localhost admin x -shutdown

this command looks up the username/password in the custom UserManager 
and always returns
 Security error: Invalid username/password for default (admin)

I would prefer that the server admin  the users in the custom 
UserManager be kept separate.

is my principals.xml meant to have two different groups?

can the server admin user remain in the xml config as it is when first 
running orion?
user username=admin password=x deactivated=false

my application.xml:
user-manager class=com.orionsupport.security.MyUserManager /

should there be two different entries here??? one for the BASIC authen, 
and one for server admin ?

my web.xml:
   security-role
   role-nameadministrators/role-name
   /security-role

   login-config
   auth-methodBASIC/auth-method
   realm-nameadmin tool/realm-name
   /login-config
 security-constraint
   web-resource-collection
   url-pattern/admin//url-pattern
   /web-resource-collection
   auth-constraint
   role-nameadministrators/role-name
   /auth-constraint
   /security-constraint

my principals.xml: (however the user is just ignored, and the 
MyUserManager is always used to validate both users)
principals
   groups
   group name=administrators
   descriptionadmin tool users/description
   permission name=administration /
   permission 
name=com.evermind.server.AdministrationPermission /
   /group
   /groups
   users
   user username=admin password=admin deactivated=false
   descriptionThe default administrator/description
   group-membership group=administrators /
   /user
   /users
/principals

I hope all that made sense

thanks
tim





RE: OrionRemoteException: Error (de-)serializing object:

2002-01-08 Thread Manuel De Jesus

Yeah you have to return an arraylist or a vector, i.e something that is
serializable. It is never a good idea to pass ResultSet objects around.
Although it is attractive in terms of changeability (eg adding more fields
etc) to use a ResultSet, it can become a nightmare when there are network
problems and you can leak connections if you don't handle the exceptions
properly.

If you are using ejb's then the whole idea is that the EJB is an object
version of the data so that you can work directly with the object. If you
want to use a ResultSet directly in the jsp (useful for reporting etc), just
open the connection to the database directly in the JSP and do your query
and close it again. If you are doing something more invovled you might want
to user a few beans/taglibs (there are some nice jdbc ones around) just to
stop your jsp pages from becomming a spiderweb.

Your DBManagerBean looks dangerous - there is a pretty good chance you are
going to leak connections. Rather use just a normal bean that you can
instatiate locally at the jsp side or the ejb side. Thus there is no need to
use an ejb to control connections.

Regards,
Manuel

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Andres Garcia
Hourcade
Sent: Wednesday, November 21, 2001 3:32 AM
To: Orion-Interest
Subject: OrionRemoteException: Error (de-)serializing object:


Hi, i am new in J2EE technology and i'm big troubles.

I have an intranet application (jsp  ejb) running fine with version 1.4.0,
i am trying to deploy the same EAR in 1.5.2 version, but i get this error.

com.evermind.server.rmi.OrionRemoteException: Error (de-)serializing object:
org.gjt.mm.mysql.jdbc2.ResultSet; nested exception is:
java.io.NotSerializableException: org.gjt.mm.mysql.jdbc2.ResultSet

This error occurs when i return a ResultSet from a method executeQuery of
an EJB that manages de mysql db.

I have written many jsp, that are in production, and i woud not want to
modify them.
Is there any solution for this error ?
Can i solve this problem if i return a Vector, instead of a ResultSet ?

Many thanks in advance and best regards

Andres Garcia Hourcade


EJB

import java.rmi.*;
import java.util.*;

import javax.ejb.*;
import javax.naming.*;

import java.sql.*;
import javax.sql.*;
import javax.sql.DataSource;

// ejb que maneja archivos de log
import Log.*;

public class DbManagerBean implements SessionBean
{

   transient SessionContext context;
   transient Connection conn = null;
   transient DataSource ds = null;
   transient Statement st = null;
   transient ResultSet rs = null;

   public void getConnection(String datasource) throws RemoteException,
DbManagerException
   {
  try
  {
 InitialContext ictx = new InitialContext();
 this.ds = (DataSource) ictx.lookup(datasource);
 this.conn = this.ds.getConnection();
  }
  catch (Exception e)
  {
 throw new DbManagerException(e);
  }
   }


   public void closeConnection() throws RemoteException, DbManagerException
   {
  try
  {
 this.conn.close();
  }
  catch (Exception e)
  {
 throw new DbManagerException(e);
  }
   }

   public ResultSet executeQuery(String strsql, String logonuser) throws
RemoteException, DbManagerException
   {
  st = null;
  rs = null;
  try
  {
 //ResultSet.TYPE_SCROLL_INSENSITIVE,
 //ResultSet.CONCUR_READ_ONLY
 this.st = this.conn.createStatement();
 try{
   // logeo la consulta
   InitialContext context = new InitialContext();
   LogHome logHome = (LogHome)
javax.rmi.PortableRemoteObject.narrow(context.lookup(Log), LogHome.class);
   Log log = logHome.create();
   log.writeDebug(strsql, logonuser);
   log.remove();
 }
 catch (Exception e)
 {
throw new DbManagerException(e);
 }
 rs = this.st.executeQuery(strsql);
 // the closing of a statement also closes all
 // the resultsets asociated with the statement
 st.close();
  }
  catch (SQLException e)
  {
 throw new DbManagerException(e, this.conn);
  }
  return (rs);
   }

   public void ejbPassivate(){
   context = null;
   conn = null;
   ds = null;
   st = null;
   rs = null;
   }

   public void ejbActivate()
   {
   }

   public void ejbRemove()
   {

   }

   public void ejbCreate()
   {

   }

   public void setSessionContext(SessionContext context)
   {
  this.context = context;
   }

}






Re: HTTP response help please ?

2002-01-08 Thread Rasmy Anand

Hello Eddie
In the code you have to set the content type,.So if you are sending any data
or Object as it is, you have to give the code like this
String url;//some url intialize it
String obj=t1.getText();
URL u=new URL(url);
URLConnection cn=u.openConnection();
cn.setDoOutput(true);
cn.setDoInput(true);
cn.setUseCaches(false);

cn.setRequestProperty(Content-Type,Java-internal/+obj.getClass().getName
());
ObjectOutputStream fp1=new ObjectOutputStream(cn.getOutputStream());
fp1.writeObject(obj);
fp1.close();
ObjectInputStream in=new ObjectInputStream(cn.getInputStream());
String replay=(String)in.readObject();
t2.setText(replay);
in.close();

Regards
Rasmy :-) Enjoy Java