RE: RMI client accessing JMS Topic
I found it useful to look at OrionServers console, under context; in general, it seems all objects get exposed under the root context with their full qualified pathname, in your case probably something like context.lookup(com.epistemic.notification.NotificationFactory) or whatever ... -Original Message- From: Vidur Dhanda [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 8:19 AM To: Orion-Interest Subject: RMI client accessing JMS Topic Hello, Is it possible for a RMI client (com.evermind.server.rmi.RMIInitialContextFactory) to access a JMS TopicConnectionFactory? In my code, an ApplicationClient can access the TopicConnectionFactory using the java:comp/env/jms context but an RMI client hangs when it tries to access the same TopicConnectionFactory through the jms/ context. In jms.xml, there is an entry for the TopicConnectionFactory as: topic-connection-factory location=jms/notificationFactory/ and the client code hangs on the call: context.lookup(jms/notificationFactory) at RMIContext.lookup () [line 92]. The context is the same context that is used for correctly accessing other resources such as looking up EJBs. Thanks, Vidur -- Vidur Dhanda Epistemic Corporation tel: 617/566-1252 fax: 509/693-1248 cell: 617/821-7115 ICQ: 129193878 [EMAIL PROTECTED] www.epistemic.com
RE: SQL Server JDBC driver from Microsoft
weblogic (oops) has had a driver for MS SQL server for a while ... used it for a demo once, works fine for basic jdbc, don't know about advanced features and performance relative to other drivers -Original Message- From: Robert Virkus [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 5:55 AM To: Orion-Interest Subject: Re: SQL Server JDBC driver from Microsoft Hallo Jarrod, Friday, March 15, 2002, 1:46:36 PM, you wrote: JR has anyone gotten this to work with Orion 1.5.4? it just works fine over here, though it is said, that it should not be used in production-environments. We manage our own connection-pooling though and haven't had problems so far... If anyone knows more about problems within production-environments, please let us know! :-) Compared to the sun.jdbc.odbc.JdbcOdbcDriver we gained about 20% performance with the jdbc-driver from ms. Can anyone suggest a good alternative to the ms-driver? has anyone experiences with free-tds? thanks and greetings Robert -- Robert Virkus scaraboo GmbH mobile Entertainment Georg-Wulf-Str.4-6 28199 Bremen Germany phone +49 - (0)421 - 59 67 549 fax+49 - (0)421 - 59 67 567 mobile +49 - (0)171 - 35 31 635 [EMAIL PROTECTED] www.scaraboo.de wap.scaraboo.de Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen. For legal and security reasons the information provided in this e-mail is not legally binding. Upon request we would be pleased to provide you with a legally binding confirmation in written form. Any form of unauthorised use, publication, reproduction, copying or disclosure of the content of this e-mail is not permitted. This message is exclusively for the person addressed or their representative. If you are not the intended recipient of this message and its contents, please notify the sender immediately.
RE: Many clicks, many request...
Yes. On the Web page use a scripted button to submit the formdata; use boolean variable isSubmitted to indicate whether to submit. Once you set it to true after submission, simply ignore the next click or alert the user that it was done already and s/he has to be patient and wait ... --peter -Original Message- From: Juan Andres Chau Li [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 3:08 PM To: Orion-Interest Subject: Many clicks, many request... Hi, If I make 100 clicks fastly from my browser in a servlet, it generates 100 requests and 100 processes in the server. One only process is very time consuming. Is there a way to process the fisrt click and avoid the rest 99 clicks. Any alternatives? Thank you. Andres.
RE: Re(2): Application client log in
You are probably missing application-client.xml, and orion-application-client.xml; they have to be in a META-INF directory relative to the source root of your client. You should be able to find the apropriate tags in the orion docs and on the sites referenced before. In my own situation, I call RoleManager from an ejb which acts as a facade for my own security interface to make it independent from the underlying appserver (I like using Orion, but many potential clients require that it runs on the appserver of their choice ...) - so my xml files reference my Bean and not the RoleManager, which is called by my Orion-specific bean-Implementation. --peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 7:17 AM To: Orion-Interest Subject: Re(2): Application client log in Hi, Thanks for this interesting code, but when i try it , i can't make a lookup on the RoleManager : javax.naming.NameNotFoundException: java:comp/RoleManager not found Is there something special to parameter in the app server ? Thanks for your anwser. You use the rolemanager to do the login ... SECURITY_PRINCIPAL and credentials can be the orion admin account. Hashtable env = new Hashtable(); env.put(dedicated.connection,true); env.put(java.naming.factory.initial,com.evermind.server.ApplicationClien tInitialContextFactory); env.put(java.naming.provider.url,ormi://myhost/myapp); env.put(javax.naming.Context.SECURITY_PRINCIPAL, someuserwithrmiprivilages);// NOT the user you want to log in env.put(javax.naming.Context.SECURITY_CREDENTIALS,somepassword); InitialContext initialcontext = new InitialContext(env); RoleManager rolemanager = (RoleManager)initialcontext.lookup(java:comp/RoleManager); try { roleManager.login(username, password); } catch(Exception exception) { throw new SecurityException(exception.getMessage()); } There is a lot of discussion about this in the archives and e.g. on the Elephantwalkers site, as well as orionsupport and I think Atlassian. -Original Message- From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 8:22 AM To: Orion-Interest Subject: Application client log in We are currently implementing a Java Swing client, and I am wondering how to write the log in system. When not using http or form based log in (HTML) and when you wish to let the client log in from a GUI interface (Swing), which part of Orion is then used to hand over the username and password for authorization? Randahl
RE: Anyone got old orionsupport sample application client / scheduler?
Use the UK mirror: http://uk.orionsupport.com/articles/appclient.html -Original Message- From: Geoff Soutter [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 9:34 PM To: Orion-Interest Subject: Anyone got old orionsupport sample application client / scheduler? You can see it described in googles cache http://www.google.com/search?q=cache:4nkQslt9AjsC:www.orionsupport.com/a rticles/appclient.html+orion+application+clienthl=en If anyone has the source jar file, I'd really appreciate a copy! Cheers Geoff
RE: Off-topic: UML Tools...Help!!!
I can't say anything about Select, but we are using (Ir)Rational Rose here - a sometimes harrowing but necessary experience. Harrowing, because of numerous littlebugs in the software, workflows which work only under certain circumstances and not others, and certain features only partially implemented (like roundtrip engineering). Necessary, because in any medium size or larger project the UML models and diagrams are an invaluable tool for understanding what's going on. I personally like to first look at the big picture, than hack up a few prototype implementation classes, and then combine them and make model and class design coherent. Rational certainly does allow us to do this (although not as easily as we would wish). Of course it integrates better with other rational tools (e.g. clearcase) than other UML modeling apps. I have been using MagicDraw a bit, mostly for reverse engineering which was not quite as well supported by Rational. It doesn't have the number of features that Rational has, but is certainly an interesting alternative for smaller projects (and much less expensive). I have to amend that we are in the process of installing the latest update of Rational, which seems to take care of many concerns that we had and adds features like better roundtrip engineering, better integration with tools like jbuilder, andJSP support (caveat emptor - we have not used this version yet, will know more in a couple of weeks) which can be a major headache because it doesn't easily fit in the typical class model. So despite my irreverence, (ir)rational Rose helps us as a group to document the model and keep track of the overall structure of the project. If you go with Rose, make sure it's the latest version - it certainly seems to make life considerable easier (and be less irrational) Cheers --peter P.S. A coworker just told me that he used Select a couple of years ago - it was really clunky then.People here had betterexperience with togetherj than select. Of course this is all coming from opinionated people like myself ... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Sent: Thursday, December 06, 2001 7:29 AMTo: Orion-InterestSubject: Off-topic: UML Tools...Help!!! Hi, I have been asked by my manager to evaluate some UML modelling tools: Rational Rose and Select. However, I have never really used UML so I probably wasn't the best person to ask :) So, if anyone could tell me any pros and cons of these packages I would appreciate it. Developers are gonna be using JBuilder 5 Enterprise,and the idea would be to farm out classes/beans you have designed and structured in the UML model. Any information or experiences you would like to share would be appreciated as I don't have a clue :) Thanks, 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]).
RE: Invalidating session .. removing JSESSIONID cookie
Kris, for most needs I could think of you shouldn't have to worry about the cookie at all. session.invalidate() will terminate the session, so if a user attempts to access a protected resource after a page executes this statement they will be required to login again. I do seem to remember, though, some funny behaviour if some output was written to the page before the invalidate statement. The cookie itself is transparent to the Application Programmer, afaik - e.g. the Http server is supposed to switch automatically to URL based sessionId if the browser has cookies turned off. As someone commented in an earlier post, by setting the page directive session=false, no HttpSession object will be created for this page. Don't know whether this would achieve what you are looking for. --peter -Original Message- From: Trujillo, Kris [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 04, 2001 2:58 PM To: Orion-Interest Subject: Invalidating session .. removing JSESSIONID cookie Has anyone had any success with invalidating a session and removing the JSESSIONID cookie from the users browser (without requiring the user to close their browser)? I've tried using session.invalidate() with no success. I've also tried resetting the JSESSIONID cookie setting the time to expire as 0 (cookie.setMaxAge(0)) with no success. Anyone had luck with this?
RE: Microsoft JDBC Driver - Issues w/ Data Source
In a previous project we had to look at mssql as one of the database servers under consideration. Don't know, with the exception of the order of the arguments in the tag and that I didn't need to use // in front of the machine name (which could be specific to the driver) I can't see anything different; I have the driver in orion/lib, too. Here is a working example: data-source class=com.evermind.sql.DriverManagerDataSource name=jSupport location=jdbc/sql7jSupportDS xa-location=jdbc/xa/sql7jSupportXADS ejb-location=jdbc/sql7jSupportEJBDS connection-driver=weblogic.jdbc.mssqlserver4.Driver username=... password=.. url=jdbc:weblogic:mssqlserver4:localhost:1433 inactivity-timeout=30 / -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 8:25 AM To: Orion-Interest Subject: Microsoft JDBC Driver - Issues w/ Data Source I'm having some issues with using the Microsoft SQL Server JDBC Driver with Orion. Let me give you some context: Although I have some past experience with Orion (servlets, beans, jsp), I've never used its Data Sources, so I know next to nothing about them. And, although the community and documentation have improved of late, Orion's documentation is still pretty sparse. When it came time to spend some time with EJB, I moved over to JBoss, which has stronger documentation, for a while, and while on JBoss, I started making use of the Microsoft SQL Server driver beta, which has proved to be quite reasonable (which is not too surprising, since it's the Merant driver). Due to some performance issues, I wanted to see how the application we're working on would run under Orion, so I downloaded the latest, and started to try and configure it. The basic steps were still pretty easy, but now I'm stuck on the data source - no matter what I do, I can't seem to get Orion to recognize the SQL Server driver. Has anyone tried it yet? Am I missing something obvious? I put the driver JARs (three of them: msbase, msutil, mssqlserver) in orion/lib. I modified the data-sources.xml to use the driver, as follows: data-source name=MicrosoftSqlServer location=jdbc/SqlServerDS connection-driver=com.microsoft.jdbc.sqlserver.SQLServerDriver url=jdbc:microsoft:sqlserver://panthro:1433;DatabaseName=dbVoicenetDevGeoff ;SelectMethod=cursor username=user password=password inactivity-timeout=30 class=com.evermind.sql.DriverManagerDataSource / When orion starts, it says the following: Error initializing data-source 'jdbc/SqlServerDS': DriverManagerDataSource driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver' not found What does this mean? It can't find the driver? The JARs are in orion lib, I've checked that several times, including that the driver name is right, and the class is in the JAR. I can't swear that Orion is loading the JARs, because it doesn't put that out to the console or log files, so I don't really know that it's doing that, but I'm assuming it is. It does say 'DriverManagerdataSource driver', so perhaps the driver isn't what it's expecting. Should I be using another class? Based on the descriptions in the API docs and the Hypersonic example, this seems like a reasonable class to use. Suggestions? Anyone know where I can go from here? Thanks, - Geoffrey Wiseman __ Geoffrey Wiseman: Internet Applications Manager Medium One t. 416.977.2101 x. 529 http://www.mediumone.com/ __ Think it. Build it. Work it.
RE: How can I start Orion Server as a service in Windows NT/2000 ?
Most likely you have not shut down another HTTP server which is listening on the same port (probably IIS). Either disable the other service, or use the Orion HTTP server on a different port. -Original Message-From: Vu Le Hung [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 13, 2001 7:00 PMTo: Orion-InterestSubject: Re: How can I start Orion Server as a service in Windows NT/2000 ? Dear all, I tried many ways as some of you proposed 1. Use JNT 2. Use JVMI2 3. Use RunExecSvc What I got is that I hadOrion service added to my system (as a Automatic service) but - This service does not start automatically when my computer boots up. - Even after I start it by hand successfully, the Http Server doesn'tstart withtheOrion service. (i.e. I can't get to my home page installed in my computer by typing my IP address in IE) Any one know why ??? Please give me an idea. Thanks. By the way, my system configuration is : + PIII 667MHz 128MB RAM + Win2000 Advanced Server + JDK1.3 + Orion 1.4.5 demo version. My website work fine when I start Orionmanually. Yours, Vu Le Hung - Original Message - From: Justin Crosbie To: Orion-Interest Sent: Monday, November 12, 2001 4:49 PM Subject: RE: How can I start Orion Server as a service in Windows NT/2000 ? Hi Vu, You need the JNT application from http://www.eworksmart.com/JNT/ Install this and type a command similar to the following, from where you installed Orion: jnt "/InstallAsService:Orion Application Server" "/SD[ORION_HOME]" -jar orion.jar where [ORION_HOME] is where you installed Orion. Worked for me, anyway. I had a job getting other java apps to run using this tool though :( This has come up in the list before, so do a search on the archive for more info. One thing I have noticed is that Orion runs slower this way than if you start it from a command prompt. Anyone know anything about this? I've asked this before. Cheers, Justin -Original Message-From: Vu Le Hung [mailto:[EMAIL PROTECTED]]Sent: 12 November 2001 04:38To: Orion-InterestSubject: How can I start Orion Server as a service in Windows NT/2000 ? Dear all, I'm trying to find a way to start Orion Server as a service in WindowsNT/2000( i.e.Orion will be started automatically when my computer startup without any user interaction). Any one know how to do this ? I tried this as below but it failed : 1. Write an small Win32 application "startorion.exe" that calls "java -jar orion.jar" 2. Register it as a automatic service (named MyService) with Win2000 using "Service Installation Wizard" tool in the Windows 2000 Server Resource Kit. 3. Restart my computer. Then I can find item "MyService" inthe list of all available services in my computer. But this service can not be start. Any idea ??? Thanks in advance. Vu Le Hung
RE: How to get the RoleManager
Maybe the session=shared attribute would allow you to achieve your goal. Don't know whether its valid only for sharing between http and https sessions -Original Message- From: David Potts [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 10, 2001 5:02 AM To: Orion-Interest Subject: RE: How to get the RoleManager -Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] I have a feeling if you made app2 the parent app of app1 it might work (they'd probably be the same RoleManager - can't confirm that though). Thanks for the suggestion. We tried it, but it doesn't work. When we go to the second app the login form comes up again. This is a non-standard solution (if a solution at all! ;)), then again if you're using RoleManager you're already using Orion specific code so you probably don't mind too much. At the moment we are looking for *any* solution that will do form-based single signon across two apps on Orion. What is the standard? Cheers, Dave.
RE: Problem implementing Custom User Management using SimpleUserManager
I have not tried this yet, but it just occurred to me that the naming.principal is just establishing the jndi security context - it does not do a login. If you want to login, you have to first establish the context with an account in principals.xml, and then use RoleManager.login(...) to login your user. The role manager gets information about the usermanager you registered, the InitialContext has nothing to do with your usermanager. (This is just a Gedankenexperiment - if you try it, let me know whether it actually works) --peter -Original Message- From: Jeff Schnitzer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 5:15 PM To: Orion-Interest Subject: RE: Problem implementing Custom User Management using SimpleUserManager I am also experiencing this - no matter what I try (and I'm pretty sure I've tried everything), I cannot get an application client user to log in using a custom user manager (either SimpleUserManager-derived or DataSourceUserManager). Note that the application client logs in just fine using admin or any of the principals.xml users. But I get the Invalid username/password exception when trying users produced by the custom user manager. This is with Orion 1.5.2. Does anyone have application clients working with a custom user manager? Jeff -Original Message- From: Adam Maliborski [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 29, 2001 7:09 AM To: Orion-Interest Subject: Problem implementing Custom User Management using SimpleUserManager Hi, I am trying to validate users of my ejb server via a database using the SimpleUserManager. I have extended SimpleUserManager and overridden the three methods and confirmed that they are being called and returning true. I have made the following changes to the descriptors. ORION-APPLICATION.XML orion-application deployment-version=1.5.2 ejb-module remote=false path=ejb.jar / web-module id=web path=web.war / security-role-mapping name=administration group name=administration / /security-role-mapping security-role-mapping name=productbuilder group name=productbuilder / /security-role-mapping security-role-mapping name=enduser group name=enduser / /security-role-mapping persistence path=persistence / library path=c:\test\ejb.jar / principals path=principals.xml / user-manager class=com.test.rms.user.orion.UCIServerUserManager / log file path=application.log / /log namespace-access read-access namespace-resource root= security-role-mapping name=lt;jndi-user-rolegt; group name=administration / group name=productbuilder / group name=enduser / /security-role-mapping /namespace-resource /read-access write-access namespace-resource root= security-role-mapping name=lt;jndi-user-rolegt; group name=administration / group name=productbuilder / group name=enduser / /security-role-mapping /namespace-resource /write-access /namespace-access /orion-application PRINCIPALS.XML principals groups group name=administration permission name=administration / permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group group name=productbuilder permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group group name=enduser permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group /groups users /users /principals ORION-EJB-JAR.XML orion-ejb-jar deployment-version=1.5.2 deployment-time=e93e1950d0 enterprise-beans .. .. (EJB DECLARATION) .. assembly-descriptor security-role-mapping name=administration /security-role-mapping security-role-mapping name=productbuilder /security-role-mapping security-role-mapping name=enduser /security-role-mapping default-method-access security-role-mapping name=lt;default-ejb-caller- rolegt; impliesAll=true / /default-method-access /assembly-descriptor /orion-ejb-jar When I try to access the ejb server through an external java client using the following code : Properties prop = new Properties(); prop.put (java.naming.factory.initial, com.evermind.server.ApplicationClientIn itialContextFactory); prop.put(java.naming.provider.url, ormi://localhost/UCIServer); prop.put(java.naming.security.principal, adammal); prop.put(java.naming.security.credentials, adammal); Context initial = new InitialContext(prop); I get the following error : java.lang.SecurityException: Invalid username/password for UCIServer
RE: Newbie classpath problem - please help
-cp does not work in conjunction with -jar. The jar file gets its class path from the manifest file. You can drop jars into the the implicit classpath at your jre/lib/ext. I have not tried it, but Orions classloader may pick up jars in the Orion directory. For your applications, you can specify a lib directory in application.xml library path=.../; for web applications WEB-INF/lib will do. --peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 2:48 AM To: Orion-Interest Subject: Newbie classpath problem - please help I've installed Orion 1.5.2 on my Windows NT4 development machine. I have a system classpath that points to lots of standard classes, for utilities, etc. If I start Orion with the command java -jar orion.jar then it doesn't pick anything up from the classpath, if on the otherhand I start Orion with the command java -jar -cp %CLASSPATH% orion.jar then I get a java.util.zip.ZipException error with the following message The filename, directory name, or volume label syntax is incorrect Do I need to set the classpath elsewhere? Thanks E-mail communication is not secure and may be intercepted by a third party. This message is confidential to the intended addressee. If you are not the intended addressee, please inform us immediately and then delete this message. Virgin Direct does not accept responsibility for changes made to this message after it was sent. Although Virgin Direct believes this e-mail is free of any virus or other defect which may affect a computer, it is the responsibility of the recipient to ensure that it is virus free and Virgin Direct does not accept any responsibility for any loss or damage arising in any way from it's use. Virgin Direct Personal Financial Service Ltd is regulated by the Personal Investment Authority for life insurance, pension and unit trust business and represents only the Virgin Direct marketing group. Registered office: Discovery House, Whiting Road, Norwich NR4 6EJ, UK. Registered in England No. 3072766. The Virgin One account is a secured personal bank account with The Royal Bank of Scotland plc. It is provided by Virgin Direct Personal Finance Ltd which is a representative only of Virgin Direct Personal Financial Service Ltd. Registered office: Waterhouse Square, 138-142 Holborn, London EC1N 2TH, UK. Registered in England no 3414708. The Virgin Deposit Account is a personal deposit account with The Royal Bank of Scotland plc administered by Virgin Direct Personal Financial Service Ltd. All telephone calls are recorded and may be monitored.
RE: Which JAR do I need to run an external client app
In my case at least it is java:whatever-is-in-application-client.xml or orion-application-client.xml that's not available. Is there any other place to specify the jndi location for an ejb? Experimented with RMIInitialContextFactory as well without success. with the follwoing entry in application-client.xml: ejb-ref-nameejb/ArticleHandler/ejb-ref-name Whatever I specify, I get the following error (cm is application name), e.g.: Communication error: Invalid name:cm/ejb/ArticleHandler Communication error: Invalid name:/cm/ejb/ArticleHandler Communication error: Invalid name:ejb/ArticleHandler Communication error: Invalid name:/ejb/ArticleHandler Communication error: Invalid name:ArticleHandler now what? How do I correctly specify the jndi name? -Original Message- From: David Libke [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 1:35 PM To: Orion-Interest Subject: RE: Which JAR do I need to run an external client app Peter, The problem you are experiencing is because the JNDI locations need to be changed when the location of the client jar is changed -- namely change 'java:comp/env/' to 'java:hello/client/' or some other path that is appropriate. 'java:comp/env' is reserved for the application server's environment resources; thus, a different JNDI entry must be created for your application client when it is outside of the server. Good luck on synchronizing all the xml entry names. Dave -Original Message- From: Cugier (extern) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 11:18 AM To: Orion-Interest Subject: Which JAR do I need to run an external client app Hello, I have the following problem. I created a Java Client application that accesses an EJB. I start the client with the following batch file. set CLASSPATH=H:\oc4j\j2ee\home\ejb.jar;.;H:\oc4j\j2ee\home\orion.jar;H:\oc4j\j2 ee\home\jndi.jar java HelloClient where H:\oc4j\j2ee\home ist the directory where I installed the OC4J/Orion Server on my computer. When I start the client with this batch file everything works fine. As I don't want to install OC4J/Orion on each PC where the client should run I copied the three JAR file that ar listed in the CLASSPATH from H:\oc4j\j2ee\home to D:\ExtraJARs. I changed the batch file to set CLASSPATH=D:\ExtraJARs\ejb.jar;.;D:\ExtraJARs\orion.jar;D:\ExtraJARs\jndi.ja r java HelloClient After the change I get the following error javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component at com.sun.enterprise.naming.java.javaURLContext.getComponentContext(../../src/ share/com/sun/enterprise/naming/java/javaURLContext.java:392) at com.sun.enterprise.naming.java.javaURLContext.lookup(../../src/share/com/sun /enterprise/naming/java/javaURLContext.java:51) at javax.naming.InitialContext.lookup(Unknown Source) at HelloClient.main(HelloClient.java:9) Can anyone explain why it works when I use the three JARs from the H:\oc4j\j2ee\home directory but doesn't work when I try to use the copied JAR files. Thanks Peter
RE: Which JAR do I need to run an external client app
This problem seems to be similar to what I have been running into when trying to start an Application Client from WebStart - which also involves copying the jars to the webstart cache. It's got something to do with Orions jndi implementation, I suspect - we got the same thing running in another appserver without a problem. Anybody out there got any idea? Maybe we need to report this as a bug? --peter Peter N. Saurugger Agilent Technologies [EMAIL PROTECTED] -Original Message- From: Cugier (extern) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 8:18 AM To: Orion-Interest Subject: Which JAR do I need to run an external client app Hello, I have the following problem. I created a Java Client application that accesses an EJB. I start the client with the following batch file. set CLASSPATH=H:\oc4j\j2ee\home\ejb.jar;.;H:\oc4j\j2ee\home\orion.jar;H:\oc4j\j2 ee\home\jndi.jar java HelloClient where H:\oc4j\j2ee\home ist the directory where I installed the OC4J/Orion Server on my computer. When I start the client with this batch file everything works fine. As I don't want to install OC4J/Orion on each PC where the client should run I copied the three JAR file that ar listed in the CLASSPATH from H:\oc4j\j2ee\home to D:\ExtraJARs. I changed the batch file to set CLASSPATH=D:\ExtraJARs\ejb.jar;.;D:\ExtraJARs\orion.jar;D:\ExtraJARs\jndi.ja r java HelloClient After the change I get the following error javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component at com.sun.enterprise.naming.java.javaURLContext.getComponentContext(../../src/ share/com/sun/enterprise/naming/java/javaURLContext.java:392) at com.sun.enterprise.naming.java.javaURLContext.lookup(../../src/share/com/sun /enterprise/naming/java/javaURLContext.java:51) at javax.naming.InitialContext.lookup(Unknown Source) at HelloClient.main(HelloClient.java:9) Can anyone explain why it works when I use the three JARs from the H:\oc4j\j2ee\home directory but doesn't work when I try to use the copied JAR files. Thanks Peter
RE: session bug
If I read your output correctly, your session object is still there in Tomcat after the invalidate; only when you do a new getSession() a new session ID is obtained. I have not read the spec on what the behaviour should be, but the required behaviour may only say that at the *next incoming request* the session object is not available any more. Anybody out there took a peek at the spec? --peter -Original Message- From: Denis Kranjcec [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 6:45 AM To: Orion-Interest Subject: session bug Hello everyone! I think I have found bug in orion 1.5.2. There is problem with sessions. When I invalidate session and then get new session, sometimes (not always) I get same invalidated session. Does anybody have same problem? Any solution except that I remove all data from session? Thanks in advance. Here is code that demonstrates bug: session = request.getSession(true); System.out.println("session = request.getSession(false);\t" + session.hashCode()); System.out.println("session = " + session); session.invalidate(); System.out.println("session.invalidate();\t" + session.hashCode()); System.out.println("session = " + session); session = request.getSession(); System.out.println("session = request.getSession();\t" + session.hashCode()); System.out.println("session = " + session); Orion's output: session = request.getSession();2935133 session = HTTP Session AKAEMHOGAJOD session.invalidate(); 2935133 session = HTTP Session AKAEMHOGAJOD session = request.getSession(); 2935133 session = HTTP Session AKAEMHOGAJOD Exception is java.lang.IllegalStateException: Session was invalidated at com.evermind.server.http.EvermindHttpSession.setAttribute(Unknown Source) at isvu.kadrovska.web.command.LoginCommand.execute(LoginCommand.java:161) at isvu.kadrovska.web.Kadrovska.doPost(Kadrovska.java:183) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._cxb._abe(Unknown Source) at com.evermind._cxb._uec(Unknown Source) at com.evermind._io._twc(Unknown Source) at com.evermind._io._gc(Unknown Source) at com.evermind._if.run(Unknown Source) With tomcat everything works OK. Tomcat's output: session = request.getSession();7616245 session = org.apache.tomcat.session.StandardSession@7436f5 session.invalidate(); 7616245 session = org.apache.tomcat.session.StandardSession@7436f5 session = request.getSession(); 4461550 session = org.apache.tomcat.session.StandardSession@4413ee Denis Kranjcec
request.getInputStream - more
Title: After some experimentation I found that the availability of the request input stream is dependent upon the request mime type. E.g. submission from an HTML forms default mime type is *not* available, while text/xml-SOAP or multipart/form-data is.I believe this is not the correct behaviour, because the servlet spec(2.2) says:Posted form data is only read from the input stream of the request and used to populate theparameter set when all of the following conditions are met:1. The request is an HTTP or HTTPS request.2. The HTTP method is POST3. The content type is application/x-www-form-urlencoded4. The servlet calls any of the getParameter family of methods on the request object.If any of the getParameter family of methods is not called, or not all of the above conditionsare met, the post data must remain available for the servlet to read via the request's input stream. I have submitted this as bug 607. --peter
RE: Running Orion as Win 2000 services ???
JNT is a viable and simple alternative - http://www.eworksmart.com/JNT/ problems I encountered with it are that shutting down the service from the W2K services console hangs (after shutting the service down, so it's no big problem). A larger issue is that it uses the "default JVM", which on one of my machines is 1.2.2 (company required 'legacy app'), in which Orion doesn't run. Have not been able to figure out how to change that, even after consulting with our Microsoft contact. Anyway, if you have 1.3 or greater installed, it's easy to install and remove, and has worked fine. --peter -Original Message-From: Eddie [mailto:[EMAIL PROTECTED]]Sent: Friday, September 14, 2001 5:22 AMTo: Orion-InterestSubject: Running Orion as Win 2000 services ??? Please some help running Orion as an Win 2000 service as it doesn't work as explained on the Oriosupport.com site. On this site they talk about using the program called "RunExeSvc.exe". When I use this and add Orion as a service it gives me the following error: "Error number: 997 -- Overlapped I/O operation is in progress". Even if try it on other computer and try different configurations, it gives me the same errors. Anyone any idea what it could be ? or any advice how to run Orion as a service ? Eddie
reading the ServletInputStream
I am trying to read the 'raw' http request that is submitted e.g. by a FORM. I assume that ServletInputStream should contain the unparsed HTTP request. public class RequestEchoServlet extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletInputStream in = request.getInputStream(); int character; PrintWriter out = response.getWriter(); while ( (character = in.read()) -1 ) { out.print( character ); System.out.print( # );// never gets here } System.out.print(character); out.flush() ; out.close() ; } // of doPost() } in.read() immediately returns -1. What is wrong - my assumption or my code (or both ...) Thanks --peter -Original Message- From: Xiaowen Wang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 10:17 PM To: Orion-Interest Subject: Help!!Subject.getSubject(AccessControlContext) returns null Hi: I've been trying to send the authenticated app client's Subject to a RMI Activatable server in another JVM. In the app client, I run the follwing: AccessControlContext ac = AccessController.getContext(); Subject sbj = Subject.getSubject(ac); However, sbj turns out to be null. Is it because ac is NOT the Subject that's authenticated at the beginning of the app client run? Thanks XW
RE: ORacle db string over 4000 chars
Title: ORacle db string over 4000 chars use clob instead of varchar -Original Message-From: Nusairat, Joseph F. [mailto:[EMAIL PROTECTED]]Sent: Friday, September 07, 2001 8:39 AMTo: Orion-InterestSubject: ORacle db string over 4000 chars Does anyone know how to handle this oracle 8.x u can have a varchar set to 4k ... sooo to do more than that i tried using a long and a long raw and inserting it that way ... however whenver i go over 4000 chars it bombs any one come across this problem? Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: [EMAIL PROTECTED]
RE: FORM based authentication with form-login-page as a JSP
Would be interesting to control where a user goes, e.g. always redirecting them to the home page. Unfortunately, I don't have an answer to your question, just another observation: you don't even have to submit the page to j_security_check (see e.g. atm/atm-web/login.jsp) - orion -knows- where to send the request from the page specified in FORM based authentication. The regular case would be that the same page is served (without specifying the ACTION attribute to the FORM), but Orion nicely processes your request and does the 'appropriate' thing. I have not had time to try to look inside orion to find out what they are doing internally. If an answer is found to this question, I'd sure like to hear about it --peter -Original Message- From: Trujillo, Kris [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 1:24 PM To: Orion-Interest Subject: FORM based authentication with form-login-page as a JSP Here's some starting context for my question I have a war file that has been configured to use FORM based authentication. I have set the form-login-page in the web.xml of the war file to point to a jsp file in my war file. I have setup constraints against different jsps in the war file (/foo/foo.jsp, /foo2/foo.jsp, etc). When a user invokes any jsp without being logged in the login jsp is displayed. The user enters the userid/password submits the page to j_security_check, is validated and redirected to the requested page. My question is ... Has anyone ever tried discovering the page that the user is trying to access from within the jsp page referenced as the form-login-page? I have tried checking the HTTP headers and session, but have not discovered it being saved anywhere. Usually when a page invokes another page the HTTP header REFERER exists with the URL to the previous page. I have noticed that once the user posts the login form on my login.jsp to j_security_check and is authenticated they are redirect to the correct location .. correct location being back to the page they wanted to access originally. This would mean that it has to be somewhere, but where??
RE: AppClient: namespace problem
This is a resend, as the original message(s) didn't make it: First, the LoginException class that I was missing in my previous message is (of course) in jaas.jar ... I know there were communications about thisbefore, but was not able to dig out anything useful: Again when attempting to run my AppClient from WebStart, I get the following error: 'java:com/env namespace is only available from within a J2EE component' Since I can start the client from the command line: java -cp .;D:/orion.jar AppClient, how does the VM know whether a class is a J2EE component or not (and know it is a j2ee component when started from the command line but not from WebStart?!)? I added the jndi.jar to the classpath for my client in WebStart, but no luck. I tried other namespaces, e.g. java:, but so far without success. If the VM cannot figure out that I've got a j2ee app client, do I have to use RMIInitialContextFactory? There was a request earlier asking for a good explanation ofhow orions namespaces work, but I have not seen any answer (yet). Has anybody out there used WebStart with Orion AppClients? Thanks --peter Peter Saurugger Agilent Technologies [EMAIL PROTECTED]
RE: AppClient: problem with LoginException
Hi Tim, the class not found problem is solved - the class is in jaas.jar (there is a separate message I sent a while ago which has not appeared yet.) I currently hardcode the properties in the file, Hashtable env = new Hashtable(); // Get the context env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.ApplicationClientInitialContextFactory); env.put(javax.naming.Context.PROVIDER_URL, ormi://localhost/app); env.put(javax.naming.Context.SECURITY_PRINCIPAL, admin); env.put(javax.naming.Context.SECURITY_CREDENTIALS, password); Context context = new InitialContext(env); Object homeObject = context.lookup(java:comp/env/ejb/MyEJB); ejb-ref-nameejb/MyEJB/ejb-ref-name in meta-inf/application-client.xml although it's possible to set them in the *.jnlp file (or read from a file if security/all-permissions is set). Now I am running into a JNDI problem: the client starts, but cannot find the ejb: Communication error: java:comp/env namespace is only available from within a J2EE component is all I get. Since I have no problem starting the client from the command line or applicationlauncher or the console, I try to find out why the client is not recognized as a j2ee component when started from WebStart, and what the jndi path to my ejb may be? I have encluded the following jar files in the jnlp file (the 'path' for the MyCLient.jar): resources j2se version=1.3/ jar href=MyClient.jar/ jar href=xerces.jar/ jar href=jaas.jar/ jar href=xalan.jar/ jar href=jaxp.jar/ jar href=crimson.jar/ jar href=parser.jar/ jar href=jndi.jar/ jar href=j2ee.jar/ jar href=orion.jar/ /resources Thanks, appreciate your feedback Peter N. Saurugger Agilent Technologies [EMAIL PROTECTED] -Original Message- From: Tim Pouyer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 6:54 AM To: Orion-Interest Subject: Re: AppClient: problem with LoginException Did you supply the orion.jar file as a resource for your web start app? How about your initialContext that you try to use to create a connection with orion, did you make sure your credentials and principal names are correct? Are you trying to read these from a file such as Properties prop = new Properties(); prop.load(new FileInputStream(XXX.properties)); if so you will need to ask web start for full privilages on the client machine or use the jnlp RandomAccessFileService class to access that file. I can't realy help unless you tell me more about the problem. - Original Message - From: SAURUGGER,PETER (A-PaloAlto,ex2) [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Tuesday, September 04, 2001 6:31 PM Subject: AppClient: problem with LoginException I am trying to start an application client with Java WebStart (the client works fine from the command-line or applicationlauncher or the console). I get a java.lang.NoClassDefFoundError: javax/security/auth/login/LoginException when started with WebStart, and only with WebStart. This class is referenced in the j2ee API doc. Searching in j2ee.jar, I found instead a com/sun/enterprise/security/LoginException class, but not the javax packaged one. My questions: (1) In which jar do I find javax/.../LoginException? (2) Anybody has any idea why this occurrs only when I attempt to start the application client with WebStart? Thanks --peter
AppClient: problem with LoginException
I am trying to start an application client with Java WebStart (the client works fine from the command-line or applicationlauncher or the console). I get a java.lang.NoClassDefFoundError: javax/security/auth/login/LoginException when started with WebStart, and only with WebStart. This class is referenced in the j2ee API doc. Searching in j2ee.jar, I found instead a com/sun/enterprise/security/LoginException class, but not the javax packaged one. My questions: (1) In which jar do I find javax/.../LoginException? (2) Anybody has any idea why this occurrs only when I attempt to start the application client with WebStart? Thanks --peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 11:35 AM To: Orion-Interest Subject: Orion and Sax/JDom Your mail has been forwarded to [EMAIL PROTECTED] On September 4, 2001, Marathon Innovations, Inc. changed its name to SmartPath, Inc. Please update your address book. SmartPath, Inc. 598 Airport Blvd., Ste. 600 Morrisville, NC 27560 (919) 462-1489 www.smartpathinc.com Thank you
RE: Upload files
Works fine for me. Only difference is that as in the example I read directly from the PostFileInputStream - to rehash it here: int character; PostFileInputStream in = (PostFileInputStream)element; while ( (character = in.read()) -1 ) { out.write( character ); } Your input buffering code in the snippet you show is not correct --peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 12:27 AM To: Orion-Interest Subject: Upload files I try to upload file from a jsp-page with the code below. The code retrieve the file path with in.getFileName() but in.avaiable() is always returning 0. I can not understand why? Can any of you help me with this problem or have any of you done this? Thanks in advance, Rudi. Enumeration enumeration = new FilePostParser(request.getInputStream(), request.getContentLength()); while(enumeration.hasMoreElements()){ Object element = enumeration.nextElement(); if(element instanceof Map.Entry){ Map.Entry entry = (Map.Entry) element; String param = (String)entry.getKey(); . . . . } else if (element instanceof PostFileInputStream){ in = (PostFileInputStream)element; originFileName = in.getFileName(); } boolean isReading = true; BufferedInputStream buffIn = new BufferedInputStream(in); byte[] buf = new byte[4 * 1024]; while (isReading) { int readByte = buffIn.read(buf); out.print( +readByte); isReading = readByte != (-1); } out.println(br); buffIn.close(); and the form: form name=mainform action=submitdata.jsp enctype=multipart/form-data method=post input type=file name=file value=Browse... input type=submit value=Register /form
RE: External EJB Client
Find a nice little example in Chapter 30 of WROX Professional Java Server Programming J2EE Edition. There are both Web and Swing Clients to an EJB backend. Good simple stuff to get started. --peter -Original Message- From: Fredrik Lindgren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 4:37 AM To: Orion-Interest Subject: Re: External EJB Client It seems like you are using the ApplicationClientInitialContextFactory without actually packaging your code as an Application Client. The Application Client concept is part of the J2EE framework and an application Client is deployed much like other modules. One of the things needed is the deployment descriptor application-client.xml It seems that you are copying this descriptor to the ejb deployment structure rather than to the client deployment structure. If you intend to look up beans or other objects in the Orion JNDI tree from outside the server I think that you should use the RMIInitialContextFactory instead. I haven't used it myself so don't take my word for it. By the way, I'm not sure of what classes are needed in the client classpath to make this work. You might need to include the full orion.jar. Regards Fredrik Lindgren Ed Brown wrote: I'm trying to call an EJB from outside of the Orion enviornment. I get the following stack trace: javax.naming.NamingException: META-INF/application-client.xml resource not found at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext (JAX) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246) at javax.naming.InitialContext.init(InitialContext.java:222) at javax.naming.InitialContext.init(InitialContext.java:198) at com.ekb.email.ReceiptMailServer.getContext(ReceiptMailServer.java:62) at com.ekb.email.ReceiptMailServer.init(ReceiptMailServer.java:85) at com.ekb.email.ReceiptMailServer.main(ReceiptMailServer.java:224) - I'm using ant to build and deploy. I defined the following in the build.xml file: target name=ejb-meta-inf depends=prepare copy file=${etc.dir}/ejb-jar.xml tofile=${lib.dir}/ejb/META-INF/ejb-jar.xml / copy file=${etc.dir}/application-client.xml tofile=${lib.dir}/ejb/META-INF/application-client.xml / /target Does anyone know why I'm still getting the exception? Thanks in advance. Ed Brown _ This mail sent via toadmail.com, web e-mail @ ToadNet - want to go fast? http://www.toadmail.com
ejb.dfPackage ejb.dfPackage.wmf
Anybody knows the role these files play (they are in the ATM example, com/acme/atm/ejb in atm-ejb) - what are they for, where do I find info (e.g. about format), and how is the *.wmf file created? Cheers --peter
RE: Application CLient JNDI properties
Yes, ejb.jar, jndi.jar and orion.jar are all added to the classpath. -Original Message- From: Scott Hamilton, (m)+61-404-280 238 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 3:57 PM To: Orion-Interest Subject: RE: Application CLient JNDI properties what I get is: Communication error: Can't find Serial Context Provider What am I doing wrong? Have you specified orion.jar in your classpath???
Application CLient JNDI properties
Title: RE: SessionContext.getEJBObject() I am trying to start a swing client app which communicates with an ejb. Works fine if I use the console or applicationlauncher.jar Now I am trying to run the client directly from java, i.e. java my.Client -Djava.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory -Djava.naming.provider.url=ormi://hostname:23791/my-app-name -Djava.naming.security.principal=user -Djava.naming.security.credentials=password what I get is: Communication error: Can't find Serial Context Provider What am I doing wrong?