sendRedirect()

2002-04-19 Thread Sergey G. Aslanov

Hi all

   I have two web apps, one with root, other with with virtual
   directory:

web-app application=CBOSSwww name=web root=/ /
web-app application=CBOSSishop name=ishop-web root=/ishop /

   I wants to redirect to some page /lalala.html of app CBOSSishop and
   do sendRedirect(/lalala.html) in CBOSSishop, but
   orion redirects it to the root app CBOSSwww /lalala.html;jsessionid=...
   When i remove this line from default-web-site.xml:
web-app application=CBOSSwww name=web root=/ /
   and do redirect again, it successfully redirects it to
   /ishop/lalala.html;jsessionid=...!
   Is it a orion bug?
   Please help!


-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
http://www.cboss.ru
tel: +7 095 7555655





Re: How can I make orion stop caching my EBs?

2002-04-08 Thread Sergey G. Aslanov

Hi Orion-Interest

Use attribute exclusive-write-access=false in orion-ejb-jar.xml for
your EB.

Monday, April 08, 2002, 2:35:52 PM, you wrote:

CD Hello,

CD I have an application that uses some EBs. The underlying data on which the EBs are 
mapped is modified by an  external application.
CD Orion caches the entity beans, so I don't see the DB modifications immediately in 
the beans.

CD How can I make orion stop caching my EBs?

CD Thanks,
CD Cristian



-- 
Sergey G. Aslanov,
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Security context

2002-04-05 Thread Sergey G. Aslanov

Hi, orion gurus

I have tho orion applications - for EJB tier and for WEB tier. How
to pass security context from WEB-tier with form authentication to
some EJB? I setup my application this way:

WEB orion:
   rmi.xml:
  rmi-server
  server host=localhost username=admin password=123 /
  /rmi-server
   orion-application.xml:
  ...
  ejb-module remote=true path=someejb.jar /
  ...


In this case, sessionContext.getCallerPrincipal() always returns
orion's admin user, not the currently autherized user!

Please, help!

-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re: Bug?!

2002-03-13 Thread Sergey G. Aslanov

Hi Orion-Interest

You just have to recompile your filter class with Orion 1.5.4 orion.jar lib.

Wednesday, March 13, 2002, 2:21:54 PM, you wrote:

LL Updating from 1.5.2 to 1.5.4
LL Everything seems to work just fine except for one thing. When I use a 
LL Filter mapped to one of my servlets a strange error occures. Orion 
LL throws a

LL java.lang.NoClassDefFoundError: javax/servlet/Config

LL In my code I have no references to that class. And for all I know there 
LL are no such class. Shouldn't it be javax/servlet/ServletConfig instead?

LL /Linus







-- 
Sergey G. Aslanov,
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re[2]: Direct call to j_security_check when using form based authori zati on

2002-02-19 Thread Sergey G. Aslanov
 the requested url and
