Re: Servlet accessing
Hi! You can use servlet-mapping tag to do it. ... servlet-mapping servlet-namemyServlet/servlet-name url-pattern/myservlet/url-pattern /servlet-mapping ... Bye! Huynh Ha
RE: Error Accessing an EJB through a Bean
Don't know if this is the problem but its possible. When you use the client the classes you reference are the ones on the server with ejb. When you use the other server you are referencing old version of the classes and so you get a class cast exception. Make sure the classes are the same. Hope this helps. Owen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cugier (extern) Sent: 10 October 2001 15:40 To: Orion-Interest Subject: Error Accessing an EJB through a Bean We created a Bean to access an EJB from JSPs. First we tested the Bean from a Java Client and everything worked fine. Then we copied the Bean to the Orion server and tried to acces the EJB by using a JSP that instanciates the Bean that accesses the EJB. But we can not get it to work. The test with the Java client still works properly. But using the Bean from JSP always creates a ClassCastException. Here's the sniplet from the Bean where the lookup is performed. private static GUIServiceSBHome getHome(){ GUIServiceSBHome toReturn = null; try { Hashtable env = new Hashtable(); //ToDO if this bean runs inside a container this Env property will not be //necessary env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.SECURITY_PRINCIPAL, admin); env.put(Context.SECURITY_CREDENTIALS, xyz); env.put(Context.PROVIDER_URL, ormi://164.139.33.191:23791/bizDataNew); // Replace EJB ModuleName below with the EJB module name identified // in your deployment profile Context ctx = new InitialContext(env); Object ref = ctx.lookup(GUIServiceSB); logger.debug(Got an Object.. Class = + ref.getClass()); toReturn = (GUIServiceSBHome)PortableRemoteObject.narrow(ref, GUIServiceSBHome.class); logger.debug(Lookup5); } catch(Throwable ex){ logger.error( Unable to perform lookup for GUIServiceBean Home interface\nException = + ex.toString() ); } return toReturn; } The logger.debug statements create the following output. From the Client: de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class __Proxy0 de.mgi.frontend.GUIServiceProxyBean: Lookup5 On the Server (Bean used by JSP): de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class GUIServiceSBHome_StatelessSessionHomeWrapper215 de.mgi.frontend.GUIServiceProxyBean: Unable to perform lookup for GUIServiceBean Home interface Exception = java.lang.ClassCastException: GUIServiceSBHome_StatelessSessionHomeWrapper215 was not an instance of interface de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome, the interface it implements is de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome Next to the relevant question why does the Bean get an exception when it is executed on the server, there are also two more questions that I have when I look at the ouput. 1. Why is the return value of ref.getClass() different? The client and the JSP are accessing the same EJB on the same Orion server. 2. Why does it says the retrieved object is not an instance of the interface ...GUIServiceSBHome but an instance of ...GUIServiceSBHome? For me the two interface classe names look the same. And hint why the bean is not working on the server is greatly appreciated. Peter Cugier Database and Web Technology Consulting Georg-Simon-Ohm-Str. 4, 45701 Herten (GERMANY) Phone: +49(0)209 3593777 Fax: +49(0)209 3593766 E-Mail: [EMAIL PROTECTED]
Re: Error Accessing an EJB through a Bean
Hello. INLINE. We created a Bean to access an EJB from JSPs. First we tested the Bean from a Java Client and everything worked fine. Then we copied the Bean to the Orion server and tried to acces the EJB by using a JSP that instanciates the Bean that accesses the EJB. But we can not get it to work. The test with the Java client still works properly. But using the Bean from JSP always creates a ClassCastException. Here's the sniplet from the Bean where the lookup is performed. private static GUIServiceSBHome getHome(){ GUIServiceSBHome toReturn = null; try { This part with the Hashtable is not correct. You should avoid it. Better create a jndi.properties file in the root directory of your JAR, or the root rirectory of your classes. then just use new InitialContext() which will get the required properties from the jndi.properties file. Hashtable env = new Hashtable(); //ToDO if this bean runs inside a container this Env property will not be //necessary env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.SECURITY_PRINCIPAL, admin); env.put(Context.SECURITY_CREDENTIALS, xyz); env.put(Context.PROVIDER_URL, ormi://164.139.33.191:23791/bizDataNew); Let's see. // Replace EJB ModuleName below with the EJB module name identified // in your deployment profile As said... Especialy in a web-bean use new InitialContext() Context ctx = new InitialContext(env); Object ref = ctx.lookup(GUIServiceSB); logger.debug(Got an Object.. Class = + ref.getClass()); toReturn = (GUIServiceSBHome)PortableRemoteObject.narrow(ref, GUIServiceSBHome.class); logger.debug(Lookup5); } catch(Throwable ex){ logger.error( Unable to perform lookup for GUIServiceBean Home interface\nException = + ex.toString() ); } return toReturn; } The logger.debug statements create the following output. From the Client: de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class __Proxy0 de.mgi.frontend.GUIServiceProxyBean: Lookup5 On the Server (Bean used by JSP): de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class GUIServiceSBHome_StatelessSessionHomeWrapper215 de.mgi.frontend.GUIServiceProxyBean: Unable to perform lookup for GUIServiceBean Home interface Exception = java.lang.ClassCastException: GUIServiceSBHome_StatelessSessionHomeWrapper215 was not an instance of interface de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome, the interface it implements is de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome Next to the relevant question why does the Bean get an exception when it is executed on the server, there are also two more questions that I have when I look at the ouput. 1. Why is the return value of ref.getClass() different? The client and the JSP are accessing the same EJB on the same Orion server. 2. Why does it says the retrieved object is not an instance of the interface ...GUIServiceSBHome but an instance of ...GUIServiceSBHome? For me the two interface classe names look the same. Ok. I had the same problem. It was, that I had one and the same class (the Home Interface) in two places. Both classes, though identical these classes were not compatible :(. It is possible (like in my case) that you have the home interface both in the ejb-jar and the web-app. Try removing it from the web-app. And hint why the bean is not working on the server is greatly appreciated. Peter Cugier Lachezar.
Re: Servlet accessing
you need to set up the name you want associated with the servlet in your application's web.xml file... look at the docs for that :-) morten wilken -Original Message- From: Naveen Kamrudeen [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Date: 11. oktober 2001 05:13 Subject: Servlet accessing Hi, I have a servlet deployed in Orion Server. To call the server I need to specify http://localhost/servlet/myServlet. The problem is I dont want the /servlet thing that means like http://localhost/myServlet how do I do this. I tried changing web.xml file in web-inf directory still it is not taking. And one more thing I tried changing [servlet-webdir=/Fortag] in global-web-application.xml still I could not. Please help me out. Naveen
Remote EJB call with declarative security
Hello Orion-Interest, I have a full J2EE application and I want to call a remote ejb in another orion with the same application. I use J2EE standard declarative security (by role-mapping) in the EJBs. I dont have a client-application.xml, I have a war (with web.xml with ejb/refs) and a jar (with ejb-jar.xml with security). I try this in a servlet: env.put(Context.SECURITY_PRINCIPAL, beto); env.put(Context.SECURITY_CREDENTIALS, beto); env.put(java.naming.provider.url, ormi://localhost:23791/myapp); env.put(java.naming.factory.initial, com.evermind.server.rmi.RMIInitialContextFactory); env.put(dedicated.connection ,true); Context context = new InitialContext (env); But I reach this Exception java.lang.SecurityException: Invalid username/password for myapp (beto) at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._mu(Unknown Source) at com.evermind._cd._np(Unknown Source) at com.evermind._ce._np(Unknown Source) at com.evermind.server.rmi.RMIContext.lookup(Unknown Source) at javax.naming.InitialContext.lookup(InitialContext.java:350) at com.tbbn.export.srvSender.callRemote(srvSender.java:538) What's wrong? Thanks. -- Best regards, Alberto mailto:[EMAIL PROTECTED]
RE: Synchronized session bean?
Simply put if there's $5 left in the bank, you wouldn't want to have a user withdraw $5 with two different web browsers if they hit submit at the same time... so we kinda want it to be like there's only one teller window, and the servlets have to wait their turn. A poster already mentioned that simplistic solutions might not work in a clustered environment. I agree that designs that work due to timing or happen stance that may not remain constant are weak designs bound to have problems in deployment. This problem is the the classic stale update scenario. Multiple clients show $5 available to with draw. They all hit submit at once. How to guard against an over draft in a robust and repeatable in all scenarios way?? The most offered solution that I've heard and I've implemented uses optimistic concurrancy guarded with a row version number; - add a version number or modification date to your data base tables. I use a sequence number that trigger auto-increaments on update. - Your Model class (represents a data base table row) returned by DAO's and Entities include the sequence number. - Your presentation tier has a reference of the model (including the row version number) and all display $5 and internally held in the session is an instance of the Model used to generate the dynamic data by your View (MVC) component. - All users hit submit. - The Controller (MVC) processing this event fetches the Model from the session and calls the setter to modify withdraw ammount, passes this Model to the Business Deligate to access your transactional layer (mediated by a Session bean calling Entities). - The Model instance is serialized and passed as an argument to the layers of business components down to the Entity responsible for updating the AccountBalance table row for this account. - I used BMP and DAO objects to package the SQL logic. My DAO fetches the sequence number from the Model and account new balance from the model and builds the SQL prepared statement: UPDATE account set balance = ? where column_version_num = ? ; I call stment.setString (1, model.getNewBalance()); stment.setString (2, model.getVersionNumber()); If I get a SQLException on this update, then I know that someone else beat me to the $5. The key concept is the WHERE clause will only update the row IFF the sequence number has not been changed by someone else (meaning I had stale data). This will work in clustered environments at all times and does not depend on synchronized business delegate methods or any other design that is likely to be defeated by appserver servlet or object pooling or use of multiple VMs to host your application. Good luck, curt
Re: Synchronized session bean?
** Okay guys, I've updated this email with a decent example I hope ** Access to each session bean instance is serialized, but the spec doesn't specifically allow you to say there may only be one instance of a particular session bean class. ** so in otherwords, pretty much it achieves the effect I wanted with little effort... that's kinda nice... and it does this no matter what isolation/transaction level I request or would you recommend a few settings? Access to entity beans is also serialized and you can be certain that, in a a given app server instance (neglecting clustering issues), there's only one instance of a particular entity bean class + primary key. okay, so if I have two servlets, if I change the value of say foo of an entity, the other servlet upon say reading the value foo will see the new value automagically? Even if I don't do another finder call? It sounds to me like your talking about something much more like an entity. You can still get the guarantee you're looking for if you access the entity through a session bean, but the guarantee comes from the properties of the entity bean, not the session bean. Well I thought of using the session bean because I'm kinda trying to perform an action that has three steps: 1) check balance 2) deduct from account 3) credit new account But the problem comes not from making sure there's only one copy, but the (I think you call it) a race condition. Say $5 in bank account A, and we want to pay account B $4 and account C $3. Servlet 1: Task: Pay Account B $4 from Account A Servlet 2: Task: Pay Account C $3 from Account A Servlet 1: 1) Check account balance Yup $5 is more than $4 Servlet 2: 1) Check account balance Yup $5 is more than 3 Servlet 1: 2) Deduct $4 from Acct A Servlet 2: 2) Deduct $3 from Account A (must be okay since the check was okay in step 1) Servlet 1: 3) Credit Acct B $4 Servlet 2: 3) Credit Acct C $3 End result, balance on Acct A is -$2 even though we checked to make sure the entity had the correct balance. Yes the ending balance is correct too! But the end result is _undesirable_ since we should have prevented Servlet 2 from completing execution and throw an exception. So I hope to make the task Synchronized such that Servlet 2 is Blocked until Servlet 1's transfer task is complete such that the following is observed Servlet 1: Task: $4 from A to B Servlet 2: Task: $3 From A to C Servlet 1: Call Session Bean to Xfer funds stuff happens 1) ... ok Servlet 2: Call Session Bean to Xfer Funds 1) ... can't check yet, the Session bean is busy with session 1's request -- Blocked -- Servlet 1: .. more stuff happens... 2) ... deduct 3) ... deposit -- Finish -- Servlet 2: -- Unblocked -- 1) .. continue... check... too little money ** Throw Exception -- Finish -- So yes in both cases the Entity reacts as programmed, but it's the Session Bean I hope to change the behavior of. Is the desired behavior the default way of execution or do I have to do something special? Does that help any? yes it does, and don't get me wrong, I trust what you're saying, but I just ask a little more to make sure I understand all the little unsaid details ;) Thanks again! Jeff smime.p7s Description: S/MIME Cryptographic Signature
Re: Problems with CMP/MySQL
I've just (10 minutes ago) been through this. You need to set type-mapping type=boolean name=char(1)/. The MySQL online documentation says that bit and bool gets converted to char(1), but in reality they where set to tinyint(1), which Orion for some reason could not use. The above solution worked for me. Regards /Marcus Roozbeh Ghaffari wrote: Dear Michael, I have set the schema attribute of my datasource to mysql.xml (which I have written myself). In this file I can only set datatype mappings. I can't tell Orion what are the literals for True or False. tnx, Roozbeh/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Michael Simons Sent: Monday, October 01, 2001 11:14 AM To: Orion-Interest Subject: Re: Problems with CMP/MySQL Roozbeh Ghaffari wrote: Hi All, We use Orion CMP features with MySQL. We had problems with boolean and char fields. I used P6Spy (www.provision6.com http://www.provision6.com) to see SQL commands generated by Orion. Orion says: update table_name set boolean_field = 'true' but MySQL expects update table_name set boolean_field = '1' How can I ask Orion to generate the expected SQL? But in case of character field we have a bigger problem. I try to set a character field to 'F' or 'M' Orion says: update table_name set char_field = 0 !!! I don't understand what is happening! Thank you in advance, Roozbeh/ Sounds like You're missing $ORION_HOME/config/database-schemas/mysql.xml michael -- Marcus Ahnve email: [EMAIL PROTECTED] Lecando AB Office: +46-(0)8-634 94 18 Sweden Mobile: +46-(0)70-462 19 18 www.lecando.comICQ#: 4564879
Orion on Linux, Follow-up Question
My previous problem, starting Orion on linux, was due to the fact that I was calling upon the wrong JVM (even though I thought I had my path set correctly). That is resolved. Now I have another problem that seems more linux-related than Orion-related, but perhaps some of you know the solution. I have Orion running on linux, and from that machine I can access Orion-served pages. But I cannot do so from outside that machine. What's more, I am unable to run it on a user account. For now, I'm running under root. But like I said, I cannot connect to it from another machine. Upon doing some investigating, I have discoverd that when I try to connect from another machine, Orion is sending the HTTP headers only and then freezes without sending anything else. The page never loads, it just hangs indefinitely. I strongly suspect this has something to do with linux and not Orion. I cannot run Orion on a user account because it tells me I don't have permission to run an HTTP server. I don't get that message as root, but I wonder if there is some linux mechanism at work blocking my attempts to transmit data via HTTP. Your help in resolving this issue is greatly appreciated. -James _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Error Accessing an EJB through a Bean
We got it to work, thanks to the help of Simon Knott and Lachezar Dobrev. The reason was that the class file of the EJB was in multiple archive files. Simon also added a - in my opinion - good explanation why it didn't work to his reply. I will post here now with his permission, as he replied directly to me. Simon wrote: If this is the case [having the class in multiple archives], then what is likely to be happening is the following: 1) JSP class loader loads the EJB class into memory, from the WAR file. 2) JSP does a lookup for the EJB object. 3) EJB container class loader loads the EJB class into memory, from the JAR file. 4) EJB container returns its loaded class to the JSP 5) Class cast exception is thrown. Now the key point here is that different class loaders are used for both the JSP and the EJB container. When one class is loaded by two different class loaders, they are essentially different classes, with different class signatures. What happens with the class loader is that it takes the quickest route to loading a class - in the case of the JSP it will get it from the WAR, in the case of the EJB container it will get it from the JAR. What you really need to do is to create one archive, which is then placed in either the webapp/lib directory or the orion/lib directory, and exclude the EJB classes from the WAR and JAR files. This means that the classes in this one central JAR file will only be loaded by one class loader, removing the problem. This does not occur on the standalone client, because it uses only the system class loader, no others. Peter -Original Message- From: Lachezar Dobrev [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 11. Oktober 2001 12:37 To: Orion-Interest Subject: Re: Error Accessing an EJB through a Bean Hello. INLINE. We created a Bean to access an EJB from JSPs. First we tested the Bean from a Java Client and everything worked fine. Then we copied the Bean to the Orion server and tried to acces the EJB by using a JSP that instanciates the Bean that accesses the EJB. But we can not get it to work. The test with the Java client still works properly. But using the Bean from JSP always creates a ClassCastException. Here's the sniplet from the Bean where the lookup is performed. private static GUIServiceSBHome getHome(){ GUIServiceSBHome toReturn = null; try { This part with the Hashtable is not correct. You should avoid it. Better create a jndi.properties file in the root directory of your JAR, or the root rirectory of your classes. then just use new InitialContext() which will get the required properties from the jndi.properties file. Hashtable env = new Hashtable(); //ToDO if this bean runs inside a container this Env property will not be //necessary env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.SECURITY_PRINCIPAL, admin); env.put(Context.SECURITY_CREDENTIALS, xyz); env.put(Context.PROVIDER_URL, ormi://164.139.33.191:23791/bizDataNew); Let's see. // Replace EJB ModuleName below with the EJB module name identified // in your deployment profile As said... Especialy in a web-bean use new InitialContext() Context ctx = new InitialContext(env); Object ref = ctx.lookup(GUIServiceSB); logger.debug(Got an Object.. Class = + ref.getClass()); toReturn = (GUIServiceSBHome)PortableRemoteObject.narrow(ref, GUIServiceSBHome.class); logger.debug(Lookup5); } catch(Throwable ex){ logger.error( Unable to perform lookup for GUIServiceBean Home interface\nException = + ex.toString() ); } return toReturn; } The logger.debug statements create the following output. From the Client: de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class __Proxy0 de.mgi.frontend.GUIServiceProxyBean: Lookup5 On the Server (Bean used by JSP): de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class GUIServiceSBHome_StatelessSessionHomeWrapper215 de.mgi.frontend.GUIServiceProxyBean: Unable to perform lookup for GUIServiceBean Home interface Exception = java.lang.ClassCastException: GUIServiceSBHome_StatelessSessionHomeWrapper215 was not an instance of interface de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome, the interface it implements is de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome Next to the relevant question why does the Bean get an exception when it is executed on the server, there are also two more questions that I have when I look at the ouput. 1. Why is the return value of ref.getClass() different? The client and the JSP are accessing the same EJB on the same Orion server. 2. Why does it says the retrieved object is not an instance of the interface ...GUIServiceSBHome but an instance of
WebLogic To Orion
We have migrated a current production application from Weblogic to Orion in antest to come up with an alternative platform and have come across some issues. Most of the issues we have been able to resolve except for one involving ssl and I.E. Whenwe bring our application up inI.E. and httpsOrion invalidates the session within a minute.Our application security relies on certain objects within the session for enforcement which results in the user being kicked out of the application. We are evaluating V1.3.8., has this issue been resolved, is there a resolution or workaround? Thanks Greg Flores
RE: Orion on Linux, Follow-up Question
Hi Jimbo, You can find some responses here http://www.orionsupport.com/articles/unixprocess.html Luciano -Original Message- From: Jimbo Jones [mailto:[EMAIL PROTECTED]] Sent: giovedì 11 ottobre 2001 15.34 To: Orion-Interest Subject: Orion on Linux, Follow-up Question My previous problem, starting Orion on linux, was due to the fact that I was calling upon the wrong JVM (even though I thought I had my path set correctly). That is resolved. Now I have another problem that seems more linux-related than Orion-related, but perhaps some of you know the solution. I have Orion running on linux, and from that machine I can access Orion-served pages. But I cannot do so from outside that machine. What's more, I am unable to run it on a user account. For now, I'm running under root. But like I said, I cannot connect to it from another machine. Upon doing some investigating, I have discoverd that when I try to connect from another machine, Orion is sending the HTTP headers only and then freezes without sending anything else. The page never loads, it just hangs indefinitely. I strongly suspect this has something to do with linux and not Orion. I cannot run Orion on a user account because it tells me I don't have permission to run an HTTP server. I don't get that message as root, but I wonder if there is some linux mechanism at work blocking my attempts to transmit data via HTTP. Your help in resolving this issue is greatly appreciated. -James _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
call-timeout value
Hi all, from orionserver documentation I read: orion-ejb-jar enterprise-beans session-deployment ... call-timeout - The time (long millis in hex) to wait for an EJB if it is busy (before throwing a RemoteException, treating it as a deadlock). 0 equals forever and is the deafault. but, if I encode the value in hex the server (orion 1.5.2) complaint about a numeric value is required. Please, can someone show me an example value for this parameter? thank in advance, Daniele Arduini
Problems with orion and db2 on linux
Hi, I'm trying to get the news-example that comes with orion to work on a linux machine using IBM DB2 (v7.1, Fixpack 4) as a data-source. Deploying auto-creating tables work just fine, but invoking the application in a brwoser with http://myhost:8080/news/; results in following exception: com.evermind[Orion/1.5.2 (build 10460)].server.rmi.OrionRemoteException: Database error: [IBM][CLI Driver][DB2/LINUX] SQL0418N A statement contains a use of a parameter marker that is not valid. SQLSTATE=42610 at NewsItemHome_EntityHomeWrapper4.findByParent(NewsItemHome_EntityHomeWrapper4.java:1626) at com.evermind[Orion/1.5.2 (build 10460)].ejb.NewsSessionEJB.getChildren(NewsSessionEJB.java:44) at NewsSession_StatefulSessionBeanWrapper1.getChildren(NewsSession_StatefulSessionBeanWrapper1.java:66) at /news.jsp._jspService(/news.jsp.java:104) (JSP page line 25) at com.orionserver[Orion/1.5.2 (build 10460)].http.OrionHttpJspPage.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)].server.http.JSPServlet.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source) Nested exception is:COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL0418N A statement contains a use of a parameter marker that is not valid. SQLSTATE=42610 at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:269) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:206) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:457) at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement.java:1369) at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeQuery(DB2PreparedStatement.java:880) at com.evermind[Orion/1.5.2 (build 10460)]._lm.executeQuery(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._lm.executeQuery(Unknown Source) at NewsItemHome_EntityHomeWrapper4.findByParent(NewsItemHome_EntityHomeWrapper4.java:1474) at com.evermind[Orion/1.5.2 (build 10460)].ejb.NewsSessionEJB.getChildren(NewsSessionEJB.java:44) at NewsSession_StatefulSessionBeanWrapper1.getChildren(NewsSession_StatefulSessionBeanWrapper1.java:66) at /news.jsp._jspService(/news.jsp.java:104) (JSP page line 25) at com.orionserver[Orion/1.5.2 (build 10460)].http.OrionHttpJspPage.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)].server.http.JSPServlet.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source) I have seen the sql-statement that is executed, and it contains a ?-symbol. Obviously this is a variable in a prepared statement or something, wich is not correctly replaced by the IBM JDBC-Driver. (Thats what I assume) Has anyone experience in setting up orion and DB2? Are there other JDBC-driver than IBM's? Thanks, Sven Lüdtke
FW: How to get the RoleManager (resend)
-Original Message- From: David Potts Sent: 11 October 2001 10:02 To: 'Orion-Interest' Subject: RE: How to get the RoleManager inline -Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] That won't help - I think shared sessions only work between two WARs in the same app. We could probably live with merging the two apps into WARs in the same EAR file. However, we've just tried that with a test app and with the shared flag set to be true in both of the web-app tags in default-web-site.xml (and also in default-web-app for good measure!) and we have the same problem: the second app again goes to the login form. Any ideas of what config we might have go wrong? Juan Lorandi in this thread mentioned putting shared=true in orion-web.xml but we can't find that in the docs. What tag attribute do we apply this to? Juan also mentions the same realm name, but this is just for BASIC authentication I believe, and we unfortunately have to use FORM based authentication. Is that right? The only thing I can suggest is using some sort of cookie based system where you track via session ID who is logged in (stored in a hashmap or something), then from each app lookup that hashmap (via JNDI) and log in the user programmatically before they are shown the login page. Very fugly though. SSO is one of J2EE's problems. So the flow of that solution would look like: (1) User logs into app1 (2) Store user info in JNDI somewhere that app2 can see it (3) The user clicks a link that would take them into app2 (4) Intercept the login-request and use the stored info to log the user into app2 The problem with this flow is that we don't know how to intercept at step (4) *before* the user is shown the login form by the container. Is this possible? If not, our idea similar to this would be: (1) User logs into app1 (2) Convince the app2 security (RoleManager?) that the user is logged in using the values passed to app1 (3) The user clicks a link that would take them into app2 and is already logged in Hence the original question in this thread: how from app1 do we get hold of app2's RoleManager? Thanks for all the help. Dave.
RE: WebLogic To Orion
Greg, In your *web-site.xml files, you will need to set shared=true in your default-web-app and web-app tags. The bug you have encountered is an IE bug. Do not evaluate version 1.3.8, its too old. use version 1.5.2 Regards, the elephantwalker -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Greg FloresSent: Thursday, October 11, 2001 7:19 AMTo: Orion-InterestSubject: WebLogic To Orion We have migrated a current production application from Weblogic to Orion in antest to come up with an alternative platform and have come across some issues. Most of the issues we have been able to resolve except for one involving ssl and I.E. Whenwe bring our application up inI.E. and httpsOrion invalidates the session within a minute.Our application security relies on certain objects within the session for enforcement which results in the user being kicked out of the application. We are evaluating V1.3.8., has this issue been resolved, is there a resolution or workaround? Thanks Greg Flores
Re: Synchronized session bean?
Ah... this is very interesting! Much thanks, and if you know of a good book that might address many of these problems with other alternate solutions, please, do let me know. Jeff UPDATE account set balance = ? where column_version_num = ? ; I call stment.setString (1, model.getNewBalance()); stment.setString (2, model.getVersionNumber()); If I get a SQLException on this update, then I know that someone else beat me to the $5. The key concept is the WHERE clause will only update the row IFF the sequence number has not been changed by someone else (meaning I had stale data). smime.p7s Description: S/MIME Cryptographic Signature
Re: WebLogic To Orion
Quoting Greg Flores [EMAIL PROTECTED]: We have migrated a current production application from Weblogic to Orion in an test to come up with an alternative platform and have come across some issues. Most of the issues we have been able to resolve except for one involving ssl and I.E. When we bring our application up in I.E. and https Orion invalidates the session within a minute. Our application security relies on certain objects within the session for enforcement which results in the user being kicked out of the application. We are evaluating V1.3.8., has this issue been resolved, is there a resolution or workaround? Have you done any performance benchmarks yet? If so, who wins? Thanks Greg Flores Ed Brown _ This mail sent via toadmail.com, web e-mail @ ToadNet - want to go fast? http://www.toadmail.com
problem using primary key class with orion
I am having some difficulty getting orion to use my primary key class during deployment. I have an EJB AnyPerson with which I use a primary key class AnyPersonKey that has a public java.lang.String primaryKey field. During deployment, I get a compilation error that looks like the CMP isn't being generated properly. The orion-ejb-jar.xml file looks fine, as does the ejb-jar file. I get this error on deploy: Auto-deploying kwu-ejb.jar (Classes were updated)... Error compiling C:\orion\applications\kwu-phase-2\kwu-ejb.jar: Incompatible type for prim-key-class and type of the specified primkey-field: Cannot convert from class com.kw.kwu.model.AnyPerson.AnyPersonKey to class java.lang.String It doesn't seem to recognize that I'm using a primary key class at all, even though it is mapped in the orion-ejb-jar.xml file. Has anyone got a working example of this? I'm tired of tweaking the orion-ejb-jar to try and get it working. Here's a snippet from my orion-ejb-jar.xml: enterprise-beans entity-deployment name=AnyPerson location=AnyPerson wrapper=AnyPersonHome_EntityHomeWrapper45 max-tx-retries=3 table=AnyPerson data-source=jdbc/SQLServerDSCore primkey-mapping cmp-field-mapping fields cmp-field-mapping name=primaryKey persistence-name=primaryKey / /fields /cmp-field-mapping /primkey-mapping cmp-field-mapping name=FirstName persistence-name=FirstName / cmp-field-mapping name=LastName persistence-name=LastName / cmp-field-mapping name=Salutation persistence-name=Salutation / cmp-field-mapping name=Username persistence-name=Username / cmp-field-mapping name=Password persistence-name=Password / cmp-field-mapping name=Address1 persistence-name=Address1 / cmp-field-mapping name=Address2 persistence-name=Address2 / cmp-field-mapping name=City persistence-name=City / cmp-field-mapping name=StateProvId persistence-name=StateProvId / cmp-field-mapping name=PostalCd persistence-name=PostalCd / cmp-field-mapping name=Country persistence-name=Country / cmp-field-mapping name=HomePhone persistence-name=HomePhone / cmp-field-mapping name=Fax persistence-name=Fax / cmp-field-mapping name=Email persistence-name=Email / cmp-field-mapping name=LastModTime persistence-name=LastModTime / cmp-field-mapping name=ModifiedBy persistence-name=ModifiedBy / and the matching ejb-jar.xml file: ejb-jar descriptionGenerated deployment descriptors/description enterprise-beans entity ejb-nameAnyPerson/ejb-name homecom.kw.kwu.model.AnyPerson.AnyPersonHome/home remotecom.kw.kwu.model.AnyPerson.AnyPerson/remote ejb-classcom.kw.kwu.model.AnyPerson.AnyPersonBean/ejb-class persistence-typeContainer/persistence-type prim-key-classcom.kw.kwu.model.AnyPerson.AnyPersonKey/prim-key-class reentrantfalse/reentrant cmp-fieldfield-nameprimaryKey/field-name cmp-fieldfield-nameFirstName/field-name/cmp-field cmp-fieldfield-nameLastName/field-name/cmp-field cmp-fieldfield-nameSalutation/field-name/cmp-field cmp-fieldfield-nameUsername/field-name/cmp-field cmp-fieldfield-namePassword/field-name/cmp-field cmp-fieldfield-nameAddress1/field-name/cmp-field cmp-fieldfield-nameAddress2/field-name/cmp-field cmp-fieldfield-nameCity/field-name/cmp-field cmp-fieldfield-nameStateProvId/field-name/cmp-field cmp-fieldfield-namePostalCd/field-name/cmp-field cmp-fieldfield-nameCountry/field-name/cmp-field cmp-fieldfield-nameHomePhone/field-name/cmp-field cmp-fieldfield-nameFax/field-name/cmp-field cmp-fieldfield-nameEmail/field-name/cmp-field cmp-fieldfield-nameLastModTime/field-name/cmp-field cmp-fieldfield-nameModifiedBy/field-name/cmp-field primkey-fieldprimaryKey/primkey-field /entity Thanks! Jack Miller
RE: WebLogic To Orion
Yes we do. The problem seems to be associated with I.E. When we use Netscape, we encounterno issues. Greg Flores -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]Sent: Thursday, October 11, 2001 12:58 PMTo: Orion-InterestSubject: Re: WebLogic To OrionDo you have a server certificate for or Orion server? Jonathan BrickerLilly Research LabsJava ATG Greg Flores [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 10/11/01 09:18 AM Please respond to Orion-Interest To: Orion-Interest [EMAIL PROTECTED] cc: Subject:WebLogic To Orion We have migrated a current production application from Weblogic to Orion in an test to come up with an alternative platform and have come across some issues. Most of the issues we have been able to resolve except for one involving ssl and I.E. When we bring our application up in I.E. and https Orion invalidates the session within a minute. Our application security relies on certain objects within the session for enforcement which results in the user being kicked out of the application. We are evaluating V1.3.8., has this issue been resolved, is there a resolution or workaround? Thanks Greg Flores
Re: WebLogic To Orion
Greg, This has been covered in previous postings. Here's a quote from one of them (start quote) This is a configuration problem... at least it was in earlier versions. You must make sure to include the attribute 'secure=true' in the web-site tag of your secure-web-site.xml file. Also, make sure that the attribute 'shared=true' appears in each web-app tag in this same file. This cleared up the problem for me. Cheers, Derek Akers Senior Software Architect Eldan Software Limited (416) 341-0070 www.eldan.com - (end quote) Nick At 09:18 AM 10/11/01 -0500, you wrote: We have migrated a current production application from Weblogic to Orion in an test to come up with an alternative platform and have come across some issues. Most of the issues we have been able to resolve except for one involving ssl and I.E. When we bring our application up in I.E. and https Orion invalidates the session within a minute. Our application security relies on certain objects within the session for enforcement which results in the user being kicked out of the application. We are evaluating V1.3.8., has this issue been resolved, is there a resolution or workaround? Thanks Greg Flores
Syntax of distributable/ tag?
What is the correct syntax for the distributable / tag, I have placed it in out web.xml file every way I can think of and I keep getting errors. Thanks Steve
RE: Syntax of distributable/ tag?
distributable / should be placed after the display name. What errors are you getting? All session context variables need to be serielizable ... is this the error you are getting? regards, the elephantwalker www.elephantwalker.com -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Steve BestSent: Thursday, October 11, 2001 4:49 PMTo: Orion-InterestSubject: Syntax of distributable/ tag? What is the correct syntax for the distributable / tag, I have placed it in out web.xml file every way I can think of and I keep getting errors. Thanks Steve
RE: problem using primary key class with orion
And if you are using EJB 2.0 style CMP, hopefully, the primaryKey is defined as: public abstract String getPrimaryKey(); public abstract void setPrimaryKey(String key); or as a public String primaryKey; in a 1.0 style CMP. Methods. Right? -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jack C. Miller Sent: Thursday, October 11, 2001 2:32 PM To: Orion-Interest Subject: problem using primary key class with orion I am having some difficulty getting orion to use my primary key class during deployment. I have an EJB AnyPerson with which I use a primary key class AnyPersonKey that has a public java.lang.String primaryKey field. During deployment, I get a compilation error that looks like the CMP isn't being generated properly. The orion-ejb-jar.xml file looks fine, as does the ejb-jar file. I get this error on deploy: Auto-deploying kwu-ejb.jar (Classes were updated)... Error compiling C:\orion\applications\kwu-phase-2\kwu-ejb.jar: Incompatible type for prim-key-class and type of the specified primkey-field: Cannot convert from class com.kw.kwu.model.AnyPerson.AnyPersonKey to class java.lang.String It doesn't seem to recognize that I'm using a primary key class at all, even though it is mapped in the orion-ejb-jar.xml file. Has anyone got a working example of this? I'm tired of tweaking the orion-ejb-jar to try and get it working. Here's a snippet from my orion-ejb-jar.xml: enterprise-beans entity-deployment name=AnyPerson location=AnyPerson wrapper=AnyPersonHome_EntityHomeWrapper45 max-tx-retries=3 table=AnyPerson data-source=jdbc/SQLServerDSCore primkey-mapping cmp-field-mapping fields cmp-field-mapping name=primaryKey persistence-name=primaryKey / /fields /cmp-field-mapping /primkey-mapping cmp-field-mapping name=FirstName persistence-name=FirstName / cmp-field-mapping name=LastName persistence-name=LastName / cmp-field-mapping name=Salutation persistence-name=Salutation / cmp-field-mapping name=Username persistence-name=Username / cmp-field-mapping name=Password persistence-name=Password / cmp-field-mapping name=Address1 persistence-name=Address1 / cmp-field-mapping name=Address2 persistence-name=Address2 / cmp-field-mapping name=City persistence-name=City / cmp-field-mapping name=StateProvId persistence-name=StateProvId / cmp-field-mapping name=PostalCd persistence-name=PostalCd / cmp-field-mapping name=Country persistence-name=Country / cmp-field-mapping name=HomePhone persistence-name=HomePhone / cmp-field-mapping name=Fax persistence-name=Fax / cmp-field-mapping name=Email persistence-name=Email / cmp-field-mapping name=LastModTime persistence-name=LastModTime / cmp-field-mapping name=ModifiedBy persistence-name=ModifiedBy / and the matching ejb-jar.xml file: ejb-jar descriptionGenerated deployment descriptors/description enterprise-beans entity ejb-nameAnyPerson/ejb-name homecom.kw.kwu.model.AnyPerson.AnyPersonHome/home remotecom.kw.kwu.model.AnyPerson.AnyPerson/remote ejb-classcom.kw.kwu.model.AnyPerson.AnyPersonBean/ejb-class persistence-typeContainer/persistence-type prim-key-classcom.kw.kwu.model.AnyPerson.AnyPersonKey/prim-key-class reentrantfalse/reentrant cmp-fieldfield-nameprimaryKey/field-name cmp-fieldfield-nameFirstName/field-name/cmp-field cmp-fieldfield-nameLastName/field-name/cmp-field cmp-fieldfield-nameSalutation/field-name/cmp-field cmp-fieldfield-nameUsername/field-name/cmp-field cmp-fieldfield-namePassword/field-name/cmp-field cmp-fieldfield-nameAddress1/field-name/cmp-field cmp-fieldfield-nameAddress2/field-name/cmp-field cmp-fieldfield-nameCity/field-name/cmp-field cmp-fieldfield-nameStateProvId/field-name/cmp-field cmp-fieldfield-namePostalCd/field-name/cmp-field cmp-fieldfield-nameCountry/field-name/cmp-field cmp-fieldfield-nameHomePhone/field-name/cmp-field cmp-fieldfield-nameFax/field-name/cmp-field cmp-fieldfield-nameEmail/field-name/cmp-field cmp-fieldfield-nameLastModTime/field-name/cmp-field cmp-fieldfield-nameModifiedBy/field-name/cmp-field primkey-fieldprimaryKey/primkey-field /entity Thanks! Jack Miller
Re: WebLogic To Orion
Why Orion? Because from day-to-day, no matter how many CPUs, no matter what the BEA Sales Executive's outstanding Mercedes lease payment, no matter what...Orion is USD$1500 / physical server license for deployed applications and every developer seat is free...because IT management need never again sweat out BEA 'Assistance' shakedowns and audits... http://www.orionserver.com/purchase.html compared to no stated pricing (it averaged USD$35K/CPU last year as an average quoted price at 7 of my clients) on the BEA website with developer seats requiring additional license and support fees... In addition, to quote David Jones' Review of the freeware JBoss in the serverside.com (link: http://www.theserverside.com/reviews/thread.jsp?thread_id=6215 ) Application development, which is what people do with app servers, is a very technical thing. It requires experience and knowledge. Support services do not help in any way with this. If you want this, you pay for a class with BEA or JBoss. BEA has a newsgroup to help out, so does JBoss. If you want more you can talk to someone at BEA, that's more difficult at JBoss. But do you want to know what they will tell you at BEA if you ask a tough question? The same thing that JBoss tells you without getting you on the phone: pay us consulting fees and we will help you fix it. By the way, that's what Orion and its partners will tell you, too...for a lot less than the BEAst, and with a lot less stress on your IT and corporate management. Michael J. Cannon - Original Message - From: muthukumarasamy rajamanickam [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, October 11, 2001 8:55 PM Subject: Re: WebLogic To Orion Why are you going to Orion from Weblogic? We are movin gto Weblogic from Orion hemmm Diffferent world? --- [EMAIL PROTECTED] wrote: Do you have a server certificate for or Orion server? Jonathan Bricker Lilly Research Labs Java ATG Greg Flores [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 10/11/01 09:18 AM Please respond to Orion-Interest To: Orion-Interest [EMAIL PROTECTED] cc: Subject:WebLogic To Orion We have migrated a current production application from Weblogic to Orion in an test to come up with an alternative platform and have come across some issues. Most of the issues we have been able to resolve except for one involving ssl and I.E. When we bring our application up in I.E. and https Orion invalidates the session within a minute. Our application security relies on certain objects within the session for enforcement which results in the user being kicked out of the application. We are evaluating V1.3.8., has this issue been resolved, is there a resolution or workaround? Thanks Greg Flores = Regards Muthu Rajamanickam e-mail:[EMAIL PROTECTED] Phone:832-567-7859 __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com