Re: Placing resources in to Orion/JNDI...
The recommended procedure for this in Orion is to create an application-client (j2ee, with META-INF/application-client.xml etc) that performs the task. You then set auto-start="true" on the client-module tag in orion-application.xml and specify a valid user="" attribute value to run it as in order to invoke it at server startup. We feel this procedure is the best since it uses minimum "proprietary" technologies and is the most portable. You will have a problem if using resource-ref/ejb-ref when using the values you bind to the context though since the values need to be present before the app-client is run, but for global vars/bindings it will work fine. /Magnus Stenman, the Orion team - Original Message - From: "Alex Paransky" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, March 29, 2000 1:42 AM Subject: Placing resources in to Orion/JNDI... I have a resource which needs to be available for all the EJB objects to use. I would like to create this resource and bind it in to JNDI context. This is a singleton resource. I am not sure of how to accomplish this with Orion. In other servers, there is a way to execute some "startup" code which could do this initialization for me, however, with Orion I am at loss. Section 5.4 of the J2EE 1.2 Spec talks about Resource Factory References, which should be used to reference "factory" type of resources from the beans. The problem is that the Reference, is just that, a reference to something else. How do I put that "something else" in to the JNDI registry at server startup, so the reference is then valid. Thanks. -AP_
Error in ejbPassivate: java.lang.InternalError: Werent current caller
Hi, i have a strange benaviour of both orion 0.9.4q and 0.9.4v (but not with 0.9.4). I have a business method in an entity bean, which itself calls business methods in other entity beans (same type, but different instances). I have a remote client, that basically does nothing but call this method - and nothing after this call. From my own log files i can see, that the method is executed successfully. However, after this execution the server initiates first two ejbStore ops (on each bean touched by the method), and after this (appearantly unmotivated) an ejbLoad on some bean. However, on the server side everything seems to be ok: no exceptions, no core dumps... Meanwhile the client recieves a: java.rmi.RemoteException: Transaction was rolled back: Error in ejbPassivate: java.lang.InternalError: Werent current caller at com.evermind.server.rmi.a3.invokeMethod(JAX) at com.evermind.server.rmi.av.invoke(JAX) at __Proxy1.setBeanReference(Unknown Source) at de.netmedia.ejb.test.clienttest.main(clienttest.java:77) What does this mean ? My ejbPassivate function does only set some variables in the bean to null / 0. I could not figure out any information on "Werent current caller" at javasoft.com. Is it an exception generated by orion ? By the JVM (I'm using Linux, Sun JDK 1.2.2 on the server and windows NT Sun JDK 1.2.2 on the client) ? And why the client recieves an exception for a function, that only the server executes on its will (and not on client requests) ? Does anyone know, what happens ? Jens Stutte [EMAIL PROTECTED], http://www.net-media.de NetMedia GmbH Schubertstr. 8 66111 Saarbruecken Germany fon: +49 (0) 681 - 37 98 80 fax: +49 (0) 681 - 33 89 3
Remote debugging with CodeWarriro
Hi there, To anyone using CodeWarrior, it's possible to debug orion (including tag-lib, ejb, servlets, ... ) remotely. In my case, I use CodeWarrior under Mac OS to compile and debug, and I deploy via ftp and run orion on my Linux box. For that (please let me know if you did it on another way), I created a special project including related sources I want to debug, anda wrapper class to orion because CodeWarrior needs an application (main method) to run the debugger: - package com.evermind.server; public class ApplicationServerDebugger { public static void main( String args[] ) { try { com.evermind.server.ApplicationServer.main( args ); } catch ( Exception e ) { System.out.println( e.getMessage() ); } } } - I included this class and all classes I want to debug on one jar file "OrionDebuggerMain.jar". This file is then placed on Linux box. - I made a shell script to start java debugger on Linux, including path to debug classes: PATH=/sbin:/usr/bin:/usr/sbin:/bin ORIONHOME=/usr/local/orion JAVAHOME=/usr/local/jdk1.2.2 DEBUGCOMMAND="-verbose -Xdebug -Xdebugport8000 -Xbootclasspath:$JAVAHOME/jre/lib/rt.jar:$JAVAHOME/lib/tools.jar -Djava.compiler=NONE" DEBUGCLASSPATH="-classpath $CLASSPATH:$ORIONHOME/orion.jar:$ORIONHOME/OrionDebuggerMain.jar" export PATH cd $ORIONHOME $JAVAHOME/bin/java $DEBUGCOMMAND $DEBUGCLASSPATH sun.tools.agent.EmptyApp - You must setup CodeWarrior Debugger for deployment host IP, with port 8000 for this example. 1. start the shell script on deployment host 2. launch CodeWarrior debugger on development host 3. you should get the CodeWarrior debug console, then something like "Orion/0.9.4 initialized". I will now try with multiple standalone apps (multiple VM). Bernard Sauterel +--++ | Bernard Sauterel | sauterel.net | +--++ email | [EMAIL PROTECTED] direct | 022 840 31 58 fax | 022 840 31 56 natel | 078 604 43 34
Session problems.
Hi everyone. I've been having some trouble with HTTP sessions... if I invalidate a session, and then re-request a page (JSP, servlet)... or just re-call getSession(), the same ID is used. The session is invalidated because all of the data is lost, however I don't think that when the client requests the same session ID, a new session should be assigned that same ID. This code snippet (JSP) demonstrates the problem: %out.println("Initial ID: " + session.getId() + "br");session.putValue("test","test");out.println("Test data: " + session.getValue("test") + "br");session.invalidate();session = request.getSession();out.println("New ID: " + session.getId() + "br");out.println("Test data: " + session.getValue("test") + "br");% I've talked to one other person about this problem already, and he claims that it doesn't appear on his machine. Anyonehave any ideas why it's happening?! Another problem: when I access pages on my local machine with MSIE, session information seems to be stored fine... however, in the servlet, although a call to isRequestedSessionIdFromCookie() confirms that a cookie is beingused, the cookie is nowhere to be found in the Cookie array returned by getCookies(). It works normally from Netscape. Again, any ideas? stefan tryggvason