Sharing datasource

2002-05-17 Thread Linus Larsen

If the same EJB application is running on lets say two servers, and are 
sharing the same datasource. Do I have to configure the orion-ejb-
jar.xml and set the exclusive-write-access=false for every entity 
deployment (on both servers) sharing the datasource,  to avoid 
inconsistency in the EJBCaching?

regards

/linus





Re: OT: Session Related

2002-03-18 Thread Linus Larsen


Put and Get is deprecated, use session.setAttribute(foo)/ 
session.getAttribute(foo) instead.

/Linus

On Sunday, March 17, 2002, at 04:55 PM, Stephen Davidson wrote:

 Hi Michael.

 The following line in your servlets should handle you;
 request.getSession().put(keyObject, valueObject);
 request.getSession().get(keyObject);
 where;
 request is the users HttpRequest object
 getSession returns the HttpSessionObject

 More details available in the J2EE JavaDocs.

 -Steve

 Michael Shoemaker wrote:
 Hello gang
 I have a question about a situation that I am facing.  Currently we are
 using servlets to store session information.  i.e.  For instance, you
 the front end people wanted to store data into the session they would
 call SessionServlet?step=savesessionId=123myVal=xyz.  In turn a call
 to it with step=get would return xml containing the value previously
 stored.  It's a somewhat rudimentary way of getting around cookies.  
 Our
 front end is written in a version of Vignette that doesn't support
 jsp(another story).  My question is, the infrastructure guys recently
 introduced a load balancers and now we are not guaranteed to get the
 same server.  Big problem.  Have any of you solved a problem similar to
 this.  Unfortunately, upgrading to the next version of Vignette isn't
 the solution.  We are about a year or more away budget wise.  Thanks
 again for taking the time to read an off topic post.  Mike
 _
 Do You Yahoo!?
 Get your free yahoo.com address at http://mail.yahoo.com



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







Re: timed events

2002-03-14 Thread Linus Larsen

One solution would be to write a client-application which contains a 
timer and timertasks. The client could for example send a JMS message to 
a MDB which triggers an event.
The client could be autostarted together with your application (most 
app-servers has a way of doing this). In this way you follow the 
standard, it is scalable, distributable and formost it is not that hard 
to to.

/Linus


On Thursday, March 14, 2002, at 12:29 AM, Tim Endres wrote:

 There are several solutions out there, both commercial and open source.
 You might wish to take a look before reinventing.
 tim.

 Which is not that portable across Application Servers ;)
 Typical issues are JNDI lookup problems up to ClassCastExceptions.

 Jens

 | -Original Message-
 | From: [EMAIL PROTECTED]
 | [mailto:[EMAIL PROTECTED]]On Behalf Of
 | [EMAIL PROTECTED]
 | Sent: Wednesday, March 13, 2002 5:21 PM
 | To: Orion-Interest
 | Subject: RE: timed events
 |
 |
 | Hi,
 |
 | I use a java.util.Timer wrapped my Scheduler class to schedule
 | tasks. I bind
 | an instance of this Scheduler to the JNDI from one of my servlet's 
 init()
 | method.
 |
 | It works fine, use -userThreads switch to start orion if you want 
 context
 | lookup from the scheduled threads.
 |
 | HTH,
 |
 | Tibor
 |
 | -Original Message-
 | From: daniele rizzi [mailto:[EMAIL PROTECTED]]
 | Sent: Wednesday, March 13, 2002 2:25 PM
 | To: Orion-Interest
 | Subject: R: timed events
 |
 |
 |
 | Hi Casper,
 |
 | EJB are not multithreaded but a normal class *is*.
 |
 | Try putting the stuff in a public class TryMe extends Thread{}
 |
 | d.
 |
 | ps. if you need a scheduler the things are tougher.
 |
 |
 |
 | -Messaggio originale-
 | Da: [EMAIL PROTECTED]
 | [mailto:[EMAIL PROTECTED]]Per conto di Casper
 | H¯jstrup
 | Inviato: mercoledÏ 13 marzo 2002 10.21
 | A: Orion-Interest
 | Oggetto: timed events
 |
 |
 |
 | This more of a regular EJB question, I suppose.
 |
 | I need to initiate some specific tasks and specific times in my
 | application,
 | since the application server aren't multithreaded(so to speak), and 
 the
 | usage of threads is not recommended, I cannot make a simple
 | timer, that will
 | initiate the appropriate procedures at a given time.
 | How do one solve such problems in an EJB application ?
 |
 | Regards
 | .
 |









Bug?!

