Re: SQL Server JDBC driver from Microsoft
www.inetsoftware.de fast, stable, good support. we've been using it for over a year now and it works fine. - Original Message - From: "SAURUGGER,PETER (A-PaloAlto,ex2)" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, March 16, 2002 5:09 AM Subject: 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: Memory leak with linux jdk1.4 - orion 1.5.4
Robert, I've monitored orion using jprobe when orion is started with the -restart command. It loaded another copy of the application classes in a new classloader, and eventually ran out of memory. I never pursued this as i had higher priority things to work on at the time. Not sure if the original classloader was eventually cleaned up, or whether there is some config setting that causes Orion to work differently. Greg. - Original Message - From: "Robert Krüger" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Sunday, March 10, 2002 9:06 PM Subject: Memory leak with linux jdk1.4 - orion 1.5.4 > > hi, > > I'm experiencing serious problems with a memory leak that causes orion to > consume more memory with each application restart/redeployment with the > combination jdk1.4 (linux) - orion 1.5.4. with jdk 1.3 memory consumption > remains constant after a while. even calling System.gc() explicitly doesn't > help. has anyone else seen such behaviour? based on these observations it > appears more likely to be a VM bug rather than an orion problem. is this a > known problem? has anyone tried to narrow it down by using a profiling tool? > > tia > > robert > >
Re: Local interfaces difference ???
and can anyone shed some light on why this has even been put in the J2EE spec. Visibroker for Java automatically detected if the client was local and then handed out a client stub that did not do marshalling, i.e. performed an in-process local java method call. I would have thought that the whole concept of Local references was just an optimisation that a vendor provided based on common sense. Why is it in the spec? Greg. - Original Message - From: "Eddie Post" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, March 07, 2002 4:54 AM Subject: Local interfaces difference ??? > Hellu, > > Can someone tell me what the performance boost is when you change your > remote and home interfaces to local interfaces with Orion 1.5.4 ? > > I did this but I know that with Bea you could already indicate if your beans > and clients were located on the same machine such that it already had some > kind of local workaround. I was wandering how Orion did and does this ?? > > Eddie > > > _ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > >
Re: File Upload from an Application
you need to use 1. type="file" in the form within the browser. 2. get a ServletInputStream (?) from the request object in Orion and parse out the byte stream. do a search for ServletInputStream in google or something and you should find some examples. afaik, there is no simple method to call to extract an uploaded file from a request but parsing out the ServletInputStream data is not that hard. greg. - Original Message - From: Michael Maurer To: Orion-Interest Sent: Monday, March 04, 2002 5:38 PM Subject: File Upload from an Application Hi I am trying to upload a file from an application to the orion server, but could not find the right solution so far. Does anyone has a nice solution ? Michael
Re: Caching / Pooling of BMP Entity bean.
it's probably your code. BMP caching works no problem. your best bet is to post a code example of one of your entity beans. - Original Message - From: "Shah, Ritesh" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, January 17, 2002 8:02 AM Subject: Caching / Pooling of BMP Entity bean. > Hi, > I am getting a weird error. I am using oracle oc4j 1.0.2.2. >I am calling an entity bean from session bean. The error I get is when I > call an entity bean for the first time it gives me proper result then I > update the data and from next call onward it gives me the cached value that > it loaded for the first time call. It even doesn't give me stored value. I > try to trace it but I get the same error. From database it is retrieving > proper value while doing ejbFindbyPrimarykey but doesn't give proper value. > It never again call ejbload. That what I found by tracing it. > > Any help will be appreciated. > > Thanks > -Ritesh > >
Re: Simple question re caching/pooling of BMP Entity Beans
pooling definitely does work for BMP. couple of things i found that you might want to check off. 1. implement an isModified method public boolean isModified() { return false; } which orion will check to determine if ejbLoad needs to be called. we're using the value object pattern to the above works for us. you may want to make it more complicated depending on your requirements. 2.. return a Collection from your finder methods. returning an Enumeration seems to cause orion to not pool. 3. if you have defined your own primary key instead of using, say, Integer, it seems you need to implement equals() and hashCode(). if you can't get it working maybe post the code from one of your bean classes. good luck, greg. - Original Message - From: "Geoff Soutter" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, January 11, 2002 8:08 AM Subject: RE: Simple question re caching/pooling of BMP Entity Beans > Hi Sergey, > > Thanks for the reply. I didn't explain it very clearly did I? What I > meant was: > > "However, it appears that it goes to the database (i.e. calls _ejbLoad_ > in the Entity Bean's implementation) for every call to findByPrimaryKey, > regardless of whether it has previously read the instance with the > specified key before." > > Have you been able to get pooling of BMP entity beans working? > > Geoff > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] On Behalf Of > > Sergey G. Aslanov > > Sent: Thursday, 10 January, 2002 6:29 PM > > To: Orion-Interest > > Subject: Re: Simple question re caching/pooling of BMP Entity Beans > > > > > > Hi Geoff > > > > Loading of beans have these stages: > > 1. calling ejbFindBy... to get the primKeys of the entities; > > 2. checking if entities with such keys are already pooled; > > 3. for every key checking: if not pooled - call ejbLoad, else > > - get instance from pool; > > > > As you see, ejbFindBy... are called always independently of > > entity is pooled or not. > > > > Thursday, January 10, 2002, 2:01:37 AM, you wrote: > > > > GS> Hi there, > > > > GS> I'm teaching myself how to use Orion and I've got a > > simple question > > GS> about caching/pooling of BMP Entity Bean instances. > > > > GS> I've created a simple app which lets me read a BMP Entity Bean > > GS> through a Session Bean. I would expect that when I call > > GS> findByPrimaryKey on my Entity Bean's home interface, Orion caches > > GS> the instance it creates so that next time I call findByPrimaryKey > > GS> for the same key, it just returns the instance it already > > has rather > > GS> than creating a new one. However, it appears that it goes to the > > GS> database (i.e. calls ejbFindByPrimaryKey in the Entity Bean's > > GS> implementation) for every call to findByPrimaryKey, regardless of > > GS> whether it has previously read the instance with the > > specified key > > GS> before. > > > > GS> I checked the list archive and it appears that someone > > has reported > > GS> a similar problem a while back but there were no replies > > GS> > > (http://www.mail-archive.com/orion-interest@orionserver.com/ms > g17359 > GS> .htm > GS> l). > > GS> I also checked the documentation and for orion-ejb-jar.xml it states > > GS> that exclusive-write-access is true by default, and since I am not > GS> setting it I presume it's defaulting to true which should allow > GS> Orion to cache the entity beans. > > GS> So, can anyone shed any light on how whether/how I can get Orion to > GS> cache BMP entity beans? > > GS> Cheers > > GS> Geoff > > > -- > Sergey G. Aslanov, > CBOSS Group, > Web-technologies department > mailto:[EMAIL PROTECTED] > tel: +7 095 7555655 > > >
Re: RuntimeException in threads
if by user threads you mean a thread that you're manually starting (i.e. not a worker thead) then maybe put a try/catch block in the run method? public void run() { while(!stopped) { try { // do stuff } catch(Exception e) { // handle error } } } ...or have i missed the point completely? - Original Message - From: "Namor Taror" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, November 28, 2001 7:35 PM Subject: RuntimeException in threads > I've been trying to catch a runtime exception thrown by one of my user > threads, before the orion server gets it. One of the solutions I thought > would work was to create a ThreadGroup as a parent of the thread in question > and have it to catch the exception. It doesn't seem to work. Any ideas? > > Roman > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > >
Re: HttpSession creation
hi, see Kesav Kumar's answer 7:49pm to learn somerthing. - Original Message - From: Lachezar Dobrev To: Orion-Interest Sent: Thursday, November 22, 2001 6:15 PM Subject: Re: HttpSession creation Hello. Trying to stop a session from being created is not valid. Sessions are not user-dependant. Sessions are a handshake between a server and a client. You should have thought another way to do that. Maybe check if the user HAS authenticated. .getSession() and .getSession(boolean) methods are to get access to the session, not to create the session. Creation is left to the App server. What happens is, that when a client contacts your Server the session IS created. That's it. Forget the option to disable that. It has no sense. If you REALLY need to do that... Use "session.invalidate()" everytime you see, that the user has not logged. That way a session will be recreated every time the client connects. Lachezar. P.S. Sessions are good to store info in them. But user management should NOT be connected with it. hi, i'm trying to ensure that the only time a session is created is after a successful user login. is there any other way apart from HttpServletRequest.getSession( ), or HttpServletRequest.getSession( boolean create) that a HttpSession can be created? i've trawled through the J2EE API but haven't seen any other methods that might create a session -- was just wondering if there was some sort of side-effect way, say, if you redirect a request or pass a request through a filter chain or something??? thanks, greg.
HttpSession creation
hi, i'm trying to ensure that the only time a session is created is after a successful user login. is there any other way apart from HttpServletRequest.getSession( ), or HttpServletRequest.getSession( boolean create) that a HttpSession can be created? i've trawled through the J2EE API but haven't seen any other methods that might create a session -- was just wondering if there was some sort of side-effect way, say, if you redirect a request or pass a request through a filter chain or something??? thanks, greg.
Re: Most Urgent: How to find jndi lookup name for Transaction Manager?
InitialContext ic = new InitialContext(); UserTransaction ut = (javax.transaction.UserTransaction)ic.lookup("java:comp/UserTransaction"); - Original Message - From: "Ray Harrison" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, November 21, 2001 3:12 AM Subject: Re: Most Urgent: How to find jndi lookup name for Transaction Manager? > Check out the Orionserver FAQ: > How do I get a reference to the TransactionManager? > > > import javax.naming.*; > import javax.transaction.*; > ... > TransactionManager manager = (TransactionManager)new > InitialContext().lookup("java:comp/UserTransaction"); > > > Cheers > Ray > > > --- patrick patrick <[EMAIL PROTECTED]> wrote: > > Dear all, > > > > if any one know how to find the jndi lookup name > > for the Transaction Manager, please let me know.. > > > > Thanks > > patrick > > > > __ > > Do You Yahoo!? > > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. > > http://geocities.yahoo.com/ps/info1 > > > > > __ > Do You Yahoo!? > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. > http://geocities.yahoo.com/ps/info1 >
Fw: what the? ejbStore gets called last???
further to this last message, there's information on http://developer.java.sun.com/developer/technicalArticles/ebeans/sevenrules/ about the same issue, i.e. ejbStore being deferred. it seems to be rule number seven. again, how do you get around the problem where a subsequent load of data through a findBy... method is getting the old copy of data, because the container has cleverly decided to defer calling ejbStore??? greg - Original Message - From: Greg Matthews To: Orion-Interest Sent: Wednesday, October 24, 2001 10:11 AM Subject: what the? ejbStore gets called last???
what the? ejbStore gets called last???
dear all, having not used EntityBeans in my last projects, but stateless session beans only, i'm hoping someone has a good answer to my question. basically, it seems like ejbStore is being deferred to the end of the transaction. if i request a series of operations like this. 1. loadX 2. store (which changes X) 3. loadX then what really happens is 1. loadX 2. loadX <== this gets the old copy of X, not the new one since Orion deferred my call to ejbStore 3. store. this post below by someone indicates that jboss provided a flag so that the database access occurs in the order that your code executes -- as opposed to when the container determines it should run. does orion have an equivalent flag? (and yes, i've had a look through www.orionserver.com and couldn't find it). http://www.mail-archive.com/ejb-container-group2@objectweb.org/msg00011.html thanks, greg.
Re: Yup, SSL question
sorry if i'm off track here??, but last time i checked, orion couldn't cluster + SSL at the same time. i think it's orion bugzilla defect 525 from memory, since i spent some time investigating it. i think elephantwalker is a bit of an expert on this particular issue. you can cluster, and you can setup SSL, but just not at the same time. - Original Message - From: Steve Best To: Orion-Interest Sent: Friday, October 19, 2001 4:35 AM Subject: Re: Yup, SSL question Nevermind, I have found the keystore and have imported the certificate. I believe my problems now have to do with our clustering/load balancing configuration. We are currently using an Alteon Acedirector 3 for our load balancer. We are also using clustering to maintain sessions. I think the error I have been getting: "Error listening to SSLServerSocket: No available certificate corresponds to the SSL cipher suites which are enabled." is because our certificate is for our virtual IP, and not for our local machine, and therefore Orion is unable to load the certificate correctly because it isnt for the local host. The question is, how do I configure Orion to load a certificate for our virtual site? Here is my configuration, with some entries modified to protect the innocent: load-on-startup="false" /> I have tried setting the web-site host="[ALL]", but I get an error saying I cannot cluster with that configuration. Though I no longer get the SSLServerSocket error. Thanks for any help, Steve - Original Message - From: Steve Best To: Orion-Interest Sent: Wednesday, October 17, 2001 3:43 PM Subject: Yup, SSL question So, I do not have the original keystore file generated during the certificate request, but I have the original certificate request private key file, as well as the certificate file from Thawte. How do I get them both into a working keystore? Steve
Re: JSP Compilation Questions and More.
is this a speed issue? if so, use jikes. it's so fast that you don't need to precompile JSPs. - Original Message - From: "Lachezar Dobrev" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, October 13, 2001 1:50 AM Subject: JSP Compilation Questions and More. >Hallo all! > >Recently I've been playing around with JSP compilation in Orion. I saw a > couple of days ago a question about the out-of-the-server (stand-alone) > compilation of JSPs. Quite some job :( >I tried to find the compilator. Playing around I got some things. I don't > really remember what was the JSP that helped me, but I guess it is either > com.evermind._rj (and it's method _bb() ) or com.evermind._ah. Also the > com.evermind.JspPage has a _bb() method, but it doesn't help a lot. > >Question 1: Is there a way to pre-compile the JSPs? I also saw that > adding a parameter "jsp_precompile=true" to the request parameters will only > try to compile the jsp. That however is not what I was thinking about. > >Question(BUG) 2: I noticed the following: It depends how the JSPs are > compiled. If the Web-App is "development=true" it is compiled in one way > with matching the JSP lines, and if "development=false" the lines are often > mapped wrongly. Exa.: > > ALABALA.JSP: > > 1. > 2. > 3. Test for test > 4. > 5. > 6. > 7. > 8. <%= new String((String)null)%> > 9. > 10. > > Obviously there is a NullPointerException on line 8 (7 if counted from 0). > > development = true: > > 500 Internal Server Error > java.lang.NullPointerException > at java.lang.String.(String.java:193) > at /Alabala.jsp._jspService(/Alabala.jsp.java:24) (JSP page line 7) > 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) > .. > > > development = false: > > 500 Internal Server Error > java.lang.NullPointerException > at java.lang.String.(String.java:193) > at /Alabala.jsp._jspService(/Alabala.jsp.java:27) (JSP page line 2) > 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) > .. > > >Obviously both cases differ. Why? > >Lachezar. > > > >
Re: Session share problem.
i think there's a share="true" attribute that you have to put in the web-site.xml file ??? check out the doco in www.orionserver.com - Original Message - From: Jishan Li To: Orion-Interest Sent: Wednesday, September 05, 2001 7:42 PM Subject: Session share problem. Hi, I have session share problem between ssl site and non-ssl site. My ssl site name is secure.mysite.com and non-ssl site name is www.mysite.com. when I start my server, and visit www.mysite.com firstly, everything goes well. But when I visit secure.mysite.com firstly after I starting my orion server, and then back to www.mysite.com every request on www.mysite.com create a new session. So my user login, shopping cart won't work!!! Is there any one can help me? Thanks! Jishan Li.
Re: www.elephantwalker.com
EW, did you have to do anything special to get sessions to be replicated across the cluster? there have been several posts recently about people having trouble with this specifically. do you just have to make sure that all boxes in the cluster have the same cluster-island id or is something else required? thanks, greg/ - Original Message - From: "The elephantwalker" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, August 25, 2001 4:03 AM Subject: www.elephantwalker.com > Dear Group, > > 3. The enterprise application is a distributable forum application so that > if one server goes down, the other server will continue to serve up web > pages. The users will never know that their server has gone done, since the > session are shared across the cluster. This is unlike another well known
Re: Orion Clustering problems..
kevin, i've also been able to set up clustering but have not reproduced your error. i did notice that while i was investigating the various config settings, there was an entry in rmi.xml that i never used, but i could still cluster, i.e. load balancer redirected my request to one of the orion boxes, and i could kill a box, then login again, and my request would be sent to box2. i never did work out what this setting did. do you know what this does? does it maybe handle transmission of session data between boxes? remember, according to the docs you need boxes that are supposed to share session info to have the same cluster-island id. Tag that is defined if the application is to be clustered. Used to set up a local multicast cluster. A username and password used for the servers to intercommunicate also needs to be specified. host - The multicast host/ip to transmit and receive cluster data on. The default is 230.0.0.1. id - The id (number) of this cluster node to identify itself with in the cluster. The default is based on local machine IP. password - The password configured for cluster access. Needs to match that of the other nodes in the cluster. port - The port to transmit and receive cluster data on. The default is 9127. username - The username configured for cluster access. Needs to match that of the other nodes in the cluster. i'd be very interested if you're able to get session clustering/failover working. cheers, greg. - Original Message - From: "Duffey, Kevin" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, August 23, 2001 12:27 PM Subject: Orion Clustering problems.. > HI all, > > Hopefully this will make the list. > > I am working on a chapter for a book about scalability. I am also needing to > get our site ready for scaling. I am using Orion to test my web-app that > needs to be a demonstration of a scalable Servlet 2.2 web application. I > have a couple of questions to ask about session fail-over, and how to get > Orion to do this. > > I followed the cluster doc to the tee, and everything works fine except that > the SessionServlet example does NOT keep the count going when I shut down > the server that the first request to it created a session on. It starts over > on the count. So I assume either my config is somehow just not correct, or > that this is a bug with Orion. Here is what I have in my web-site.xml file: >
Re: Finding Default DataSource in My App
a starting point might be. import com.evermind.server.administration.*; javax.naming.Context ctx = new InitialContext(); ApplicationAdministrator admin = (ApplicationAdministrator)ctx.lookup("java:comp/Administrator"); this doesn't give you exactly what you want but you can get some orion specific stuff from this. check out the other stuff in the administration.* package. greg - Original Message - From: "Roozbeh Ghaffari" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 2:57 PM Subject: Finding Default DataSource in My App > Dear Friends, > > Can anybody tell me how to find the default datasource of my application at > run-time? (JNDI name or instance ref.) And a more general question: How can > I query for Orion specific application information during run-time? I saw > nothing in Orion API docs. > > Thank you in advance, > Roozbeh/ > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > >
Re: JMS TopicSubscriber blocks on receive()
johan, thanks for the response. As you can see from my code snippet, a message is created and posted, and there is a 5 second pause between publishing the message, and then attempting to receive it. In my experiments with a Queue, the message was available to a QueueReceiver almost straight away. Is there some difference between Queue and Topic based messaging where Topic messages take much longer to become available? regards, greg. - Original Message - From: Johan Fredriksson To: Orion-Interest Sent: Wednesday, July 25, 2001 5:20 PM Subject: Re: JMS TopicSubscriber blocks on receive() It is quite obvious it is waiting for a message. So my advice is that you write a client / jsp page / whatever with a TopicBrowser(?) to make sure your message really is there. Johan - Original Message - From: Greg Matthews To: Orion-Interest Sent: Wednesday, July 25, 2001 2:49 AM Subject: JMS TopicSubscriber blocks on receive() dear all, i've having trouble with a subscriber blocking on a receive message call. for the time being i can use a Queue instead of a Topic but would like to know if anyone can spot any stupid error i'm making. --- code for publisher Topic t = (Topic)ServerUtil.get( "jms/configTopic" );TopicConnectionFactory tcf = (TopicConnectionFactory)ServerUtil.get( "jms/TopicConnectionFactory" );TopicConnection tc = tcf.createTopicConnection();TopicSession ts = tc.createTopicSession(false,TopicSession.AUTO_ACKNOWLEDGE); TopicPublisher tp = ts.createPublisher(t); Message m = ts.createTextMessage("hello world"); tp.publish(m); // create subscriber in a new thread. new Thread( new Listener(tc,ts,t)).start(); code for subscriber class Listener implements Runnable { TopicConnection tc; TopicSession ts; Topic t; Listener(TopicConnection tc, TopicSession ts, Topic t) throws Exception { this.tc= tc; this.ts = ts; this.t = t; } public void run() {try { TopicSubscriber sub = ts.createSubscriber(t,null,true); System.out.println("receiving message..." ); tc.start(); synchronized(this) {wait(5000); } System.out.println(sub.receive()); // < this line blocks. why? } catch( Exception e ) { e.printStackTrace(); } System.out.println("end"); }} thanks, greg.
JMS TopicSubscriber blocks on receive()
dear all, i've having trouble with a subscriber blocking on a receive message call. for the time being i can use a Queue instead of a Topic but would like to know if anyone can spot any stupid error i'm making. --- code for publisher Topic t = (Topic)ServerUtil.get( "jms/configTopic" );TopicConnectionFactory tcf = (TopicConnectionFactory)ServerUtil.get( "jms/TopicConnectionFactory" );TopicConnection tc = tcf.createTopicConnection();TopicSession ts = tc.createTopicSession(false,TopicSession.AUTO_ACKNOWLEDGE); TopicPublisher tp = ts.createPublisher(t); Message m = ts.createTextMessage("hello world"); tp.publish(m); // create subscriber in a new thread. new Thread( new Listener(tc,ts,t)).start(); code for subscriber class Listener implements Runnable { TopicConnection tc; TopicSession ts; Topic t; Listener(TopicConnection tc, TopicSession ts, Topic t) throws Exception { this.tc= tc; this.ts = ts; this.t = t; } public void run() {try { TopicSubscriber sub = ts.createSubscriber(t,null,true); System.out.println("receiving message..." ); tc.start(); synchronized(this) {wait(5000); } System.out.println(sub.receive()); // < this line blocks. why? } catch( Exception e ) { e.printStackTrace(); } System.out.println("end"); }} thanks, greg.
JMS: Queue or Topic multicast?
dear all, are either of the Queue or Topic parts of the JMS multicast? i.e. once one subscriber pulls the message off the queue, can other subscribers see the message? since each of our clustered servers cache some info, i was thinking that a half-reasonable way of dealing with some stuff being updated on one server would be for the updated server to fire an "i've been updated" message, causing the other servers to refresh their cache. i know i could probably look at entity beans, etc, but would just like an answer to my question if anyone knows. thanks very much, greg.
Re: Clustering..
Title: RE: Clustering.. good point, but i wouldn't see this as a drawback -- it's just how it works. isn't that sort of like saying, if i retrieve a value from the database, and change it on the client, then the database isn't automatically updated? - Original Message - From: Marcel Schutte To: Orion-Interest Sent: Tuesday, July 17, 2001 6:01 PM Subject: RE: Clustering.. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kesav KumarSent: Tuesday, July 17, 2001 12:32 AMTo: Orion-InterestSubject: RE: Clustering.. This mechanism have one drawback: If you keep an object in session and later some place you get the reference of the object and modify the object the modifications won't get reflect across islands: Example: UserInfo info = new UserInfo() // Some kind of object... info.user_name = "oldName"; session.setAttribute("UserInfo", info) // At this point the info is replicated to all cluster islands //Later at any place of your code UserInfo info = session.getAttribute("UserInfo"); info.user_name = "newName"; //This change won't replicated //In some other program UserInfo info = session.getAttribute("UserInfo"); System.out.println(info.user_name) // If the request comes to the same cluster where the modification occures you will get the "NewName" if the request goes to another cluster you will get "oldname" Work Around: If you do any kind of modifications to your session objects put the objects again into session using setSessionAttribute. Keep one thing in mind that when ever you call this setSessionAttribute method the session info is going to replicate across different islands. I've noticed this too, is this according to the jsp/servlet specifications or just container specific? When you are using JSP's it is very awkward having to call setAttribute() after every or similar. This is the same problem which I faced and lead me to write my own session management. Kesav Kumar Kolla Voquette Inc 650 356 3740(W) 510 889 6840(R) Voquette...Delivering Sound Information -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin Sent: Monday, July 16, 2001 12:39 PM To: Orion-Interest Subject: Clustering.. Hi all, I know how to cluster Orion..after all, its pretty easy. What I want to know from someone who knows..is if in the 1.5.2 version all the bugs (if there were actually any) are worked out. Does Orion cluster with no problems? Does session fail-over and application context fail-over work without a hitch (providing all objects in the session and/or context are serializable)? If you have two machines in an island, and the session begins on one..does it automatically "copy" any session info to the other box for you? If you shut that box off, and all requests go to the 2nd box, does the session still exist with all objects still in memory? I take it each and every request on a clustered box requires the session to be duplicated exactly as is to the other machine? If this is the case, at what "rate" does Orion copy out the session and anything else to another server in the island (or to each and every server in the island)? How does this affect performance as compared to using just a single box without clustering..is it 2 to 3 times slower because of not only copying its session to one or more boxes, but also having to deal with "merging" other boxes context/session information into its own? Or does a cluster simply create the objects and session stuff on each box as its generated (thus..its not some background thread that copies session info when it has time to other boxes)? Is it equally good at clustering on the EJB tier (so scalability on the EJB tier or the front-end WEB tier is equally as easy)? Thanks.
Re: Application Name
javax.naming.Context ctx = new InitialContext(); ApplicationAdministrator admin = (ApplicationAdministrator)ctx.lookup("java:comp/Administrator"); then print out admin.getDisplayName( ) might be what you're after ??? - Original Message - From: "Wayne Franklin" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, July 14, 2001 5:30 AM Subject: Application Name > Is there a way to query the application name from JSP? > > I apologize if this message is a duplicate. I sent one several hours ago > and it hasn't showed up yet. I don't know if this is normal for list > servers. > > Wayne Franklin > Marathon Innovations, Inc. > > > >
Re: Orion hangs when connections exhausted.
milton, can you post a small code snippet of - obtaining a reference to the datasource - getting the connection - using, then releasing the connection? the only other sort of thing in the easy to spot category is that one or more of your methods aren't committing or rolling back, and thereby leaving database locks lying around. does oracle have any tools to check which sql statement is blocking? greg. - Original Message - From: "Milton S" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 9:54 AM Subject: Re: Orion hangs when connections exhausted. > And the obvious answer is yes. > > Greg Matthews wrote: > > > just to get the obvious things out of the way first, are you calling > > connection.close() prior to the EJB method returning? > > > > doing this in a finally block is a good idea. > > > > - Original Message - > > From: "Milton S" <[EMAIL PROTECTED]> > > To: "Orion-Interest" <[EMAIL PROTECTED]> > > Sent: Tuesday, July 03, 2001 5:36 AM > > Subject: Orion hangs when connections exhausted. > > > > > Has anyone experienced Orion hanging when all of the available > > > connections from the pool are exhausted? I noticed a similar question > > > posted by Joel Shellman back in August of 2000 but there was no response > > > to his question. > > > > > > I can re-issue the same URL from a browser multiple times and once the > > > application has taken the last pooled connection it hangs and never > > > returns. Orion never lets go of the connection even after waiting for > > > over an hour. Only way to get Orion working again is to boot. > > > Connections are not being made in an EJB but in "regular" java classes > > > that are called from a stateless session bean. > > > > > > My application is to be deployed on an Intranet and I expect the traffic > > > to be minimal so a work around is to set up the connection pool with a > > > large enough number of connections so that they are never used up, but > > > Orion shouldn't be hanging. Is this an Orion problem or am I missing > > > something in the data-sources.xml file? > > > > > > Thanks for any help. > > > > > > Milton S. > > > > > > I am running Orion 1.5.2 on NT 2000 Professional against an Oracle 8i > > > database on NT 4.0 server using the Oracle Thin JDBC driver. > > > > > > Here is the data-source I am using: > > > > > > > > class="com.evermind.sql.DriverManagerDataSource" > > > name="jdbc/PWOW_OracleCoreDS" > > > location="jdbc/PWOW_OracleCoreDS" > > > pooled-location="jdbc/PWOW_OraclePooledDS" > > > xa-location="jdbc/xa/PWOW_OracleXaDS" > > > ejb-location="jdbc/PWOW_OracleEjbDS" > > > connection-driver="oracle.jdbc.driver.OracleDriver" > > > min-connections="5" > > > max-connections="10" > > > username="uid" > > > password="pwd" > > > url="jdbc:oracle:thin:@:1521:" > > > inactivity-timeout="10" > > > connection-retry-interval="10" > > > wait-timeout="300" > > > /> > > > > > > > > > > > > > > >
Re: Orion hangs when connections exhausted.
just to get the obvious things out of the way first, are you calling connection.close() prior to the EJB method returning? doing this in a finally block is a good idea. - Original Message - From: "Milton S" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 5:36 AM Subject: Orion hangs when connections exhausted. > Has anyone experienced Orion hanging when all of the available > connections from the pool are exhausted? I noticed a similar question > posted by Joel Shellman back in August of 2000 but there was no response > to his question. > > I can re-issue the same URL from a browser multiple times and once the > application has taken the last pooled connection it hangs and never > returns. Orion never lets go of the connection even after waiting for > over an hour. Only way to get Orion working again is to boot. > Connections are not being made in an EJB but in "regular" java classes > that are called from a stateless session bean. > > My application is to be deployed on an Intranet and I expect the traffic > to be minimal so a work around is to set up the connection pool with a > large enough number of connections so that they are never used up, but > Orion shouldn't be hanging. Is this an Orion problem or am I missing > something in the data-sources.xml file? > > Thanks for any help. > > Milton S. > > I am running Orion 1.5.2 on NT 2000 Professional against an Oracle 8i > database on NT 4.0 server using the Oracle Thin JDBC driver. > > Here is the data-source I am using: > > class="com.evermind.sql.DriverManagerDataSource" > name="jdbc/PWOW_OracleCoreDS" > location="jdbc/PWOW_OracleCoreDS" > pooled-location="jdbc/PWOW_OraclePooledDS" > xa-location="jdbc/xa/PWOW_OracleXaDS" > ejb-location="jdbc/PWOW_OracleEjbDS" > connection-driver="oracle.jdbc.driver.OracleDriver" > min-connections="5" > max-connections="10" > username="uid" > password="pwd" > url="jdbc:oracle:thin:@:1521:" > inactivity-timeout="10" > connection-retry-interval="10" > wait-timeout="300" > /> > > > >
Re: Question about port listener
yes, but theoretically, EJBs aren't supposed to interact with the real world, i.e. they're not supposed to manipulate files, open sockets, or do anything useful unless it's through the container's services. you're choices are: 1. do what you said, i.e. open a socket. it would be against the spec but who cares if it works right? 2. if everyone's on the same network, look at using JMS, and then getting your client to put a message in the JMS 3. open the socket from a servlet, not a bean, which is sort of the same as option 1 but within the EJB spec. - Original Message - From: "Karri Niemelä" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, June 30, 2001 3:03 AM Subject: Question about port listener > Question 1) Is it possible to build an bean, which is some sort of tcp port > listener? > Idea is to listen for traffic on port and then fire an even/send a msg to > queue if something is received > > Question 2) What if we have an 3rd party java api to connect some server > using rmi > (for an example an api which builds up an connection to short message > center) > Would it be possible to create an bean which builds up this connection(and > does this only once), > keeps it up and listens for method calls from clients and then sends them > away > > > >
Re: clustering + ssl together
cool. thanks for the info. we're using windows so i'll try to track down a version. look like you've nailed the bug? down pretty well. hopefully, the orion lads will be nice enough to fix it for the next build. - Original Message - From: "elephantwalker" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, June 29, 2001 8:59 AM Subject: RE: clustering + ssl together > Greg, > > I found a tool that you can use to look at what's going on with ssl and the > loadbalancer or orion. If you are using linux, you probably have this > already, openssl. I am not sure if there is a windows build, though. > > at the command line: > > openssl s_client -connect loadbalancermachine:443 -state -debug > > The result is clear, ssl returns with an ssl handshake failure. If you do > this on the an instance of orion with ssl: > > openssl s_client -connect orionmachine:443 -state -debug > > There is no problem. > > So that nails the bug down, its got to be the loadbalancer. I will post this > in bug 525 for Karl. > > Regards, > > the elephantwalker > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of elephantwalker > Sent: Thursday, June 28, 2001 2:22 PM > To: Orion-Interest > Subject: RE: clustering + ssl together > > > Greg, > > I just tried this... > > 1. I assummed that ssl was completely broken for the loadbalancer. So I > stripped off the secure=true from my loadbalancer on port 443 and all of my > secure-web-site.xml's backends'. > > 2. I created a new orion instance with only the secure-web-site.xml in the > server.xml. > > 3. I modified the global-web-application.xml so that the only servlet and > mapping is this: > > >tunnel >com.evermind.server.http.TunnelServlet > > targetRoot > http://loadbalancermachine:443/ > > > >tunnel >/* > > > 5. I started the new "proxy" orion instance. > > With my browser, I put https://proxymachine/ > > ... > > Voila! it worked! > > Its a little slow, so you could probably do this with a reverse-proxy, ssl > apache to get faster response. > > This is only a workaround, since the loadbalancer ssl is broken now. > > Regards, > > the elephantwalker > > .ps the only caveat here is the j2ee j_security_check won't work, but > otherwise, everything works. I don't understand why, though. > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews > Sent: Wednesday, June 27, 2001 12:00 AM > To: Orion-Interest > Subject: Re: clustering + ssl together > > > ew, > > using your example, i have tried the equivalent of > https://localhost/mysecuresite/login > which should have gone to port 443. > > in the effort to "look under orion's covers". > > i've seen a -Djavax.net.debug=all flag mentioned in a previous post by > tomas anderson (27.6.01), and gave it a try but no extra output > appeared in orion. do you know what this is supposed to show? > > do you know if there is a way to see where the request is getting up to? > can we do a netstat or something to see where the request is falling over > or what processes are listening on what ports? > > greg. > > - Original Message - > From: "elephantwalker" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Wednesday, June 27, 2001 2:58 PM > Subject: RE: clustering + ssl together > > > > Greg, > > > > I just tried something which ALMOST worked. I tried the secure > loadbalancer > > instance like this in the browser: > > > > http://localhost:443/mysecuresite/login. > > > > The secure loadbalancer showed a session id, and forwarded the request to > > the secure island! Of course the site didn't do anything, since it was > > looking for a handshake. It looks like the loadbalancer is just not doing > > its bit...it is refusing all connections which are secure. > > > > regards, > > > > the elephantwalker > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews > > Sent: Tuesday, June 26, 2001 3:00 PM > > To: Orion-Interest > > Subject: Re: clustering + ssl together > > > > > > > > ew, > > > > i was trying to run a single secure load balancer > > with it's own load-balancer.xml. > > > > loadbalancer did register the 2
Re: clustering + ssl together
nice one. since the purpose of the work we've both been doing is to get a clustered SSL setup going, would it be worth adding something to the bug report? i.e. which asks karl and magnus very nicely to see if they can create a clustered SSL setup? greg - Original Message - From: "elephantwalker" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, June 27, 2001 3:57 PM Subject: RE: clustering + ssl together > Greg, > > I just logged this as bug 525. The ssl loadbalancer just won't accept > connections with https://, but will accept connections with http://. Basic > problem with the code. Its not us. Karl and Magnus need to fix this. > > regards, > > the elephantwalker > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of elephantwalker > Sent: Tuesday, June 26, 2001 9:59 PM > To: Orion-Interest > Subject: RE: clustering + ssl together > > > Greg, > > I just tried something which ALMOST worked. I tried the secure loadbalancer > instance like this in the browser: > > http://localhost:443/mysecuresite/login. > > The secure loadbalancer showed a session id, and forwarded the request to > the secure island! Of course the site didn't do anything, since it was > looking for a handshake. It looks like the loadbalancer is just not doing > its bit...it is refusing all connections which are secure. > > regards, > > the elephantwalker > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews > Sent: Tuesday, June 26, 2001 3:00 PM > To: Orion-Interest > Subject: Re: clustering + ssl together > > > > ew, > > i was trying to run a single secure load balancer > with it's own load-balancer.xml. > > loadbalancer did register the 2 orions i'd set up to appear > in the cluster, but after being able to see them appear on > the loadbalancer screen, i was still unable to access my > web app. the browser just sat there with the little IE > symbol spinning, but no joy. > > all orions and the loadbalancer had their own keystore > setup using a test certificate generated from thawte.com > > loadbalancer => secure and on port 443 (on box1) > orion1 => secure and on port 443 (on box2) > orion2 => secure and on port 8080 (on box1) !! but only in some experiments. > > i also tried various other configurations of the loadbalancer > and cluster machines having secure on/off, etc. and > swapping the port numbers around, e.g. when loadbalancer > and orion2 were both running, they were both secure="true" > but obviously only one can run on port 443 at one time, so > i made orion2 run on port 8080 while secure="true" was set. > > i also had a look at apache for how to setup SSL but it looks > like you've got to compile the mod in yourself for win32 so > i've given that a miss for the moment. > > greg. > > - Original Message - > From: "elephantwalker" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Wednesday, June 27, 2001 2:48 AM > Subject: RE: clustering + ssl together > > > > Here are the in the plan so far...see below. > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of elephantwalker > > Sent: Monday, June 25, 2001 1:29 AM > > To: Orion-Interest > > Subject: RE: clustering + ssl together > > > > > > Greg, > > > > I am doing this now, so I will get back to the list when I am finished. > This > > is my working plan: > > > > 1. there are two loadbalancers instances, one for http and one for https. > > These can be on the same machine or seperate machines. > > > > > > > > At one level this works, but you have to set the > minimumIsland/maximumIsland > > so that each respective loadbalancer picks up either the https island or > the > > http island. However, https connections do not work. It could be because > of > > this blurb in the load-balancer.xml description: > > > > secure - Whether or not to use SSL. The default is false. SSL is only used > > when using session (not IP) > >based balancing and the backend and the site is using SSL. If you > specify > > the balancer to use SSL then > >the backend servers will not (the balancer converts to HTTP, ie > contains > > the SSL layer). Note that this > >puts the strain of decoding the SSL on the balancer. > > > > I'm sorry, but does this say that we have the op
Re: clustering + ssl together
ew, using your example, i have tried the equivalent of https://localhost/mysecuresite/login which should have gone to port 443. in the effort to "look under orion's covers". i've seen a -Djavax.net.debug=all flag mentioned in a previous post by tomas anderson (27.6.01), and gave it a try but no extra output appeared in orion. do you know what this is supposed to show? do you know if there is a way to see where the request is getting up to? can we do a netstat or something to see where the request is falling over or what processes are listening on what ports? greg. - Original Message - From: "elephantwalker" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, June 27, 2001 2:58 PM Subject: RE: clustering + ssl together > Greg, > > I just tried something which ALMOST worked. I tried the secure loadbalancer > instance like this in the browser: > > http://localhost:443/mysecuresite/login. > > The secure loadbalancer showed a session id, and forwarded the request to > the secure island! Of course the site didn't do anything, since it was > looking for a handshake. It looks like the loadbalancer is just not doing > its bit...it is refusing all connections which are secure. > > regards, > > the elephantwalker > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews > Sent: Tuesday, June 26, 2001 3:00 PM > To: Orion-Interest > Subject: Re: clustering + ssl together > > > > ew, > > i was trying to run a single secure load balancer > with it's own load-balancer.xml. > > loadbalancer did register the 2 orions i'd set up to appear > in the cluster, but after being able to see them appear on > the loadbalancer screen, i was still unable to access my > web app. the browser just sat there with the little IE > symbol spinning, but no joy. > > all orions and the loadbalancer had their own keystore > setup using a test certificate generated from thawte.com > > loadbalancer => secure and on port 443 (on box1) > orion1 => secure and on port 443 (on box2) > orion2 => secure and on port 8080 (on box1) !! but only in some experiments. > > i also tried various other configurations of the loadbalancer > and cluster machines having secure on/off, etc. and > swapping the port numbers around, e.g. when loadbalancer > and orion2 were both running, they were both secure="true" > but obviously only one can run on port 443 at one time, so > i made orion2 run on port 8080 while secure="true" was set. > > i also had a look at apache for how to setup SSL but it looks > like you've got to compile the mod in yourself for win32 so > i've given that a miss for the moment. > > greg. > > - Original Message - > From: "elephantwalker" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Wednesday, June 27, 2001 2:48 AM > Subject: RE: clustering + ssl together > > > > Here are the in the plan so far...see below. > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of elephantwalker > > Sent: Monday, June 25, 2001 1:29 AM > > To: Orion-Interest > > Subject: RE: clustering + ssl together > > > > > > Greg, > > > > I am doing this now, so I will get back to the list when I am finished. > This > > is my working plan: > > > > 1. there are two loadbalancers instances, one for http and one for https. > > These can be on the same machine or seperate machines. > > > > > > > > At one level this works, but you have to set the > minimumIsland/maximumIsland > > so that each respective loadbalancer picks up either the https island or > the > > http island. However, https connections do not work. It could be because > of > > this blurb in the load-balancer.xml description: > > > > secure - Whether or not to use SSL. The default is false. SSL is only used > > when using session (not IP) > >based balancing and the backend and the site is using SSL. If you > specify > > the balancer to use SSL then > >the backend servers will not (the balancer converts to HTTP, ie > contains > > the SSL layer). Note that this > >puts the strain of decoding the SSL on the balancer. > > > > I'm sorry, but does this say that we have the option of NOT using SSL for > > the balancer, but using it for the backend? Or if we use SSL for the > > balancer, SSL isn't used on the backend (and thus we have to strip all of > > t
Re: clustering + ssl together
hey > have so much invested in the "apache/oracle" solution. > > > > This option is looking better and better. > > > > I'm testing this now, as soon as I get through the hickups, I will let the > list know. > > regards, > > the elephantwalker > > > > > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews > Sent: Sunday, June 24, 2001 3:02 PM > To: Orion-Interest > Subject: clustering + ssl together > > > > dear all, > > there has been a recent post on this but no solution posted. > i've got some more info on the problem. > > can the developers of orion or anyone else let me know > if anyone has successfully set up an ssl orion cluster? > > i can: > - set up clustering > - set up ssl > > ...but not both together. > > some clues. > > 1. on orionserver.com there is doco for load-balancer.xml that > suggests loadbalancer.jar can be given SSL keystore information. > does this mean that a clustered SSL setup requires loadbalancer > to share the same keystore as each box in the cluster? > > 2. how do you set the web-site.xml for a clustered secure app. > > you can't have both the loadbalancer + your secure app > both running on port 443 on the same box, so what do you > do? > i) run loadbalancer on another port? > ii) run your app on another port? > - the orion doco says that when your app needs to > be made secure you should add a secure="true" > attribute to the web-site element of the web-site.xml > plus remove the port attribute. > > if someone has made this work i'd be grateful for any information, > or if you couldn't be bothered explaining how to do it, just maybe > forward me your server.xml, loadbalancer.xml, web-site.xml and > i'll work it out from that. > > thanks. > greg. > > >
clustering + ssl together
dear all, there has been a recent post on this but no solution posted. i've got some more info on the problem. can the developers of orion or anyone else let me know if anyone has successfully set up an ssl orion cluster? i can: - set up clustering - set up ssl ...but not both together. some clues. 1. on orionserver.com there is doco for load-balancer.xml that suggests loadbalancer.jar can be given SSL keystore information. does this mean that a clustered SSL setup requires loadbalancer to share the same keystore as each box in the cluster? 2. how do you set the web-site.xml for a clustered secure app. you can't have both the loadbalancer + your secure app both running on port 443 on the same box, so what do you do? i) run loadbalancer on another port? ii) run your app on another port? - the orion doco says that when your app needs to be made secure you should add a secure="true" attribute to the web-site element of the web-site.xml plus remove the port attribute. if someone has made this work i'd be grateful for any information, or if you couldn't be bothered explaining how to do it, just maybe forward me your server.xml, loadbalancer.xml, web-site.xml and i'll work it out from that. thanks. greg.
Re: RMI Clustering done. Now want more.
hi. not really. i just wondered if you knew what the clustering settings in rmi.xml are for. i said that i'd sort of got clustering working, and hadn't added any rmi.xml clustering settings, so what then do they do? thanks, greg. - Original Message - From: "Lachezar Dobrev" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Monday, June 18, 2001 4:57 PM Subject: Re: RMI Clustering done. Now want more. > > hi lachezar, >Hya. >Looking at the text I think you misunderstood me. >I was not looking for a fail-over or Web clustering solution. That's it. >I need to use Orion as a EJB server, not the fulll J2EE App server. >I have some QUITE heavy beans, and just very small web-interface for more > or less a couple of users. I don't have a > super-duper-overloaded-with-connections site. Instead I have time-consuming > stateless session beans, that take up to a 100% CPU time, and work for some > couple of hours. >So what I need is NOT a WEB-Failover solution, but rather a RMI > (EJB-to-EJB) clustering in order to put my heavy-handed EJBs allover my > intranet. > >Hope I clarified this. > >BTW. I forgot to mention something: >LINUX ISSUE! (tested on RH7/JDK1.3.1) > Define a default route in the routing table. > Otherwise setting the multicast cluster fails with an exception. > This might be as well mentioned on OrionSupport or OrionServer. > THIS IS A JVM ISSUE. NOT ORION SPECIFIC! > >Lachezar Dobrev >Software developer >LSN Software and Telecommunication services >Sofia, Bulgaria > > > i've got clustering working for our app but haven't used the rmi.xml > > clustering settings. the app seems to failover ok to another machine in > the > > cluster if i switch a machine off, etc,. > > > > we use only stateless session beans and so i wondered if only entity bean > > information was exchanged over the port specified in rmi.xml > > > > what's all this stuff for in rmi.xml > > > > > username="cluster-user" /> > > Tag that is defined if the application is to be clustered. Used to set up > a > > local multicast cluster. A username and password used for the servers to > > intercommunicate also needs to be specified. > > > > host - The multicast host/ip to transmit and receive cluster data on. The > > default is 230.0.0.1. > > id - The id (number) of this cluster node to identify itself with in the > > cluster. The default is based on local machine IP. > > password - The password configured for cluster access. Needs to match that > > of the other nodes in the cluster. > > port - The port to transmit and receive cluster data on. The default is > > 9127. > > username - The username configured for cluster access. Needs to match that > > of the other nodes in the cluster. > > > > thanks, > > greg. > > > > > > - Original Message - > > From: Lachezar Dobrev > > To: Orion-Interest > > Sent: Friday, June 15, 2001 6:18 PM > > Subject: RMI Clustering done. Now want more. > > > > > >Hello. > >OK. I was able to (at last) run the RMI clustering. It now works. > But... > > I have a question... > >Now I can put up a cluster, and when a bean does not exist on the > server > > it is searched on the cluster and used. However if it is deployed on more > > than one machine... It is not found on all of them, but rather on only > one. > > > >For simplicity let's assume we have OrionA, OrionB, OrionC and OrionD. > >a) on all machines we have EnterpriseBean1 deployed. It accesses > > EnterpriseBean2 > >b) machine OrionA does not have EnterpriseBean2 deployed. > >c) machines OrionB, OrionC and OrionD have EnterpriseBean2 deployed. > >d) all machines have a RMI cluster set-up and working. > > (BTW) Because I needed quite some time to understand why the > > cluster was not working I am eager to help anyone, that needs > > help on the subject. > > > >If machine OrionA runs EnterpriseBean1 it will have to look-up > > EnterpriseBean2, which is used by EnterpriseBean1. > >There is no problem to find that bean (it exists on the cluster). > > However... Once EnterpriseBean2 is used on OrionC it keeps using that one. > > Why? Also. If we deploy EnterpriseBean2 on OrionA it is always found there > > and not on ANY other cluster machine. > > > >1. How does Orion know on which machine to use the bean? The last one, > > that wakes up? > >2. Is there a way to implement (at least) a round-robin technique to > > access the clustered bean on more than one server? I mean... When I > look-up > > EnterpriseBean2... I would like to have a different server answering every > > time. Round-robin is sufficient, even though a loadbalancing technique > would > > be better appropriate. > > > >Ok. Waiting forward to hearing from you all... > > > >P.S. Another question... CAN I TURN WEB-SERVICES OFF??? I tried > removing > > the default-web-app tag in the server.xml, but it starts complaining about >
.ear files + library tags + DB drivers
i've sort of had success with this but been unable to install the database driver jar file using this technique. i suspect it's a classloader order problem. i receive an error message from orion "Error initializing data-source . 'com.inet.tds.TdsDriver' not found. 1. when i put Una2000.jar (the db driver jar) in the orion lib directory i receive no error messages. 2. the other jars that i have bundled with the .ear file seem to be accessible through the entry i created in the orion-application.xml file. is there some trick in getting the library stuff processed before orion starts checking datasources, etc. thanks, greg. - Original Message - From: Tim Drury To: Orion-Interest Sent: Friday, June 08, 2001 11:20 PM Subject: RE: simplifying EAR deployment Greg, put the 3rd party jars in $EAR_ROOT/lib then edit your orion-application.xml file (in $EAR_ROOT/META-INF or $EAR_ROOT/orion for slightly older versions of orion) adding: . If you don't have orion-application.xml, deploy your app once and grab the auto-generated copy from orion/application-deployment/yourapp. put the copy in your source tree, edit it, and add it to your ear for subsequent deployments. -tim efnet #java joeblowgt -----Original Message-From: Greg Matthews [mailto:[EMAIL PROTECTED]]Sent: Thursday, June 07, 2001 8:44 PMTo: Orion-InterestSubject: simplifying EAR deployment dear all, is there any way to have 3rd party jar files included in an EAR then deployed into the orion\lib directory. i'm trying to minimise the number of steps our clients have to perform when installing our app. thanks, greg
Re: RMI Clustering done. Now want more.
hi lachezar, i've got clustering working for our app but haven't used the rmi.xml clustering settings. the app seems to failover ok to another machine in the cluster if i switch a machine off, etc,. we use only stateless session beans and so i wondered if only entity bean information was exchanged over the port specified in rmi.xml what's all this stuff for in rmi.xml Tag that is defined if the application is to be clustered. Used to set up a local multicast cluster. A username and password used for the servers to intercommunicate also needs to be specified. host - The multicast host/ip to transmit and receive cluster data on. The default is 230.0.0.1. id - The id (number) of this cluster node to identify itself with in the cluster. The default is based on local machine IP. password - The password configured for cluster access. Needs to match that of the other nodes in the cluster. port - The port to transmit and receive cluster data on. The default is 9127. username - The username configured for cluster access. Needs to match that of the other nodes in the cluster. thanks, greg. - Original Message - From: Lachezar Dobrev To: Orion-Interest Sent: Friday, June 15, 2001 6:18 PM Subject: RMI Clustering done. Now want more. Hello. OK. I was able to (at last) run the RMI clustering. It now works. But... I have a question... Now I can put up a cluster, and when a bean does not exist on the server it is searched on the cluster and used. However if it is deployed on more than one machine... It is not found on all of them, but rather on only one. For simplicity let's assume we have OrionA, OrionB, OrionC and OrionD. a) on all machines we have EnterpriseBean1 deployed. It accesses EnterpriseBean2 b) machine OrionA does not have EnterpriseBean2 deployed. c) machines OrionB, OrionC and OrionD have EnterpriseBean2 deployed. d) all machines have a RMI cluster set-up and working. (BTW) Because I needed quite some time to understand why the cluster was not working I am eager to help anyone, that needs help on the subject. If machine OrionA runs EnterpriseBean1 it will have to look-up EnterpriseBean2, which is used by EnterpriseBean1. There is no problem to find that bean (it exists on the cluster). However... Once EnterpriseBean2 is used on OrionC it keeps using that one. Why? Also. If we deploy EnterpriseBean2 on OrionA it is always found there and not on ANY other cluster machine. 1. How does Orion know on which machine to use the bean? The last one, that wakes up? 2. Is there a way to implement (at least) a round-robin technique to access the clustered bean on more than one server? I mean... When I look-up EnterpriseBean2... I would like to have a different server answering every time. Round-robin is sufficient, even though a loadbalancing technique would be better appropriate. Ok. Waiting forward to hearing from you all... P.S. Another question... CAN I TURN WEB-SERVICES OFF??? I tried removing the default-web-app tag in the server.xml, but it starts complaining about no default web-app :((( I want to have some Orion servers to act as EJB only servers. Lachezar
Re: clustering and key generation
i think elephantwalker's solution is probably better from a database independence point of view and understand now that counter works off the db. i think using identity's is probably ok also, but we'll have to do some OO stuff server side to abstract away the "get the last identity used" (MS SQL SERVER) from "get the next value from the sequence" (ORACLE). cheers, greg - Original Message - From: "elephantwalker" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Monday, June 11, 2001 1:24 PM Subject: RE: clustering and key generation > We have several orion's running in clustering, each of them serving up keys > from counter.jar, with no conflicts. Let me be clear, each orion instance > uses its own local counter.jar ejb to generate a key, but the underlying > data for the key generation comes from the database. The counter.jar is > called directly from a slsb, which then passes the generated key to the > entity bean create method. (We could have done this from within the entity > bean, it just seemed a little faster from the slsb). The slsb method to > create the entity bean is called from the web tier, a type II controller > servlet. > > If one orion fails, then the other orion can take over, since the web tier > is clustered as is the loadbalancer's job. We have tested this > functionality, and it if we turn off one appserver, the other one takes over > the controller session without a problem. > > You can directly use the database to create the keys from within the > controller servlet or a bean instanced in the controller, but then you do > not have any transaction control or any of those nice pooling things going > on under the hood with the app server, and you will pay for this with a > performance slowdown. > > Brett McGlauphlin's series of articles on Flashline.com clearly indicates > the reasons for abstracting the key generation to the enterprise tier. I > would suggest a good read of this. > > Regards, > > the elephantwalker > > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Ate Douma > Sent: Sunday, June 10, 2001 6:05 PM > To: Orion-Interest > Subject: Re: clustering and key generation > > > If I understand Greg's decision correctly, he made it to prevent a single > point of failure on the Orion server instance serving the key generation > with the counter.jar. That Orion server indeed is a single point of failure > instance as only one server should serve the key generation locally. > Of course, using the database as single point of failure is just a slight > shift of focus, but those beasts are usually a bit more stable thus I think > his decision probably improved the reliability of his system. > > Ate > > - Original Message - > From: "elephantwalker" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Monday, June 11, 2001 00:52 > Subject: RE: clustering and key generation > > > > Greg, > > > > I didn't really understand your problem. If you are using counter.jar to > > generate your keys, then the key is actually generated based upon the last > > key in the database, not the appserver, so clustering shouldn't be a > > problem. If there is an issue with transaction concurrency, you can always > > hack the ejb-jar.xml for counter.jar to keep control of the transactions. > > > > If you are using jdbc and a slsb (see Brett McGlauphlin's column on > > Flashline.com), again the database is keeping track of the keys generated, > > and not the appserver, so clustering shouldn't be a problem. > > > > If you are using a bean (not an ejb, just anyolbean) to generate your > keys, > > then you've got a problem with clustering...forget about this approach, it > > will never work. > > > > We use counter.jar, and have had no problems with key generation in a > > clustered environment. Counter.jar is in the newsapp, and is freely > > available for anybody to use. > > > > Regards, > > > > the elephantwalker > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews > > Sent: Sunday, June 10, 2001 3:19 PM > > To: Orion-Interest > > Subject: Re: clustering and key generation > > > > > > > > jason, > > > > thankyou for yor responses. > > > > in the interests of "keeping it simple", i've decided to try to lobby > > the rest of the team to go back to using db generated keys (
Re: clustering and key generation
jason, thankyou for yor responses. in the interests of "keeping it simple", i've decided to try to lobby the rest of the team to go back to using db generated keys (i.e. identity columns in the case of ms sql server ) and throw out key our key generation code. we'll then have a single .ear that can be deployed on any box with minimal changes to 1 or 2 orion files to allow clustering, and the only single point of failure will then be the database, and not the box generating keys. cheers, greg. - Original Message - From: "Jason Smith" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Sunday, June 10, 2001 2:36 AM Subject: RE: clustering and key generation > Have you tried setting: > > in your orion-application.xml on machines B,C, and D? The only place the > KeyGenerator bean is really deployed is on A, so machine A's > orion-application.xml will have remote="false". I am assuming you have > already set up your rmi.xml, etc. correctly to support this kind of > operation (as in the links I posted earlier). > > The only other thing I can think of right now is maybe try making a parent > application which has the KeyGenerator bean and run children apps on the > other machines. I haven't tried the parent/child app deployment, so you > would have to check the archives to see if this is feasible. > > -jason > > >
Re: clustering and key generation
hi, i had a read and i'm still stuck. my question specifically is about why the InitialContext i create for referencing a KeyGeneratorBean on another box doesn't work. machines A, B, C, and D each have the same app deployed, which has many beans. Each box should use it's own beans, except KeyGeneratorBean. I want to tell *all* boxes to use the KeyGeneratorBean on machine A. I do this by creating a new InitialContext that is used only when getting a home interface to KeyGeneratorBean, by calling the InitialContext( Hashtable) constructor, where Hashtable contains java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory java.naming.security.principal= java.naming.security.credentials= java.naming.provider.url=ormi://machineA/myApp this works when i run a standalone dos program to get a reference to KeyGeneratorBean on machineA, so why doesn't it work when the same code is run from inside an EJB on machineB? any help much appreciated, greg. - Original Message - From: "Jason Smith" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Friday, June 08, 2001 2:04 PM Subject: RE: clustering and key generation > These posts in the archive may help you (although they target Orion web > server->Orion ejb server configuration instead of a cluster). > > http://www.mail-archive.com/orion-interest@orionserver.com/msg12704.html > http://www.mail-archive.com/orion-interest@orionserver.com/msg11905.html > > -jason > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Greg Matthews > Sent: Thursday, June 07, 2001 10:19 PM > To: Orion-Interest > Subject: clustering and key generation > > > dear all, > > if there any way to get all machines in a cluster to lookup a stateless > session bean (KeyGeneratorBean) on *one* of the machines in the cluster > only. > > i've given it a try but can't seem to find a way to get machine B to use > machine A's KeyGeneratorBean, even though machine B builds a new > InitialContext with the 4 environment parameters, e.g. > principal/credentials/url/factory when doing a lookup for KeyBean. > > thanks, > greg. > > >
clustering and key generation
dear all, if there any way to get all machines in a cluster to lookup a stateless session bean (KeyGeneratorBean) on *one* of the machines in the cluster only. i've given it a try but can't seem to find a way to get machine B to use machine A's KeyGeneratorBean, even though machine B builds a new InitialContext with the 4 environment parameters, e.g. principal/credentials/url/factory when doing a lookup for KeyBean. thanks, greg.
simplifying EAR deployment
dear all, is there any way to have 3rd party jar files included in an EAR then deployed into the orion\lib directory. i'm trying to minimise the number of steps our clients have to perform when installing our app. thanks, greg
Re: BIG Problem with SSL
robert, check out the shared attribute of a web app in the orion docs. it's designed allow two different web apps to share sessions. i.e. in the -web-site.xml file, set for both the secure and non-secure apps. cheers, greg - Original Message - From: "Robert S. Sfeir" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, May 09, 2001 5:19 AM Subject: BIG Problem with SSL > When I setup SSL under Orion and I hit: > http://www.domain.com > > then hit > > https://www.domain.com > > they both come up fine, but it looks like Orion is starting a new session!!! > > This is bad because if someone is logged in under https, it doesn't look > like they're logged in when they're under the http server. > > Am I missing a setting with SSL or is this normal Orion behavior? > > Thanks for any prompt response you might have. > > R > > >
java:comp/Administrator
Dear all, By following some code in a previous post i can get a reference to an Administrator object which lets me do things like get the application.xml . ApplicationAdministrator admin = (ApplicationAdministrator)ctx.lookup("java:comp/Administrator"); System.out.println( admin.getDisplayName()); Does anyone know what other Orion objects are available to bind to? As an aside, if i try to iterate through the object under java:comp with a NamingIterator i only get the following, which is strange because i was expecting to see Administrator there (?) UserTransaction: com.evermind.server.ApplicationServerTransactionManagerRoleManager: com.evermind.server.hmLogger: com.evermind.util.CollectionLoggerUserManager: com.evermind.server.XMLUserManagerenv: com.evermind.naming.j_ThreadPool: com.evermind.server.he Thanks, Greg.
Re: ASP config + clustering
that's fine except if you need to run 2 or more boxes to handle the load. i want a single copy of the application specific config files shared by each clustered orion box. i also want to be able to programmatically determine where the config files are. if each orion box in the cluster knows that the root config directory is \\configmachine\configs\ then i can append say, the application name, to this to get a config directory. e.g. \\configmachine\configs\client1\config.xml for client 1 \\configmachine\configs\client2\config.xml for client 2 i can then change the application specific config details in a single place for client 1, and all of client 1's clustered application copies running across various boxes get the new information. the question is, where do i get "client1" or "client2" when building the path? the best i've been able to do is follow a previous post and get the application.xml defined value, which doesn't really solve the problem because that's included in the .ear file. i was hoping to be able to programmatically determine the server.xml defined application name and use that to build the path. greg. - Original Message - From: "Frank Eggink" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, March 22, 2001 7:03 PM Subject: RE: ASP config + clustering > Greg, > > Why run an instance of orion per client you are serving? I'm looking to > host an applications for a number of clients too, but I'm looking into > another route. > > We plan to 'copy' the applications and run them from one server-instance. > Guess for resource usage we are better off, just copying the applications > and have your clients served by one orion instance. Clients would connect > like //www.host.com/clientname/ or something like that. > > Additionally you can (on UNIX/LINUX) soft-link the original application.ear > instead of copying it. > > As long as you write the apps for the server, things should be secure in > this setup. > > FE > > On Thursday, March 22, 2001 1:45 AM, Greg Matthews > [SMTP:[EMAIL PROTECTED]] wrote: > > dear all, > > > > is there a way to get the server.xml defined "name" > attribute? > > > > after following a previous post, i can get the application.xml > > > value but this is not quite what i need. > > > > the plan is to be able to deploy multiple copies of the same application > > for different clients, and have an initServlet read in the application > name > > to determine where the config files live. > > > > e.g. client1 => read in \\someMachine\config\client1\config.xml > >client2 => read in \\someMachine\config\client2\config.xml > > > > this way, if i have to cluster client1, then there's only ever a single > > copy of their config information on the network and i don't have to > > duplicate it per orion installation. > > > > i'm also thinking of putting the web-site.xml files for each client > > in their own config directory to further reduce duplication of > > config details that would appear if you do clustering. > > > > i'd also like to avoid having to alter servlet initialisation parameters > > or anything in application.xml when deploying the app for a new > > client, but would consider these as a last resort. > > > > thanks, > > greg. > > << File: ATT5.html >> >
ASP config + clustering
dear all, is there a way to get the server.xml defined "name" attribute? after following a previous post, i can get the application.xml value but this is not quite what i need. the plan is to be able to deploy multiple copies of the same application for different clients, and have an initServlet read in the application name to determine where the config files live. e.g. client1 => read in \\someMachine\config\client1\config.xml client2 => read in \\someMachine\config\client2\config.xml this way, if i have to cluster client1, then there's only ever a single copy of their config information on the network and i don't have to duplicate it per orion installation. i'm also thinking of putting the web-site.xml files for each client in their own config directory to further reduce duplication of config details that would appear if you do clustering. i'd also like to avoid having to alter servlet initialisation parameters or anything in application.xml when deploying the app for a new client, but would consider these as a last resort. thanks, greg.
Re: How about the latest xerces.jar and xalan.jar? - memory leak
Dear all, Just a warning to anyone using xerces in their web app. The current version of xerces shipped with orion sort of leaks memory (xerces issue, not orions). org.w3c.Document objects continue to hold a reference to any org.w3c.traversal.TreeWalker objects created so if the TreeWalker goes out of scope it's not garbage collected. The latest release of Xerces, Document doesn't hold a reference to TreeWalker. In a scenario where: 1. your web app through a servlet or jsp loads a xml config file as a static variable 2. on subsequent posts or gets creates a TreeWalker to go over the Document you will be *leaking memory* unless you manually call removeTreeWalker in a xerces specific way. If orion shipped the latest xerces/xalan then this problem would go away and we'd have access to better transformation libraries, etc. We've tried replacing xerces.jar with the latest version. It fixes the memory leak problem but xalan falls over Greg. - Original Message - From: "Ted R. Rice" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, March 10, 2001 4:58 AM Subject: RE: How about the latest xerces.jar and xalan.jar? > i've experience similar issues with orion 1.4.7 and > saxon 6.2.1. > > if you update the versions of xerces to 1.3 and xalan > to 2.0, you will get the MethodNotFound error when > doing any javax.xml package calls. only way i got > around it was: > > 1. remove jaxp.jar from the orion dir > 2. open up xalan.jar and remove all the javax.xml classes > > additionally, we use UTF-8 encoding on all of XML/XSLT > files to support localization. if you set the default-charset in > the global-web-applicaiton.xml to be UTF-8 it will not work > as it complains about unrecognized UTF-8 characters in the > XML files. hoewever, the second you remove the default-charset > it works perfectly. > > everything i've mentioned was never a problem until 1.4.7. none > of our code has changed and it never had an issue with the > default-charset, > jaxp, or xalan/xerces. > > ted rice > > -Original Message- > From: Duffey, Kevin > Sent: Fri 3/9/2001 9:42 AM > To: Orion-Interest > Cc: > Subject: How about the latest xerces.jar and xalan.jar? > > > > Orion team (and whoever else is interested), > > I am working on a small framework that uses Saxon and requires > the latest > xerces.jar file. I just did an autoupdate and it downloaded > xerces.jar into > the orion folder (I deleted the one that was there because of > the problem I > am about to describe). When I started my app, the MethodNotFound > error I got > when I left the 589KB version of xerces.jar in the Orion folder > came back. > So two things. First, can you please add the latest xerces > 1.3.0. Its 1.5MB > in size, but it adds a lot of new functionality that some of us > are now > using. Secondly, why is it when xerces.jar is in the Orion > folder, Orion > does NOT use the version I have in the WEB-INF/lib folder? I > thought (sorry > if I don't recall what the specs say on this) that libraries in > the > WEB-INF/lib of a web-app override the ones in a server dir? > > Thanks. > > > >
Re: SSL Certificates + Security Alert
thanks to those that helped out. i checked back with the thawte site and i'd not installed the root test certificate. now that the thawte root test certificate is installed i can go from non-secure to secure page without getting the security alert. thanks. greg. - Original Message - From: "Tim Endres" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Monday, March 12, 2001 3:38 PM Subject: Re: SSL Certificates + Security Alert > > Q: do i get the dialog window appearing because i'm using a test certificate? i.e. will the use of a live certificate mean that i don't get the dialog window appearing? > > > > Yes, *if* the certificate chain of that certificate leads to a root > certificate that is installed in the user's browser. > > tim. > >
SSL Certificates + Security Alert
dear all, i've pretty much got secure pages going with a *test* certificate but receive a windows "security alert" dialog box the *first* time i hit a page in the secure site. if i click "yes" to "do you want to proceed?" then everything seems to work ok and i get the padlock icon in the lower right hand corner of the browser, and https://whatever in the address bar. Q: do i get the dialog window appearing because i'm using a test certificate? i.e. will the use of a live certificate mean that i don't get the dialog window appearing? thanks, greg.
Re: security in web-apps
there shouldn't be a problem with this. you might want to post more information on what url you're using + the config details in server.xml and default-web-site.xml. - Original Message - From: "Kiss Tibor" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, March 10, 2001 5:49 PM Subject: security in web-apps > Hi! > > I have created an ear file containing only a war file (with some jsps) > just for experimenting, as I am quite new to orion. > However, if I try to access my web-app, I get a 403 Forbidden error. > > Anyone got some suggestions/examples how I can control access security > for my war? > > Thanks > Tibor >
Re: EJB Clustering
william, look for the clustering guide on www.orionserver.com in the documentation section, then maybe post some more questions once you've given it a try. it works like you describe, in that starting the load balancer takes all requests and redirects to instances of orion. cheers, greg. - Original Message - From: William Jones To: Orion-Interest Sent: Friday, March 09, 2001 7:32 PM Subject: EJB Clustering I would like to find out if anybody out there has done much with clustering EJB (or RMI) servers using Orion. We will be running an operation that will need to be large, scalable and have a failsafe level of availability. In other words there should be no single point of failure. Obviously running a single EJB server will lead to a single point of failure in the infrastructure (and obviously limits scalability also). What we sould like to do is have the ability to run several clustered EJB servers so as to provide the ability to scale (add more servers to the cluster) and failover (if one falls the others pick up the slack). The classic solution to this sort of clustering (e.g. when done with web servers) is to place a local director in front of the cluster. Then all requests are sent the the IP of the local director which just routes them through to one of the machines in the cluster. The obvious problem when doing this with RMI/EJB is that when the remote interfaces (well, stubs really) do a bind() into JNDI the IP address of the machine is bound in with it. This means that requests made through that stub will go back to the machine doing the registering and not the local director, which defeats the local director. Weblogic supports clustering by providing its own (proprietry, yuk) version of rmic (c.f. http://www.weblogic.com/docs51/classdocs/API_rmi.html#compiler), but I am not aware of anything similar in Orion. (By the way, please can no-one interpret this comment as being anything of the "WL is better than Orion" sort... it is clear most of us that Orion is superior in most aspects). For RMI we have implemented a solution that invloves binding different instances of the same RMI service as different entries in the same JNDI directory and using a central service (or array of them) to pass out the stubs from the JNDI tree in a round robin fashion to clients that request them. (e.g. two services to implement logging bind to "rmi/com/amc/system/logging/LoggingService/bart" and "rmi/com/amc/system/logging/LoggingService/homer", clients make a request for com.amc.system.logging.LoggingService.class and receive back a stub for one or there of the services). I can't see that this approach will work with EJBs as you don't seem to have control over to where in the JNDI tree the stubs are bound (the mapping of JNDI name to remote interface is done in the application-client.xml!) Can anyone give me any insights on other ways to approach clustering of EJB services using Orion? Thanks in advance... William Jones asset-management.com
Fw: Your message concerning Re: non-secure and secure site
can someone at orion please take a look at removing an email address, [EMAIL PROTECTED] from the mailing list. i don't know about other subscribers but whenever i forward a message to orion interest, i get a response from netch.se about some mail account not existing. apparently they've tried unsubscribing through the form on www.orionserver.com but it didn't work. - Original Message - From: "Stefan Nyström" <[EMAIL PROTECTED]> To: "Greg Matthews" <[EMAIL PROTECTED]> Sent: Thursday, March 08, 2001 8:40 AM Subject: Re: Your message concerning Re: non-secure and secure site > > > Date: Thu, 8 Mar 2001 08:27:59 +1000 > > From: Greg Matthews <[EMAIL PROTECTED]> > > > > have you tried the following? > > > > 1. www.orionserver.com > > 2. click on "mailing list" > > 3. enter the email address to unsubscribe, then press the "unsubscribe" > > button. > > > > if so, let me know and i'll contact orion to have the offending email > > address removed. > > Yes I have. I would appreciate your assistance. > > /S. > > -- > _ __ __ _ _ | Stefan Nyström > (_ | (__ |__ /_\ |\ | [EMAIL PROTECTED] --- > __) | (__ | / \| \| http://www.netch.se/~stefan/(o o) > -ooO-(_)-Ooo > "Le concert de finito, finale, you must a go home now. I have told you so > many times. Saa er det dags og gå hjem". -- Bob Hund >
Re: non-secure and secure site
looking at the online documentation, it seems (???) like this isn't really to do with SSL. i gave it a try anyway and got the windows dialog "save or download" appearing when i tried to open a jsp in the "/secure/" directory. does this work? i.e. have to put pages in the "/secure/" directory, and when you try to open them it switches to https ? thanks, greg. - Original Message - From: cybermaster To: Orion-Interest Sent: Wednesday, March 07, 2001 1:14 AM Subject: RE: non-secure and secure site Greg, all can be in one app. You have to specify a in web.xml, best specified as a sub-directory e.g. “/secure/*”, where you put your secure pages. --peter
non-secure and secure site
dear all, what's the standard way to structure an app where some pages are non-secure and other are secure? i can set up a secure site, and redirect from the non-secure site to the secure site, and wondered what the best way is to transfer context to the secure site to continue processing. e.g. non-secure => search for products non-secure => add products to cart non-secure => press checkout, write cart details to database non-secure => redirect to secure-site sending cart number secure => get user to login again secure => reload cart details from database secure => verify shipping address secure => process credit card through payment gateway secure => redirect back to non-secure site this would also involve duplicating a lot of the code between the applications that would run in the secure and non-secure sites, like code to read/write cart contents, read/write user details for login. is there a better way? are they any pitfalls i've missed? thanks, greg.
Re: significance of web-site.xml
good question. clustering islands seem to be only specified in a web-site.xml file. i'm more of a java programmer than a network/webserver administrator so apologies if this is a bit of a dumb question. if i want to run copies of my app for different paying customers, and cluster each individually then i'm under the impression that i need each copy of the app configured in separate web-site.xml files. i understand (and have tried) everything that you've included in your email but i still don't have an answer to my question. does creating a new web-site.xml literally correspond to a new registered domain name? is there a way to have, www.ourdomain.com/customer1/myApp and www.ourdomain.com/customer2/myApp and so on setup, where customer1 and customer2 have been set up in separate web-site.xml files, and are also clustered in separate islands. i've got clustering going, and i've got multiple apps configured but all using default-web-site.xml which is not what we're after. i've also followed the virtual-hosts tutorial but it also didn't go the extra step and explain what a new web-site.xml meant. thanks, greg. - Original Message - From: "Jeff Hubbach" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Monday, March 05, 2001 2:38 PM Subject: Re: significance of web-site.xml > Greg, > > I guess the first question is why are you trying to do this? The web-site is associated with a distinct web site. If you have multiple applications you want under the same web site, ie www.blah.com, then you just make multiple applications in the web-site file that points its host to www.blah.com. If you want 2 distinct websites, ie www.foo.com and www.bar.com, then you make 2 separate web-site.xml files and point the host of each one to these separate URLs. > > Jeff Hubbach > > On Mon, 5 Mar 2001 09:22:51 +1000 > "Greg Matthews" <[EMAIL PROTECTED]> wrote: > > >dear all, > > > >i've been trying to run multiple copies of an application > >with each copy having its own config\-web-site.xml file. > > > >what's the significance of doing this? do i require a network card > >for each app that i want to run this way? > > > >i can run multiple apps in they're all configured in the default-web-site.xml > >file but not when each app has it's own web-site.xml file. > > > >i believe this has something to do with the "host" attribute within > >the element, but don't know what to change it to. > > > >i've read the various faqs on orionserver and orionsupport, and > >read the virtual-hosts faq, but not had any success. > > > >thanks, > >greg. > > >
significance of web-site.xml
dear all, i've been trying to run multiple copies of an application with each copy having its own config\-web-site.xml file. what's the significance of doing this? do i require a network card for each app that i want to run this way? i can run multiple apps in they're all configured in the default-web-site.xml file but not when each app has it's own web-site.xml file. i believe this has something to do with the "host" attribute within the element, but don't know what to change it to. i've read the various faqs on orionserver and orionsupport, and read the virtual-hosts faq, but not had any success. thanks, greg.
Re: multiple apps
thanks for the response. i'm more of a java programmer than a web site administrator so i'm a bit in the dark here. does that mean that i need two network cards in my machine if i want to use 2 appname-web-site.xml files? you suggest changing the host attribute from [ALL], what should i change it to? the larger picture is that we're trying to find the best way to set up orion so we can run duplicate copies of an application, one for each time a person calls us, gives us their credit card number, and says "i'd like to lease your browser based software" we want to be able to: - run multiple apps per machine, and - run an app across multiple machine where a customer puts heavy load on the system. thanks, greg. - Original Message - From: Michael Bosch To: Orion-Interest Sent: Wednesday, February 28, 2001 5:04 PM Subject: Re: multiple apps Having just gone through learning all the configuration details recently the thing that pops out in my mind is whether or not you changed the host attribute in your web-site element of the copy1-web-site.xml and copy2-web-site.xml files so that they're different? It'd make sense that one would run and the other doesn't when they're both activated if this were the case. If they're both set to [ALL] then the first one would probably override the 2nd. -Mike - Original Message - From: Greg Matthews To: Orion-Interest Sent: Tuesday, February 27, 2001 5:27 PM Subject: multiple apps Dear all, I'm having some trouble getting multiple copies of an app to run where i use different -web-site.xml files. I don't have a problem where i configure all the information within server.xml and default-web-site.xml, but i want to use different web-site.xml files so that i can do clustering. I do the following: 1. copy/paste the application within \orion\applications. e.g. \orion\applications\copy1 \orion\applications\copy2 2. create 2 web-site.xml files e.g. \orion\config\copy1-web-site.xml \orion\config\copy2-web-site.xml 3. put a reference to the web-site files in server.xml 4. put a reference to the 2 applications in server.xml Questions a) I can run the copy1 app in my browser, but not copy2. b) If i comment out copy1, then for some reason i can run copy2. c) If i uncomment copy1, then copy1 starts working, and copy2 is not accessible. d) I don't get any error messages relating to not being able to access copy1 or copy2. Does anyone know what i might be doing wrong? Thanks, Greg
multiple apps
Dear all, I'm having some trouble getting multiple copies of an app to run where i use different -web-site.xml files. I don't have a problem where i configure all the information within server.xml and default-web-site.xml, but i want to use different web-site.xml files so that i can do clustering. I do the following: 1. copy/paste the application within \orion\applications. e.g. \orion\applications\copy1 \orion\applications\copy2 2. create 2 web-site.xml files e.g. \orion\config\copy1-web-site.xml \orion\config\copy2-web-site.xml 3. put a reference to the web-site files in server.xml 4. put a reference to the 2 applications in server.xml Questions a) I can run the copy1 app in my browser, but not copy2. b) If i comment out copy1, then for some reason i can run copy2. c) If i uncomment copy1, then copy1 starts working, and copy2 is not accessible. d) I don't get any error messages relating to not being able to access copy1 or copy2. Does anyone know what i might be doing wrong? Thanks, Greg
Re: load balancing
found it. someone else was using clustering also and we weren't specifying minimumIsland and maximumIsland when launching loadbalancer, i.e. each of our loadbalancers were seeing each others servers. - Original Message - From: Greg Matthews To: Orion-Interest Sent: Monday, February 26, 2001 12:52 PM Subject: load balancing dear all, i've had a go at setting up load balancing and it's half working. i don't know what's registering with the load balancer for the first server mentioned in the message below. the second server mentioned is the one i configured. anyone have a rough guess about what i might have done to cause the first server to be appearing. when i open pages on the site, the load balancer finds 127.0.0.1 invalid, then removes it from the cluster, but then about 5 seconds later it re-adds it back in. F:\orion>java -jar -debug loadbalancer.jar Balancer initialized...Added island number 1 to the cluster...Discovered server 127.0.0.1/127.0.0.1:8081... <= where's this coming from?Discovered server PIII-450/57.226.58.6:8080... <= this is ok. from default-web-site.xml
load balancing
dear all, i've had a go at setting up load balancing and it's half working. i don't know what's registering with the load balancer for the first server mentioned in the message below. the second server mentioned is the one i configured. anyone have a rough guess about what i might have done to cause the first server to be appearing. when i open pages on the site, the load balancer finds 127.0.0.1 invalid, then removes it from the cluster, but then about 5 seconds later it re-adds it back in. F:\orion>java -jar -debug loadbalancer.jar Balancer initialized...Added island number 1 to the cluster...Discovered server 127.0.0.1/127.0.0.1:8081... <= where's this coming from?Discovered server PIII-450/57.226.58.6:8080... <= this is ok. from default-web-site.xml
ejbFindByPrimaryKey
Dear all, I'm using BMP and noticed that ejbFindByPrimary key is called after ejbLoad. The order in which methods are called are as follows: 1. ejbFindAll 2. ejbLoad called once for each entity 3. ejbFindByPrimaryKey called once for each entity. I'm pretty sure the container is calling ejbLoad (which seems normal if the entity has never been previously loaded) and then ejbFindByPrimaryKey. Why would ejbFindByPrimaryKey be called if the container has just called ejbLoad? Thanks, Greg.
findByPrimaryKey checking db every time
dear all, is there any way to prevent findByPrimaryKey hitting the db every single time it gets called. i.e. if the bean is in cache, can you force the container to just return it without doing a primary key lookup in the db? greg.
1 app connecting to multiple identical db's
dear all, i have a question about running multiple identical database in an ASP (application service provider) environment. we currently use stateless session beans only and handle database connection pooling ourselves. this allows us to have a single ejb server connection to 1 of several identical databases. new clients have a new database created for them, and their config information entered into our own config file. based on their login, we run the ejb method using a connection from a connection pool pointing at their db. how would we do the equivalent to this if we were to rewrite some parts of the system as entity beans? the problem is that i can't see how their login information would get propagated down to entity bean level so that i could get a reference to the correct datasource. it's easy enough when you're just using SLSB's. e.g. pseudo code for what we do currently. public someMethod( Identity id ) { get connection from pool based on id.databaseId pass the connection down as a parameter to each method that requires db access return connection to pool } how would this work with entity beans? e.g. dodgy code, but just to show you roughly what i mean. private Connection getConnection() throws SQLException, RemoteException { DataSource ds = null; // <<>> // e.g. int databaseId = entityContext.getDBId() try { Context ic = new InitialContext(); ds = (DataSource)ic.lookup( "jdbc/MyAppDS" + databaseId );} catch(NamingException e) { e.printStackTrace(); throw new RemoteException("Could not obtain DataSource: " + e); } return ds.getConnection();} thanks, greg.
Re: serialisation problem?
thanks juan and mike for the responses. F:\dev\script>java -versionjava version "1.3.0"Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode) is there any way i get see the marshalling code generated by orion so i could maybe work out what's going on? if so, can the marshalling code generated by orion be modified for debugging purposes? thanks, greg - Original Message - From: Juan Lorandi (Chile) To: Orion-Interest Sent: Thursday, January 18, 2001 2:32 AM Subject: RE: serialisation problem? shooting from the hip again (bad habits die hard)... String's limit was 64K until JDK 1.3... which JDK are you using? -Original Message-From: Greg Matthews [mailto:[EMAIL PROTECTED]]Sent: Miércoles, 17 de Enero de 2001 1:27To: Orion-InterestSubject: serialisation problem? dear all, we're got a strange problem whereby a large (141K) String return value from a stateless session bean is turning up at the client as an empty string. this happens whether we call the ejb method from a jsp or a java client external to orion. it has also happened in other ejb methods during testing where a master-detail type record suddenly stopped being retrievable when the total size of all data in xml format as a String exceeded a certain size. is there an upper limit on the size of variables that can be serialised? does anyone have any ideas on why this might be happening? thanks, greg
serialisation problem?
dear all, we're got a strange problem whereby a large (141K) String return value from a stateless session bean is turning up at the client as an empty string. this happens whether we call the ejb method from a jsp or a java client external to orion. it has also happened in other ejb methods during testing where a master-detail type record suddenly stopped being retrievable when the total size of all data in xml format as a String exceeded a certain size. is there an upper limit on the size of variables that can be serialised? does anyone have any ideas on why this might be happening? thanks, greg
NoSuchMethodException
Dear all, I've build an ejb jar, deployed it, and then tried to call one of the methods in one of the stateless session beans. It doesn't work. I can get a reference to the stateless session bean but can't work out why i can compile client code to call an ejb method, but then get a NoSuchMethodException when i try to run it. The line below is from a System.out.println call, showing that i've got a remote object reference. testing server = TestingServer stateless session com.evermind.server.rmi.OrionRemoteException: Invocation error: java.lang.NoSuchMethodException at com.evermind.server.rmi.bd.invokeMethod(JAX) at com.evermind.server.rmi.a4.invoke(JAX) at __Proxy1.initialise(Unknown Source) at com.traveltech.data.OrionClient.(OrionClient.java:27) at com.traveltech.data.OrionClient.main(OrionClient.java:37) Nested exception is:java.lang.NoSuchMethodException at com.evermind.server.rmi.bd.invokeMethod(JAX) at com.evermind.server.rmi.a4.invoke(JAX) at __Proxy1.initialise(Unknown Source) at com.traveltech.data.OrionClient.(OrionClient.java:27) at com.traveltech.data.OrionClient.main(OrionClient.java:37) Does anyone have any clues as to why I can't call a method in a object that I have a reference to? The method is there since doing a javap shows the method, and my client code compiles ok. Thanks, Greg.
connection pooling
dear all, do requests for EJB UserTransaction objects or db connections accessible through a Context get handled in a *queued* manner under orion?, or does it just notifyAll() the worker threads and let them fend for themselves? we're currently doing our own database connection pooling, about to switch over to UserTransaction objects + using orion's db connection pooling. i had to modify the database toolkit we are using since it implemented a "free for all" approach to handing out newly freed up connections to worker threads, i.e. notifyAll(), which didn't guarantee that threads received a db connection in the order in which they were requested. greg
Re: Ok. I feel dumb. Data Sources and MS SQL.
we use a driver from http://www.inetsoftware.de/ for sql server. there's an evaluation version if you want to give it a go - Original Message - From: "Kimberley Scott" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, October 25, 2000 11:15 AM Subject: Ok. I feel dumb. Data Sources and MS SQL. > Hiya, > > Feeling real stupid here. I'm examining data sources and getting totally > confused. Maybe I'm just burnt out. Haven't had a holiday in five years. > Sigh. > > Back to business. We're *forced* to use Microsoft SQL 7 and Win2K. How do I > set up the datasource xml file to handle this? I can't seem to find anything > on this in the email lists on in the docs. The only drivers I have are the > ODBC bridges (The invisible hidden MS one and the standard Sun one) and I'm > not paying for a Type IV driver at the outrageous prices I've been presented > with from BEA and the like. Has anyone done this before or can point me in > the right direction? > > A tired developer who's feeling very old and dim... > > Kimberley Scott > Senior Web Developer > Peakhour Pty Ltd > http://smartoffice.com.au <<- just built. needs work. ASP/COM Sigh. What can > I say? > http://peakhour.com.au <<- corporate site > http://www.geocities.com/kimmie_scott <<-me > > > >
Re: get reference to UserTransaction fails
i was trying to do the same thing, and it sort of makes sense that you can't control a transaction (UserTransaction) from outside orion (i.e. the ejb container). it does raise the question however about how you would ever maintain any decent level of control over transactions if entity beans were involved unless you *always*: 1. set the trans-attribute of every entity bean to Mandatory 2. used stateless session beans as a facade to controlling entity beans. i've been using stateless session beans for a while and trying to come up to speed with entity beans. there's probably something stupid i'm doing but i've been unable to find a solid way to control database transaction boundaries unless i use the above pattern (slsb call entity beans). a) does anyone call entity beans directly from a JSP? or do you call stateless server beans which wrap entity beans? b) is it possible to control database transaction boundaries without wrapping EJB methods calls in a UserTransaction.begin() and UserTransaction.commit() ? thanks, greg - Original Message - From: "Juan Lorandi (Chile)" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, October 25, 2000 3:49 AM Subject: RE: get reference to UserTransaction fails > Are your trying to retrieve something from "java:comp" DIRECTLY from code > not running on Orion? > > I have looked (very quickly) at the specs, and I don't think that's > allowed(seems pretty unsafe to me) > Perhaps you can build a session bean that preforms the lookup, then passes > the reference to the client > > > But I think it's a bad idea anyway... it's kinda like "one and a half" layer > programming... > > > My 2c, > > JP > > -Original Message- > From: Klaus Thiele [mailto:[EMAIL PROTECTED]] > Sent: Martes, 24 de Octubre de 2000 7:10 > To: Orion-Interest > Subject: get reference to UserTransaction fails > > > Hello, > > i'm using transactions within servlets, sessionbeans > with no problems. > > now i'm trying this from an ordinary app-client but it > caught an exception: >"java:comp/UserTransaction not found" > > what goes wrong? > > thanks a lot > klaus > > > import javax.naming.*; > import javax.transaction.*; > ... > TransactionManager tm = >(TransactionManager)new > InitialContext().lookup("java:comp/UserTransaction"); > > -- > Klaus Thiele - Personal & Informatik AG > mailto:[EMAIL PROTECTED] > > "There's got to be more to life than compile-and-go." > >
java:comp/UserTransaction not found
dear all, i'm sort of still learning about entity beans and wondered if anyone had any pointers for an error i'm getting. i receive *no* error when i try to obtain a reference to a UserTransaction from a stateless server bean under orion. i receive the following error when i try to obtain a reference to a UserTransaction from a java program running *outside* orion, that is similar to CartClient in the orion examples. javax.naming.NameNotFoundException: java:comp/UserTransaction not found i can get around this error by having a stateless session bean do the UserTransaction stuff, and act as a facade to the other various entity and session bean methods but was wondering if there was a way around the above problem. thanks, greg.
Re: findByPrimaryKey() calling store()
thanks for the response. i checked again and i'm using BMP (attached is ejb-jar.xml). i haven't really got my head around how transactions work with entity beans although doing lots of reading at the moment. i'm thinking maybe the orion ejb container is treating each of my entity bean calls as a transaction (as supported by profiling the sql server database we're using), and that's why store is being called (?). we currently use stateless server beans, and handle connection pooling ourselves since all the ejb connection pooling stuff asn't that mature when we started our project. we're now relooking at entity beans, etc, and working out how to do all the simple things like controlling transaction boundaries, etc, and connection pooling. greg. - Original Message - From: "James Ho" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, October 19, 2000 6:04 AM Subject: Re: findByPrimaryKey() calling store() > Hi Greg... > > According to Orion1.4.0's changes.txt it said: > > Optimized CMP entity stores to only store updated fields. > > > I am not 100% sure what it means though..maybe it is what u are after... > > James. > > > > Greg Matthews wrote: > > > > dear all, > > > > i have a jsp that calls findByPrimaryKey on an entity bean. > > > > the data that the bean represents exists in the database. > > > > it seems like ejbStore is being called as a result of calling > > findByPrimaryKey. > > > > also, once i have a reference to the bean, calling an accessor > > method on it also seems to cause ejbStore to be called. > > > > is there something i can set to prevent the bean being > > updated when there is no (apparent?) need, or am i > > missing something? > > > > thanks, > > greg. > > > > // as a result of findByPrimaryKey > > SELECT id FROM sales_order WHERE id = 5 > > UPDATE sales_order SET notes = 'notes 5' WHERE id = 5 > > IF @@TRANCOUNT>0 COMMIT TRAN BEGIN TRAN > > > > // as a result of calling order.getNotes( ), an EJB method > > // that does not access the database > > UPDATE sales_order SET notes = 'notes 5' WHERE id = 5 > > IF @@TRANCOUNT>0 COMMIT TRAN BEGIN TRAN > > http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> OrderBean com.sales.OrderHome com.sales.Order com.sales.OrderBean Bean java.lang.Integer False reference to a jdbc datasource mentioned down in the DD section jdbc/orderDS javax.sql.DataSource Container OrderBean * Required
findByPrimaryKey() calling store()
dear all,i have a jsp that calls findByPrimaryKey on an entity bean.the data that the bean represents exists in the database.it seems like ejbStore is being called as a result of callingfindByPrimaryKey.also, once i have a reference to the bean, calling an accessormethod on it also seems to cause ejbStore to be called.is there something i can set to prevent the bean beingupdated when there is no (apparent?) need, or am i missing something? thanks,greg.// as a result of findByPrimaryKeySELECT id FROM sales_order WHERE id = 5UPDATE sales_order SET notes = 'notes 5' WHERE id = 5IF @@TRANCOUNT>0 COMMIT TRAN BEGIN TRAN// as a result of calling order.getNotes( ), an EJB method// that does not access the databaseUPDATE sales_order SET notes = 'notes 5' WHERE id = 5IF @@TRANCOUNT>0 COMMIT TRAN BEGIN TRAN
userThreads + calling EJBs from outside orion.
dear all, i've started orion 1.40 as follows: java -jar orion.jar -userThreads and then tried to get a reference to the InitialContext, and received this stack trace. f:\dev\script>java -classpath f:\orion\orion.jar;f:\jdk1.3\jre\lib\rt.jar;f:\classes test.OrionTestjavax.naming.NamingException: Not in an application scope - start Orion with the -userThreads switch if using user-created threads at com.evermind.server.g6.bi(JAX) at com.evermind.naming.j_.lookup(JAX) at javax.naming.InitialContext.lookup(InitialContext.java:350) at test.OrionTest.(OrionTest.java:18) at test.OrionTest.main(OrionTest.java:31) i'm trying to create a dos shell program that i can use to test EJB's running inside orion. 1. am i starting orion correctly to allow this with the userThreads flag? 2. what values should i use to initialise the InitialContext? is the following correct? Hashtable env = new Hashtable(); env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationInitialContextFactory"); env.put(javax.naming.Context.URL_PKG_PREFIXES, "com.evermind.server"); Context ctx = new InitialContext(env); i know i shouldn't need to if my classpath is set up correctly but i'd like to know what values should be used anyway. thanks, greg
calling EJBs from outside orion
dear all, is it possible to call EJBs running in orion from a java program started at the DOS command line, i.e from outside orion? i guess i might have to generate the client stubs (?). has anyone done this? this would be useful when building the ejb components to be used by the web developers. thanks, greg
Re: my orion freezes at a high load
what database driver are you using? if you're using the sun jdbc-odbc bridge then it's prone to locking up and you'll have to purchase a proper driver. -Original Message- From: Thomas Krantz <[EMAIL PROTECTED]> To: Orion-Interest <[EMAIL PROTECTED]> Date: Saturday, 14 October 2000 2:28 Subject: my orion freezes at a high load > >Hi, > >I am stress testing Orion, and in my application I have >lots of JDBC calls that use a configured data-source. >I have noticed that Orion stops serving requests (not even >static pages) after a while of high load. It still listen >to port 80, but doesn't return any content. If I increase >the "max-connections" data-source setting the system lives a little >bit longer. Now, I realize that I probably have leaking connections, >but shouldn't Orion log somewhere if the max-connection limit is >reached? And why doesn't it serve static pages? I can't find anything >strange in any logs at all. > >I am using Solaris 8 sparc with Java 1.2 (tried 1.3 also) and >Orion 1.3.7. > >Any clues? > >/ Thomas > >-- >"Hard work often pays off after time, > But laziness always pays off now." > >PGP Public Key: http://www.algonet.se/~tok/pgp.txt > >