Re: JDBC connection pooling and ORION
Like a lot of things in Orion, this is not particularly well documented. Here is how I have mine set up. The name identified as the "pooled-location" appears to behave as a pooled data source when I reference it from my application. - Original Message - From: "Hao H Ngo" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Wednesday, April 25, 2001 2:08 PM Subject: JDBC connection pooling and ORION > Can someone tell me how to get JDBC connection pooling to work? > Maybe some examples? I can't find anything on connection pooling. > I have successfully made a JDBC connection to postgres, but I would like > to grab connections from a pool and release to that pool. > > Help? > > >
Re: Castor and Orion (transactions)
Rick, First thing you need to do is make sure your EJB implements the SessionSynchronization interface. That is, the class declaration for your EJB class should include "implements SessionSynchronization". The second thing you're going to need to do is change your EJB from stateless to stateful. Session synchronization isn't allowed on stateless EJBs. This makes sense, because without any state, your transaction callbacks wouldn't know what data to operate on. - Original Message - From: "Rick Yoder" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 7:24 PM Subject: Castor and Orion (transactions) > > I'm attempting to use Castor as my persistence layer > inside Orion. In order for Castor to work properly, > it needs to be informed of the transaction boundaries. > The way it does this is by implementing the > javax.transaction.Synchronization and registering > with the transactons when they started. It does this > with code similar to the following: > > InitialContext ctx = new InitialContext(); > javax.transaction.TransactionManager tm = > (javax.transaction.TransactionManager)ctx.lookup("java:comp/UserTransaction" ); > javax.transaction.Transaction tx = tm.getTransaction(); > tx.registerSynchronization(); > > This code appears to be working as I've added some debug code > to Castor to make sure the call to registerSynchronization() is > returning. However, Orion is never calling any of the > Synchronization methods, so Castor is never persiting any > of the data. My question is: > > 1. Is this a bug in Orion? > 2. Is there an Orion configuration parameter that I have to >set to tell it to call back the registerred Synchronization >instances? > 3. Is this the proper way to register with Orion to be notified >of transaction bounndaries? I know there is the >javax.ejb.SessionSynchronization interface for Session >beans to be notified of Transaction boundaries, however >there is no way right now for me to do this inside Castor. > > A few more notes on my implementation: > - I am using Stateless Session Beans > - Each method of the bean is setup to use Container managed > transactions with a TX_REQUIRED attribute. I know that I Orion > is creating the transaction, because the registerSynchronization > code above is working. > > Any help would be appreciated for as of now, I do not know how to > use Castor with Orion. > > Thanks, > Rick Yoder >
Re: On large programming teams [RE: A Swedish Idea]
Adding more programmers to a product early in its development cycle can pay off. You have to add them early enough to account for the learning curve, which slows down the project for a while as the new programmers learn and the old programmers take time to teach them. The mistake most organizations make is adding more programmers after the project is overdue without taking into account the learning curve. The best way to manage a late project is to cut the project's scope. The next best way is to extend the due date. The worst thing to do is demand more programming in less time, because this serves to reduce the quality of the programming. - Original Message - From: "Frank Eggink" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, April 21, 2001 7:01 AM Subject: On large programming teams [RE: A Swedish Idea] > The following is one of the classic readings on programming at large. 25 years old and I > can still recommend it: > > "The Mythical Man-Month" from F.P. Brooks jr. > > Yes, it's even 26 years old and talks about OS/360, some odd system which is now out > performed by your 100$ marketvalue Pentium I machine, but programming is done by > humans which haven't much changed over the last 25 years. > > On the experience I have had so far with large projects I can only agree with him. Changing > one of his 'laws' slightly: > > "Adding more programmers to a product makes the product worse". > > > So far I have not found evidence against this law ;-) > > FE > > On Thursday, April 19, 2001 3:06 PM, Jay Armstrong [SMTP:[EMAIL PROTECTED]] wrote: > > Generally, I agree with the comment about Micro$oft quality of code, though > > I've seen some pretty horrible code from outside the US, too. :) > > > > Bill Gates may be from the US, but Micro$oft employees come from all over > > the world. Visit Redmond, WA, USA and you'll see for yourself. > > > > At 09:50 AM 4/19/01 +0200, you wrote: > > >And Micro$oft programmers are from...? > > > > > >I suppose that the country they're from produce the shittiest code of em all > > >:) > > > > > >Johan > > >- Original Message - > > >From: "Joseph B. Ottinger" <[EMAIL PROTECTED]> > > >To: "Orion-Interest" <[EMAIL PROTECTED]> > > >Sent: Wednesday, April 18, 2001 4:20 PM > > >Subject: Re: A Swedish Idea > > > > > > > > >> Personally, I'm becoming more and more convinced that not only is Sweden > > >> full of lousy programmers, but they're all lousy in congruent ways just to > > >> make the rest of the world's jobs harder. > > >> > > >> I say we all start using Bavarian products, if only because Bavarian names > > >> seem to have a better vowel/consonant ratio. > > >> > > >> Say, Randy... what country are YOU from? (That's the leading indicator for > > >> quality of code...) > > >> > > >> On Wed, Apr 18, 2001 at 08:49:24AM -0500, Kemp Randy-W18971 wrote: > > >> > Now this may be a dumb idea, and I am just thinking up brainstorms to > > >promote Orion, but it occurred to me that both Mysql and Orion are in > > >Sweden. Now I don't know how big Sweden is, but perhaps a meeting between > > >the two teams could find ways to mutually promote or bridge the two > > >products. Just a thought. Speaking of Sweden, since Rickard O. from Jboss > > >lives there, does anyone know of Magnus or Karl have meet him? In once > > >sense, but Jboss and Orion are trying to make this EJB technology available > > >to more people. > > >> > > >> -- > > >> --- > > >> Joseph B. Ottinger [EMAIL PROTECTED] > > >> http://epesh.com/ IT Consultant > > > > > > > > > > > > > >
Re: How to connect to an Orion Ejb from outside?
I can't speak specifically for CORBA, but you can most certainly access EJBs in an Orion server from stand-alone Java clients (not servlets). The correct method of obtaining the JNDI context when operating outside the container is not well documented, but I worked it out as follows: Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory"); ht.put(Context.PROVIDER_URL, "ormi://MyServer/MyApplication"); ht.put(Context.SECURITY_PRINCIPAL, "admin"); ht.put(Context.SECURITY_CREDENTIALS, "abc123"); Context ctx = new InitialContext( ht ); - Original Message - From: "Lachezar Dobrev" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 10:32 AM Subject: How to connect to an Orion Ejb from outside? >Until now I have developed EJBs for use with a CORBA broker. >However, I did not see such a thing in ORION. >Question: How (and can I) do I adress EJBs from my outside-of-orion > applications? >I was able to create a couple of basic EJBs. Well... Had to move them to > ORION. My problem is, that my apps now cannot adress these EJBs. Is it > possible at all, or not? If yes, than how, 'cause I saw nothing on this > subject neither in the documentation, nor in the tutorials. > >Thanks in advance. >Lachezar. > > >
Re: A Swedish Idea
What's the difference? We choose to write J2EE applications because J2EE is a community standard rather than a proprietary API. If Orion goes under, all it takes is a few new config files to deploy your app on another server. - Original Message - From: <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, April 19, 2001 4:17 PM Subject: Re: A Swedish Idea > > God forbids, what if one of them got into car accident, would there still be > Orion. >
Re: parsePostData
Yes, I figured out that the parsePostData is intended for mime-encoded multipart forms, not regular HTML forms. I made myself a helper class to move all the form data into a hashtable. You have to call this from within the JSP page, but then you can pass the hashtable anywhere you want. import java.util.*; import javax.servlet.ServletRequest; public class FormCollector { public static Hashtable parseForm(ServletRequest request) { Hashtable result = new Hashtable(); Enumeration names = request.getParameterNames(); while ( names.hasMoreElements() ) { String name = (String) names.nextElement(); result.put( name, request.getParameter(name) ); } return result; } } - Original Message - From: "Fyffe Carl" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Thursday, April 12, 2001 7:21 AM Subject: RE: parsePostData > Frank, > > Did you figure this problem out? I have been having the same problem and > hope you can shed some light on the subject. > > Ernie, > > Because it is nice to have all of the data in one variable that isn't a > request object. Just my two cents. > > Carl > > -Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Frank LaRosa > Sent: Monday, April 09, 2001 12:51 AM > To: Orion-Interest > Subject: parsePostData > > > I'm having some trouble parsing form data in a JSP page. > > I'm using this code: > > Hashtable ht = HttpUtils.parsePostData( request.getContentLength(), > request.getInputStream() ); > > The result is always a Hashtable with a size of zero, even though there > should be data in the form. > > I posted the form with . Can anyone > spot what I'm doing wrong? Thanks. > > >
parsePostData
I'm having some trouble parsing form data in a JSP page. I'm using this code: Hashtable ht = HttpUtils.parsePostData( request.getContentLength(), request.getInputStream() ); The result is always a Hashtable with a size of zero, even though there should be data in the form. I posted the form with . Can anyone spot what I'm doing wrong? Thanks.
Precompiling JSP files
Hi, Forgive me if this is a naieve question, but I'm new to Orion and new to JSP. I'm wondering if there is a way I can compile JSP pages one at a time on the command line without deploying them to the Orion server. All I want to do is verify that there are no Java errors in the page, so it doesn't really matter if the page has to get compiled again after it's deployed -- I just want an easier way to check my JSP code than deploying it and loading it in the web browser. Thanks.
Re: Returning Collections from ejbFindXXX()
The reason you're getting an exception is because the collection of Strings you return from your EJB method is not the same collection that the client receives. The client receives a collection of your EJB's remote interface class, and that is the class to which you should cast the results. Remember that it is the EJB container (Orion) which calls your EJB methods, not the client. Orion receives your String collection and uses it to create a collection of EJBs which are returned to the client code. - Original Message - From: "Permjeet Pandha" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Tuesday, April 03, 2001 8:53 AM Subject: Returning Collections from ejbFindXXX() > Hi, > > Has anyone tried to return Collections from a BMP ejbFindAll() type of > operation? > > I return an ArrayList of String objects, the client receives this list ok > but gets a cast exception on trying to extract the String from the list. eg. > > public Collection ejbFindAll() throws java.rmi.RemoteException, > javax.ejb.FinderException > { > ArrayList v = new ArrayList(); > v.add("First"); > v.add("Second"); > return v; > } > > and the client code: > > Collection coll = home.findAll(); > System.out.println(coll.size() + coll.toString()); // this shows > correct count and contents: "2[First, Second]" > Iterator iterator = coll.iterator(); > while(iterator.hasNext()) > { > String s = (String)iterator.next();// class cast exception > System.out.println("Desc=" + s); > } > > On closer inspection with a debugger it turns out the objects in the list > are of class __Proxy5, some sort of orion proxy object. > > This appears to be a bug but I'd like to be sure in case its me. Has anyone > done this successfully? > > I'm using orion 1.4.5, I cannot seem to upgrade with autoupdate due to > (probably) firewall restrictions. > > TIA > > Permjeet > > >
Re: ejb-jar file location
Thanks. I got it going by copying one of the demo applications. That's OK since I'm eventually going to build a web application, although it does seem like I should be able to deploy an individual EJB without having to set up an entire application hierarchy. Connecting to an EJB from a Java client (not a servlet, and not in a jar file) was also difficult to figure out. My opinion of Orion is that it could use some better documentation and tutorials, the ones they provide are very narrowly-focused on producing a specific type of web application, and don't address the numerous other ways that people can use EJBs. - Original Message - From: "Ashok Banerjee" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Saturday, March 31, 2001 6:02 PM Subject: Re: ejb-jar file location > Put the ear file path or directory path in orion/config/server.xml. > This will enable orion to find your server class. > > Now for the client to find it use application.xml and orion-application.xml. > These files are under META-INF just below client root directory. > > If orion server is in a remote box modify jndi.properties accordingly. > > Cheers, > Ash > > Frank LaRosa wrote: > > > Hi, > > > > I'm just getting started with Orion, but I have experience with Weblogic > > server. > > > > I created a simple EJB jar file which I'd like to deploy on Orion and access > > via an external client. I'm stuck trying to figure out where I need to place > > my jar file in the server's directory structure and which, if any, of the > > configuration files I need to update to let Orion know it's there. > > > > I tried a variety of locations, but all I am able to get is a JNDI not-found > > error when I try to look up the home interface. I am not even sure where I > > specify the JNDI name? In Weblogic this is done through a weblogic-specific > > deployment file. > > > > Thanks. > >
ejb-jar file location
Hi, I'm just getting started with Orion, but I have experience with Weblogic server. I created a simple EJB jar file which I'd like to deploy on Orion and access via an external client. I'm stuck trying to figure out where I need to place my jar file in the server's directory structure and which, if any, of the configuration files I need to update to let Orion know it's there. I tried a variety of locations, but all I am able to get is a JNDI not-found error when I try to look up the home interface. I am not even sure where I specify the JNDI name? In Weblogic this is done through a weblogic-specific deployment file. Thanks.