2002-03-13 Thread Linus Larsen
Updating from 1.5.2 to 1.5.4
Everything seems to work just fine except for one thing. When I use a Filter mapped to one of my servlets a strange error occures. Orion throws a 

java.lang.NoClassDefFoundError: javax/servlet/Config 

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

/Linus  






100 Continue

2002-03-05 Thread Linus Larsen

Hi

Im having a propblem sending a POST to a servlet in orion Im trying to 
send a POST from a PDA with Windows CE installed The servlet just 
parses the stream and stores the content in a database When the POST is 
submitted, everything after the 100 Continue response is being stored 
in the database The data sent before 100 Continue is somehow lost

When I try to send the same POST data from an JAVA app, everything is 
stored in the database and it works fine

It seems to me that the PDA client cannot handle the 100 Continue 
response and continuing sending the POST data and orion is not able to 
receive it

Has anyone any sugesstions?

By the way Im using mac OSX with orion 152 Has anyone been able to 
run a J2EE app with orion 154? Im getting a JVM error (segmentation 
fault) just by starting it Havent tried with the new MRJ 131 though

regards

/Linus






Re: Where to put JAAS classfiles (loginmodules) when using it from a web app

2002-02-12 Thread Linus Larsen


According to the atlassian owerview over orion classloaders, it should 
be possible to use the Class-Path: attribute in your manifest file of 
your .jar file, orion should load those classes. I´ve tried but never 
got it to work, it seems orion ignoring the Class-Path: attribute (this 
works on JBOSS although).

By putting your JAAS classfiles in orion/lib your classes gets global 
acces to all your applications, but it will work.

You could specify libary path=../path/to/JAAS in your 
orion-application.xml, in this way you could keep all your dependency 
classes in your ear/jar file.


/Linus

On Tuesday, February 12, 2002, at 05:11 AM, Scott Farquhar wrote:

 Can I suggest the classloader documentation on the knowledge base:

   http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp

 Here is a search that would have found the doc:

   http://kb.atlassian.com/search.jsp?query=jre/lib/ext

 Cheers,
 Scott

 Scott Farquhar :: [EMAIL PROTECTED]

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



 Geoff Soutter wrote:

 What about orion/lib?
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]] On Behalf Of Ismael Blesa
 Part
 Sent: Saturday, 26 January 2002 3:25 AM
 To: Orion-Interest
 Subject: Where to put JAAS classfiles (loginmodules) when using it from
 a web app
 Hi,
 I am using JAAS authentication from a web application, the problem is
 that the login modules that I use, and all the classes that the
 LoginModule uses are not loaded from the WEB-INF/classes or WEB_INF/lib
 folder. I have to put them on the jdk/jre/lib/ext. The problem is that
 the classes I put there collide with other applications that use the
 same installed JDK and also with some other webapplications that run on
 the same application server. I have developed it using jdk1.3.1 and 
 JAAS
 1.0. Is there a way to put specify where login module classes should be
 loaded that does not interfere with other applications (that is, I do
 not want to put any class on the jdk/ jre/lib/ext folder). Cheers


 --






Re: Row limit for finder methods ?!

2002-02-12 Thread Linus Larsen

You could either edit the orion-ejb-jar.xml. And change the generated 
SQL, but this will be overwritten next time orion is started. Another 
way is to specify a finder query in your EJBHome inteface like this:

String findByRecipient_query = Message.recipient = $1;

Collection findByRecipient(String recipient)
 throws RemoteException, FinderException;

And Orion will generate a SQLQuery for you. Here you can use the 'LIMIT' 
attribute. Be aware that this way is Orion specific and will reduce the 
portability of your code.

As for the EJB2.0 spec and the EJBQL does not support the 'LIMIT' 
attribute as far as I know.

/Linus