EJ redirects the user to this original url after login.
EJ From the destination page (your secure url) you can send a client side
EJ redirect to the original (public) page or somewhere else (secure or
EJ non-secure).

 -Original Message-
 From: Erik Johansson [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 18, 2002 10:39 AM
 To: Orion-Interest
 Subject: Direct call to j_security_check when using form based
 authorizati on
 
 
 
 I am using form based authentication in my application. When 
 trying to 
 access a protected resource, the container automatically 
 prompts the login
 form to the user, where he can fill in authentication info 
 (username and
 password). 
 
 Code from login.jsp:
 
 form method=POST action=j_security_check
 input type=text name=j_username
 input type=password name=j_password
 /form
 
 Here the Servlet-specification dictates that the action to be 
 called from
 the login form must be j_security_check, and that the 
 parameters passed from
 the form must have the names j_username and j_password.
 
 This way of logging in works very well. But this requires 
 that the user is
 trying to access a restricted area of the application. I 
 would like to add
 functionality to my application that allows the user to make 
 a direct login
 from a public page, without landing at an intermediate login 
 page. Is there
 a way to call the j_security_check directly from another 
 page? I have made
 some experiments but I have not succeeded. 
 
 Does anyone have any advices regarding this subject. I such a 
 case I would
 be very thankful to hear.
 
 Erik Johansson
 

-- 
Sergey G. Aslanov,
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re[2]: NO rollback in method ??

2002-01-21 Thread Sergey G. Aslanov

Hi Eddie

Transactions with container trans. management are commitet automaticaly after
business method is called, if there was no exceptions. You can prevent it by invoking
setRollbackOnly() method at context of the session. After this
transaction should roll back in any case.

Sunday, January 20, 2002, 4:43:32 PM, you wrote:

E Please some help on the mail below ?
E I don't tell me that nobody can give me some advice on this issue ! ;)
E Eddie

E - Original Message -
E From: Eddie Post [EMAIL PROTECTED]
E To: Orion-Interest [EMAIL PROTECTED]
E Sent: Tuesday, January 15, 2002 5:03 PM
E Subject: NO rollback in method ??


 Hellu,

 I perform a non-transactional action in a transactional session EJB method
 (I use CMP with Orion 1.5.2). How can I implement this method such that it
 is only submitted when a commit is performed ??

 More details:
 I am sending a sms in a session method. In the traditional way I would
 send this sms when the transaction is commited. However I don't know how
E to
 accomplish this with CMP EJB's.

 Please some advice ?

 Eddie

 _
 Get your FREE download of MSN Explorer at
E http://explorer.msn.com/intl.asp.




-- 
Sergey G. Aslanov,
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re: Dynamic reloading of class files

2001-12-07 Thread Sergey G. Aslanov

Hi Buster

The one way to update classes in application, I found, is to touch
META-INF/application.xml file, i.e. to change it's modification time.

-- 
Sergey G. Aslanov,
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655

Thursday, December 06, 2001, 6:45:21 PM, you wrote:

NB I have set the development section in the application.xml for my app to
NB true and JSPs and servlets successfully reload after changes have been made.
NB However since I have employed an MVC architecture most of my controlling
NB logic is contained in RequestHandler class files. even though servlets
NB detect changes the RequestHandler classes do not. Is there any way to force
NB orion to reload all classes with out restarting. (These class files are
NB located under the WEB-INF/classes directory)





Filters in Orion 1.5.3

2001-11-25 Thread Sergey G. Aslanov

Hi all

  My web-app doesn't work on Orion 1.5.3 with this error:


500 Internal Server Error
java.lang.NoClassDefFoundError: javax/servlet/Config
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.evermind[Orion/1.5.3 (build 10509)]._co._ssc(.:6388)
at com.evermind[Orion/1.5.3 (build 10509)]._bxb._crd(.:258)
at com.evermind[Orion/1.5.3 (build 10509)]._bxb._ukb(.:170)
at com.evermind[Orion/1.5.3 (build 10509)]._cn._uab(.:576)
at com.evermind[Orion/1.5.3 (build 10509)]._cn._fm(.:189)
at com.evermind[Orion/1.5.3 (build 10509)]._bs.run(.:62)


  After switching off all used filters in web.xml all works fine.
  Did someone collide with this problem?
  

-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re: Deploy Ear with war inside

2001-11-19 Thread Sergey G. Aslanov

Hi Alessandro

A Hi,
A I am deploing an Ear with war inside and I Built it with Jbuilder
A In war I put index.html and test.jsp and in Ear one Ejb.
A The Application.xml inside ear is :

A ?xml version=1.0 encoding=UTF-8?
A !DOCTYPE application PUBLIC -//Sun Microsystems, Inc.//DTD J2EE
A Application 1.2//EN http://java.sun.com/j2ee/dtds/application_1_2.dtd;
A application
A   display-nameEjbTest/display-name
A   module
A ejbEbjTest.jar/ejb
A   /module
A   module
A web
A   web-uriEjbTest.war/web-uri
A   context-rootwar-ic/context-root
A /web
A   /module
A /application

A I modified the :
A default-ewb-site.xml  with
A web-app application=ejbtest name=war-ic root=/ejbtest /

As far as I know, name of web-app must be exactly the same as web-uri
in application.xml:

web-app application=ejbtest name=EjbTest root=/ejbtest /
or
web-app application=ejbtest name=EjbTest.war root=/ejbtest /

Hope it will help you.

A server.xml with
A application name=ejbtest path=../applications/ejbtest.ear /

A When I launch Orion in the console I see the deploy of Ear but when I use
A the url  http://localhost/ejbtest/test.jsp or
A http://localhost/ejbtest/index.html an Internal server error appears.

A Some ideas ??
A Thanks a lot for all suggestion



A Alessandro Fustini
A Team Leader Mobile Services Development
A Vitaminic Spa
A Via cervino 50, 10154 turin - italy
A phone: +39 011 23381242  fax: +39 011 23381206


-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re[2]: EJB pool management

2001-11-17 Thread Sergey G. Aslanov

TK If your EJB is not the only thing that will be updating a table then you
TK have to deploy the ejb with exclusive-write-access=false in the
TK orion-ejb-jar.xml.  Checkout the documentation on the orion-ejb-jar.xml at
TK http://www.orionserver.com/docs/orion-ejb-jar.xml.html
TK http://www.orionserver.com/docs/orion-ejb-jar.xml.html .  This basically
TK turns off caching off the EJB.

Thank you for answer, but I don't want to turn off caching. I need
exactly to manage it. EJB caching is rather usefull feature and I
don't want to refuse completely from using it.

TK -Original Message-
TK From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
TK Sent: Friday, November 16, 2001 11:07 AM
TK To: Orion-Interest
TK Subject: RE: EJB pool management



TK I am sure there is a way, it is just not documented as the orionconsole.jar 
TK has provisions for invalidating the pools, and adjusting their sizes. 

TK it will probably be an ormi: call of some sort? 

TK -Original Message- 
TK From: Sergey G. Aslanov [ mailto:[EMAIL PROTECTED]
TK mailto:[EMAIL PROTECTED] ] 
TK Sent: Friday, November 16, 2001 6:38 AM 
TK To: Orion-Interest 
TK Subject: EJB pool management 


TK Hi all 

TK   Who knows, can I manage Orion's EJB instances pool from code? For example,

TK   if data in DBMS was changed without help of EJB and I want to update 
TK   it in pool. What have I to do? 




-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





EJB pool management

2001-11-16 Thread Sergey G. Aslanov

Hi all

  Who knows, can I manage Orion's EJB instances pool from code? For example,
  if data in DBMS was changed without help of EJB and I want to update
  it in pool. What have I to do?

-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re: Response has been already committed...

2001-11-16 Thread Sergey G. Aslanov

Hi all

SB Hello all,

SB I have a JSP, that processes a form and is attempting to create a record in my 
database via CMP EJB (Person). After my form has been processed and the 
PersonHome.create() methods has succeeded
SB (record has been created), the page tries to redirect to another JSP. But this 
doesn't work; instead i receive an exception:

SB java.lang.IllegalStateException: Response has already been committed, be sure not 
to write to the OutputStream or to trigger a commit due to any other action before 
calling this method.
SB at com.evermind[Orion/1.5.2 (build 
10460)].server.http.EvermindHttpServletResponse.sendRedirect(Unknown Source)
SB at /department.jsp._jspService(/department.jsp.java:54) (JSP page line 19)
SB at com.orionserver[Orion/1.5.2 (build 
10460)].http.OrionHttpJspPage.service(Unknown Source)
SB at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source)
SB at com.evermind[Orion/1.5.2 (build 
10460)].server.http.JSPServlet.service(Unknown Source)
SB at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source)
SB at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source)
SB at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)
SB at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source)
SB at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source)