On Tuesday, February 12, 2002, at 01:05 PM, Toni Menzel wrote:

 Hi all,

 Is there possibility to set a maximum row count for a resultset ?
 Something general for the SQL Attribure LIMIT ?!

 Thanks in advance, Toni

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]] Im Auftrag von prasanth sb
 Gesendet: Sonntag, 10. Februar 2002 12:16
 An: Orion-Interest
 Betreff: Re: url.openConnection() doesn't allow to pass objects or
 attributes

 I used doPost only but still it doesn't.


 From: Kesav Kumar [EMAIL PROTECTED]
 Reply-To: Orion-Interest [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Re: url.openConnection() doesn't allow to pass objects or
 attributes
 Date: Sun, 3 Feb 2002 08:23:09 -0800

 I just noticed one more thing with your servlet.  It seems that you are
 using doGet method in your servlet.  If you do a post request through
 URL
 you need to write doPost method in your servlet.

 -kesav kumar
 [EMAIL PROTECTED]

 - Original Message -
 From: prasanth sb [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Sent: Sunday, February 03, 2002 2:51 AM
 Subject: Re: url.openConnection() doesn't allow to pass objects or
 attributes


 I set the doOuptut parameters ,but still in orion it is not working.
 Can you please help me in this?



 From: Kesav Kumar [EMAIL PROTECTED]
 Reply-To: Orion-Interest [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Re: url.openConnection() doesn't allow to pass objects or
 attributes
 Date: Sat, 26 Jan 2002 08:12:31 -0800

 For Posting data from through URLs you have to set doOutput to
 true.
 con.setDoOutput(true);
 con.setDoInput(true);

 Once you set the above you can get the OutputStream associated with
 connection and send parameters.

 For more info read the article at JavaWorld
 http://www.javaworld.com/javaworld/javatips/jw-javatip34.html

 -kesav kumar

 - Original Message -
 From: prasanth sb [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Sent: Saturday, January 26, 2002 1:27 AM
 Subject: url.openConnection() doesn't allow to pass objects or
 attributes


 Hello dear friends,
   Please help me with a strange problem happening
 with
 orion. I am calling url.openConnection() to a servlet page.When I
 call
 this,
 the call goes to doGet method of the servlet. But it has to go to
 the
 doPost
 method. Second problem is I am able to read the values from the
 callee
 servlet. But I am not able to pass the values to the callee
 servlet.I
 am
 trying to pass objects in a stream.I have seen this problem
 reported in
 the
 mailing list. Can anyone help me in this?

 Please find the sample code,

 Caller Servlet

 URLConncetion con
 =url.openConnection(http://ipname:port/Servlet1;);
 ObjectOutputStream os = new
 ObjectOutputStream(con.getOutputStream());
 os.writeObject(string object);

 Callee servlet(Servlet1.java)


 public void doGet(HttpServletRequest req,HttpServletResponse res) {
 ObjectInputStream ois = new
 ObjectInputStream(req.getInputStream());
 ois.readObject();//This line , it prints null.It wont print the
 string
 //string object.But if I return values from the servlet1, then
 Caller
 servlet is able to read.

 Can some one throw some light on this.



















 _
 Join the world's largest e-mail service with MSN Hotmail.
 http://www.hotmail.com






 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx






 _
 Join the world’s largest e-mail service with MSN Hotmail.
 http://www.hotmail.com







log4j + client-application

2002-02-09 Thread Linus Larsen



Hello

I want to use log4j together with my application. 
I.e I want all my servlets, jsps, ejbs and clients toshare the same 
logfiles.

I've implemented log4j according to the tip the 
atlassian guy gave (don't remember his name).Put the log4j.jar in 
orion/lib, add libary path="config" to the orion-application.xml and 
finally add thelog4j.properties (or .xml) in config and add "config" and 
add the config to your application. So far so good. All my servlets, jsps ejbs 
are able to invoke log statements.

The trouble is that my client which runs as 
auto-startupis not able to find log4j.xml until orion isfully 
initialized.So if I make a log statement in the main method of my client 
log4j will propt an error msg.But ifI invoke a delay until orion is 
initialized and then make my logstatement everything works.

I've tried to set the Class Path: attribute in the 
Manifest of my client ,which in my case looks like 
../../config/log4j.xml.But as it turns out the classloader points at the 
orion directory and not on my clients jar file, in the mainfest specs it says 
that the Class Path: attribute is relative to the appplications jar 
file.Which in my case is not 
true.

How do I use log4j with an application-client which 
is in autostart mode?`

regards

/Linus






Client execution...

2002-01-31 Thread Linus Larsen



I am wondering if Orion executes the application 
clients stated as auto-start in orion-application.xml in separate threads? one 
for each client?

I have three clients in my application, one 
initclient which populates the db first time the app is started, one schedular 
and one client listening on port 25 for incomming smtp. 

The trouble is that the two first clients are 
started just as expected but when Orion is trying to start the third it just 
hangs. I´ve tried to launch the third client from a servlet with the -userThread 
switch and then it starts. 

Maybe Im wrong but shouldn´t it be possible to 
launch a client who acts like a server?

Maybe I should add that Im using Orion 1.5.2 on 
macos X.

/Linus




getHeaderNames();

2002-01-28 Thread Linus Larsen

Does anyone know why the request.getHeaderNames() returns the 
headernames as uppercase in orion?

regards

/Linus