SB without PersonHome.create() or response.sendRedirect() everything works fine (it 
works fine with either, but not with both).
SB What is going on? What am I doing wrong?

Usual cause this error is happened is when you try to redirect to the
other page while you already write to response some data and it was
flushed (or you flush it).

Can you send me your JSP page, I'll try to help you.

-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re[2]: User exceptions from EJB

2001-11-14 Thread Sergey G. Aslanov

U What is the superclass of DocumentSecurityException?

U If not Exception, try with superclass as Exception.

DocumentSecurityException inherits Exception...

U I think if the exception inherits RuntimeException or
U EJBException, you may find that it doesn't reach client.

U Tell me if I am wrong!

U Hope it helps... seeya.

U - UnicMan

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Sergey G.
 Aslanov
 Sent: Tuesday, November 13, 2001 12:41 PM
 To: Orion-Interest
 Subject: User exceptions from EJB


 Hello All

 I try to throw business exception from finder method of my entity EJB:

 public Collection ejbFindByUniLinks(int obj2, int n2)
throws FinderException, DocumentSecurityException
^

 but it doesn't reach the client level.
 In home interface wrapper I found this lines:
 ==
 ...
 java.util.Collection response = null;
 ...
 try
 {
 response =
 ((ru.cboss.components.document.ejb.DocumentEJB)finderContext.objec
 t).ejbFindByUniLinks(argument0, argument1);
 // My finder method is called, here exception is thrown.
 // response was not initialized!
 }
 catch(ru.cboss.components.document.exceptions.DocumentSecurityException e)
 {
 methodException = e;
 // Exception is catched here
 }
 catch(javax.ejb.FinderException e)
 {
 methodException = e;
 }
 catch(Throwable e)
 {
 if(thread.transaction != null)
 setRollbackOnly(thread.transaction, e.toString(), e);
 this.log(e);
 methodException = EJBUtils.getUserException(e, !created);
 }
 java.util.Collection collection = new java.util.ArrayList();
 Iterator iterator = response.iterator();
 // Because finder method throwed exception, response variable was not
 // initialized and was left null,
 // so this line cause NullPointerException, wich comes to the
 // client level!
 ...
 ==

 Is it a bug?
 How can I deliver error message from finder method in a different way?

 --
 Best regards,
  Sergey G. Aslanov  mailto:[EMAIL PROTECTED]








-- 
Sergey G. Aslanov
CBOSS Group,
Web-technologies department
mailto:[EMAIL PROTECTED]
tel: +7 095 7555655





Re[2]: Urgent :: How to access JMS service from Servlet/JSP

2001-11-12 Thread Sergey G. Aslanov

VHS I think, I am also facing a similar problem. I have followed the steps you
VHS have mentioned below but when I try to deploy it, it gives the following 
VHS error message:

VHS Error instantiating application: Error loading web-app 'war-ic' at 
VHS D:\orion\applications\PhotonManagementConsoleApp\war-ic: Unknown 
VHS resource-ref tag: res-ref-type

Must be res-type, not res-ref-type!
^^
VHS Can you please let me know if there are any other steps.
VHS Note: I have created the ear file using ant.
VHS Thanks,
VHS Vani


From: Kesav Kumar [EMAIL PROTECTED]
Reply-To: Orion-Interest [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Subject: Re: Urgent ::  How to access JMS service from Servlet/JSP
Date: Mon, 12 Nov 2001 01:47:03 -0800

You don't need application-client.xml if you want to access JMS from
servlets.

You have to write your queueconnection and queues in web.xml.  Add
resoure-ref entries in web.xml
resource-ref
  res-ref-namejms/theQueueConnectionFactory/res-ref-name
  res-typejavax.jms.QueueConnectionFactory/res-type
  res-authContainer/res-auth
/resource-ref
resource-ref
  res-ref-namejms/processQueue/res-ref-name
  res-typejavax.jms.Queue/res-type
  res-authContainer/res-auth
/resource-ref

Once you have the resource-ref entries in web.xml from your servlet write
the following

Context ctx = new InitialContext();
QueueConnection con =
(QueueConnection)ctx.lookup(java:comp/env/jms/theQueueConnectionFactory);
Queue queue = (Queue)ctx.lookup(java:comp/env/jms/processQueue);

I didn't understand your question of different containers?  Do you mean
different containers different orion server?
If you want to get access JMS queue/connection of different orion server
provide proper JNDI properties for obtaining InitialContext.

Example:
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
com.evermind.server.ApplicationClientInitialContextFactory);
env.put(Context.PROVIDER_URL, ormi://host/applicationname);
env.put(Context.SECURITY_PRINCIPAL, username);
env.put(Context.SECURITY_CREDENTIALS, password);
Context ctx = new InitialContext(env);
Rest of the code is common.

Hope this helps you.



VHS _
VHS Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp





-- 
Best regards,
 Sergey G. Aslanov mailto:[EMAIL PROTECTED]