RE: Detail logging? Is it possible (System.error.println - where do i t go to in Orion)
You can redirect System.err output to a file by starting orion like this; java -jar orion.jar -err log\err.log What I have found though is that Orion doesn't seem to be a verbose mode to run orion in and when debugging jsps if you haven't setup an errorpage correctly errors that are generated are not outputed to anything. A verbose mode would be quite helpful for debugging. Pete. RAD Systems Ltd www.rad.co.nz -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kurt Hoyt Sent: Wednesday, September 13, 2000 3:33 PM To: Orion-Interest Subject: RE: Detail logging? Is it possible (System.error.println - where do i t go to in Orion) System.err.println should print messages out to the shell or DOS window that you used to run the orion.jar file. You could redirect that output to a file if you want to save it: java -jar orion.jar > orion.out Kurt in Atlanta >-Original Message- >From: Richard Landon [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, September 12, 2000 9:43 PM >To: Orion-Interest >Subject: Detail logging? Is it possible (System.error.println >- where do >i t go to in Orion) > > > >After a week (and a week-end) trying to bring our smoke-tests up under >Orion, >I finally got the unit-test stuff executing. However, these >fail. All I see >in any of the Orion logs, is, well nothing. Is there any means to have >the server give me some kind of indication of why it isn't working? >Perhaps if I knew what it's problem with the code was, I could change >it (although I pretty much deployed the same code on 7, and >counting, other >J2EE servers at this point). > >The J2EE RI has a -verbose option, that tell's you various things. >When using the RI a System.error.println with a EJB writes >output to the >obvious place, standard error. I don't see this working? > >I'm probably confused. > > > > >
Re: Run Orion on port80 without being root?
This _is_ a great idea and i considered something like it before, the only problem is that we are deploying on Solaris. sach On Tue, 12 Sep 2000, Brian Beaulieu wrote: > My solution seems to be working so far. > > I have Orion running as an arbitrary user bound to port 8000 > > I'm redirecting with ipchains all requests to port 80 to port 8000 with: > > ipchains -A input -p tcp -s 0/0 -d 0/0 80 -j REDIRECT 8000 > > The logs show the originating host since I'm not masquerading - this is > obviously very important. I haven't run into a problem yet.. I'll try > to break it and report here if I do. > > Regards, > > Brian > > Sach Jobb wrote: > > > > Thanks guys, > > > > This sums up everything pretty well: > > http://www.orionsupport.com/users.html > > > > The root of the problem (pun intended) is here: > > > > "Java, however, has no concept of a user, because Java is cross-platform > > and some platforms don't have any real user (such as Win98, which uses the > > term "user" very loosely.)" > > > > cheers, > > sach > > > > %s/windows/linux/g > > > > On Tue, 12 Sep 2000, Brian Beaulieu wrote: > > > > > I tried this (had to recompile the library though). > > > > > > It says it's running it as user 'nobody' however all processes are > > > stilled owned by nobody. When I attempt to create a directory '/blah' > > > (shouldn't be able to), it works. I have to find a way to do this. > > > I'm going to try running orion on a port > 1024 and do port forwarding > > > but that might cause some issues with advanced functionality. I'll look > > > at the JINI library to see if I can find the problem and do some more > > > debugging. Are there any other solutions out there? > > > > > > Regards, > > > > > > Brian > > > > > > Markus Holmberg wrote: > > > > > > > > On Mon, Sep 11, 2000 at 11:11:57AM -0700, Sach Jobb wrote: > > > > > Has anyone found a way of running Orion on port80 without being root? > > > > > > > > > > I'm getting ready to launch a finance based site and i'm quite concerned > > > > > about security. I've seen messages like this posted before but i have yet > > > > > to see any kind of resolution. Any ideas? > > > > > > > > Changing Orion's uid using JNI: > > > > > > > > http://www.orionsupport.com/users.html > > > > > > > > Markus > > > > > > > > -- > > > > > > > > Markus Holmberg | Give me Unix or give me a typewriter. > > > > [EMAIL PROTECTED] | http://www.freebsd.org/ > > > >
RE: Detail logging? Is it possible (System.error.println - where do i t go to in Orion)
System.err.println should print messages out to the shell or DOS window that you used to run the orion.jar file. You could redirect that output to a file if you want to save it: java -jar orion.jar > orion.out Kurt in Atlanta >-Original Message- >From: Richard Landon [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, September 12, 2000 9:43 PM >To: Orion-Interest >Subject: Detail logging? Is it possible (System.error.println >- where do >i t go to in Orion) > > > >After a week (and a week-end) trying to bring our smoke-tests up under >Orion, >I finally got the unit-test stuff executing. However, these >fail. All I see >in any of the Orion logs, is, well nothing. Is there any means to have >the server give me some kind of indication of why it isn't working? >Perhaps if I knew what it's problem with the code was, I could change >it (although I pretty much deployed the same code on 7, and >counting, other >J2EE servers at this point). > >The J2EE RI has a -verbose option, that tell's you various things. >When using the RI a System.error.println with a EJB writes >output to the >obvious place, standard error. I don't see this working? > >I'm probably confused. > > > > >
Re: []
Luk <[EMAIL PROTECTED]> wrote: unsubscribe Yes, i want to unsubscribe my account here as an orion-interest. Cause i havent used this lang. before and i dont have any idea what an orion is? Sorry for logging in. Its just happened that i surf on the net. And try to be part of egroups. I dont have any training regarding orion. I'll be glad if u will share it to me. What an orion really is? Thanks. Melanie Get free email and a permanent address at http://www.netaddress.com/?N=1
Detail logging? Is it possible (System.error.println - where do it go to in Orion)
After a week (and a week-end) trying to bring our smoke-tests up under Orion, I finally got the unit-test stuff executing. However, these fail. All I see in any of the Orion logs, is, well nothing. Is there any means to have the server give me some kind of indication of why it isn't working? Perhaps if I knew what it's problem with the code was, I could change it (although I pretty much deployed the same code on 7, and counting, other J2EE servers at this point). The J2EE RI has a -verbose option, that tell's you various things. When using the RI a System.error.println with a EJB writes output to the obvious place, standard error. I don't see this working? I'm probably confused.
RE: Detail logging? Is it possible (System.error.println - where do it go to in Orion)
-Original Message- From: Richard Landon Sent: Tuesday, September 12, 2000 6:50 PM To: 'Orion-Interest' Subject: Detail logging? Is it possible (System.error.println - where do it go to in Orion) After a week (and a week-end) trying to bring our smoke-tests up under Orion, I finally got the unit-test stuff executing. However, these fail. All I see in any of the Orion logs, is, well nothing. Is there any means to have the server give me some kind of indication of why it isn't working? Perhaps if I knew what it's problem with the code was, I could change it (although I pretty much deployed the same code on 7, and counting, other J2EE servers at this point). The J2EE RI has a -verbose option, that tell's you various things. When using the RI a System.error.println with a EJB writes output to the obvious place, standard error. I don't see this working? I'm probably confused.
RE: Disable CMP
I'm interested in the tool once you get it to alpha or somewhere there. I've not had much luck with this server so far. Then again, hope springs eternal. -Original Message- From: John Barrett [mailto:[EMAIL PROTECTED]] Sent: Monday, September 11, 2000 7:35 AM To: Orion-Interest Subject: Re: Disable CMP I'm working with the folks at Mousetech to put together a version of EJBWizard that will work with many appservers, including Orion. I'm attaching a sample Entity object for Orion that I've created with the wizard. It uses Ant as the build tool and might help you understand better how it all fits together. The sample is not complete, I havent gotten the test website files completely integrated, nor the test server setup XMLs. The intention is to have the wizard create a complete stand alone Orion config that can be run to test the EJB. If anyone has suggestions how I could better configure the wizard templates to accomplish this, I'd appreciate it :)) - Original Message - From: Roger Mosher <[EMAIL PROTECTED]> To: Orion-Interest <[EMAIL PROTECTED]> Sent: Friday, September 08, 2000 6:39 AM Subject: Re: Disable CMP > Arved. > Would it be too much to ask for us to have a look at one of your ant > build scripts? Being very new at this I am still awash with trying to > figure out how all the parts fit together. > > Yes the J2EE deploy tool was easier to use... until the day it decided > to start generating null pointer exceptions on start up. I knew I was going > to have to look around for a commercial application server someday anyway so > that seemed like a good day. > > Orion could use a good tutorial taking someone through the set up > process, but that's a lot of work to put together. > > Thanks > -- > %%% > Roger Mosher eMail: [EMAIL PROTECTED] > Center of Geographic Sciences phone: (902)825-5230 > 50 Elliott Roadfax: > (902)825-6733 > Lawrencetown, N.S. > Canadaweb: http://www.cogs.nscc.ns.ca/ > B0S 1M0 > %%% > > - Original Message - > From: "Arved Sandstrom" <[EMAIL PROTECTED]> > To: "Orion-Interest" <[EMAIL PROTECTED]> > Sent: Thursday, September 07, 2000 7:57 PM > Subject: RE: Disable CMP > > > > Sometimes it's easy to forget exactly what it is that J2EE provides for > us. > > :-) > > > > In this case it's not an Orion issue. Declare the entity bean to be > > bean-managed persistence using the tag in the > EJB > > deployment descriptor. All straight J2EE spec. > > > > I haven't used earassembler but I've used ejbmaker and ejbassembler to > > generate stubs and then tailor the deployment descriptor, respectively and > > in that order, just for experiment. They worked quite well. I imagine > > earassembler is more of the same. In practise I've found a good Ant build > > script and manual D.D. editing to be the way to go. > > > > Arved Sandstrom > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of > > [EMAIL PROTECTED] > > Sent: Thursday, September 07, 2000 3:56 PM > > To: Orion-Interest > > Subject: Disable CMP > > > > > > Greeting > > > > I want to use Orion with my ejb without CMP. > > 1.)How could I configure Orion in order to use ejb without CMP ? > > 2.)How could I genarate > > 3.)How could I use ejbassembler ? > > 4.)How could I use earassembler ? > > > > Thank you very much > > > > > > > > > > > > > > > > ___ > > Say Bye to Slow Internet! > > http://www.home.com/xinbox/signup.html > > > > > > > > > > >
-secure flag
(BTW.. My issue about starting orion as a non-root user on port 80 was resolved when I changed to jdk1.2.2 on Linux. 1.3 spawns 10 children and when you use -Dnative.user=nobody, only 1 of those 10 is owned by nobody. This wasn't stopping someone from modifying the filesystem in a way they shouldn't be. I don't know if this should be documented somewhere.. The problem exists under JDK1.3 both Sun and IBM's.) My existing problem is starting orion with the -secure flag. I've tried a few things.. one was: grant codeBase "file:/opt/orion/-" { permission java.security.AllPermission; }; in java.policy. This gets it going.. but then I have problems with JSPWriter .. can anyone give me specific instructions/ I understand this is an undocumented feature of orion however it's needed in my environment. (Unless someone knows another way to prevent System.exit(0);) TIA, Brian
How to enable validating XML Parser?
Hello, all. I'm currently working with JSPs that generate XML which are then translated to HTML by Orion using a separate XSL file. All is well and good. Wonderful functionality. In creating the XML files and the DTDs... it seems that Orion is not validating the XML structure at all... whether a DTD is specified.. not specified.. openly ignored or broken doesn't seem to make a difference. My question : Can I force Orion to Validate my XML for me? It lets me know whether it is well-formed.. but not whether it is valid. Thanks. Dylan Parker
RE: Specifying finder-methods (full query)
At 08:57 PM 9/12/00 +0200, you wrote: >Thanks for the reaction (also Nick). I realize now the potential security >problems by allowing full >specification of SQL on the client. > >Unfortunately the "Bob" example does not solve my problem. I managed to >implement that example. >That is where I came from. From there I tried to continue to implement a >Query By Example frame and >that's where I got stuck. > >Something like this: >Say you have a table with products and you would like to create a flexible >query frame for those >products to run queries like all products for which the stock is low and >which are purchased from comp >xyz, or all products from categorie abc with names like %nic%. > >With specifying the query in orion-ejb-jar I came as far as either >specifying a fixed name / number or >you can use another fixed operator, e.g. '>' or LIKE. Due to generated the >quotes I could not let the client >generate the selection part of the where clause. You get roughly the same >error as when generating the >whole statement. > >Probably you can write some ?Session? Bean that will query direct on the >database returning a collection >of primary keys, but for some reason that does not sound like music to me. Hi Frank, I apologise that my earlier reply was a bit off the mark. I hadn't read the whole email carefully enough to realize exactly what it was that you wanted to do. So far as I know, the accepted solution to your problem is exactly the one you tend to reject; using a stateless session bean to perform the direct SQL queries for you. I agree that this sounds a little unsatisfactory. After all, shouldn't the entity bean do everything to do with the entities? A slightly more elegant solution may arrive when EJB 2.0 is fully implemented. In EJB 2.0 the home interface of an EJB can also define arbitrary (non-finder, non-create) methods. That may be a more logical place to put a home-grown finder perhaps? Nick
Re: Run Orion on port80 without being root?
My solution seems to be working so far. I have Orion running as an arbitrary user bound to port 8000 I'm redirecting with ipchains all requests to port 80 to port 8000 with: ipchains -A input -p tcp -s 0/0 -d 0/0 80 -j REDIRECT 8000 The logs show the originating host since I'm not masquerading - this is obviously very important. I haven't run into a problem yet.. I'll try to break it and report here if I do. Regards, Brian Sach Jobb wrote: > > Thanks guys, > > This sums up everything pretty well: > http://www.orionsupport.com/users.html > > The root of the problem (pun intended) is here: > > "Java, however, has no concept of a user, because Java is cross-platform > and some platforms don't have any real user (such as Win98, which uses the > term "user" very loosely.)" > > cheers, > sach > > %s/windows/linux/g > > On Tue, 12 Sep 2000, Brian Beaulieu wrote: > > > I tried this (had to recompile the library though). > > > > It says it's running it as user 'nobody' however all processes are > > stilled owned by nobody. When I attempt to create a directory '/blah' > > (shouldn't be able to), it works. I have to find a way to do this. > > I'm going to try running orion on a port > 1024 and do port forwarding > > but that might cause some issues with advanced functionality. I'll look > > at the JINI library to see if I can find the problem and do some more > > debugging. Are there any other solutions out there? > > > > Regards, > > > > Brian > > > > Markus Holmberg wrote: > > > > > > On Mon, Sep 11, 2000 at 11:11:57AM -0700, Sach Jobb wrote: > > > > Has anyone found a way of running Orion on port80 without being root? > > > > > > > > I'm getting ready to launch a finance based site and i'm quite concerned > > > > about security. I've seen messages like this posted before but i have yet > > > > to see any kind of resolution. Any ideas? > > > > > > Changing Orion's uid using JNI: > > > > > > http://www.orionsupport.com/users.html > > > > > > Markus > > > > > > -- > > > > > > Markus Holmberg | Give me Unix or give me a typewriter. > > > [EMAIL PROTECTED] | http://www.freebsd.org/ > >
RE: Specifying finder-methods (full query)
Thanks for the reaction (also Nick). I realize now the potential security problems by allowing full specification of SQL on the client. Unfortunately the "Bob" example does not solve my problem. I managed to implement that example. That is where I came from. From there I tried to continue to implement a Query By Example frame and that's where I got stuck. Something like this: Say you have a table with products and you would like to create a flexible query frame for those products to run queries like all products for which the stock is low and which are purchased from comp xyz, or all products from categorie abc with names like %nic%. With specifying the query in orion-ejb-jar I came as far as either specifying a fixed name / number or you can use another fixed operator, e.g. '>' or LIKE. Due to generated the quotes I could not let the client generate the selection part of the where clause. You get roughly the same error as when generating the whole statement. Probably you can write some ?Session? Bean that will query direct on the database returning a collection of primary keys, but for some reason that does not sound like music to me. Frank On Tuesday, September 12, 2000 6:16 PM, Joe Walnes [SMTP:[EMAIL PROTECTED]] wrote: > Frank, > > The actual SQL for query should be within the deployment descriptor and not > the client code. > > So, if you wanted to find all MyProducts by a particular name, > orion-ejb-jar.xml would contain: > > > > And the client code would contain: > > ...findByName("Bob") > > It is not possible to pass SQL statements from the client to the finder > method at runtime when using CMP as PreparedStatements are created in > advance. Allowing this would impact performance, breach security and allow > all havoc to break out. > > -Joe Walnes > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of Frank Eggink > > Sent: 12 September 2000 16:06 > > To: Orion-Interest > > Subject: Specifying finder-methods (full query) > > > > > > I'm running into trouble specifying finder queries in > > orion-ejb-jar. As far > > as I can make sense of it the cause is in the quotes. Is that correct and > > does anyone know how the get around that? > > > > > > I've changed the default finder method to: > > > > > > > > > > MyProduct > > findByName > > > > > > java.lang.String > > > > > > > > > > > > I call the method in my client with: > > > > ...findByName("select id, name, description, price from MyProduct"); > > > > > > The following is the resulting output: > > > > Printing a list of all products: System/communication error: Database > > error: Unexpected token: 'select id, name, description, price from > > MyProduct in statement ['select id, name, description, price from > > MyProduct']; nested exception is: > > java.sql.SQLException: Unexpected token: 'select id, name, > > description, > > price from MyProduct in statement ['select id, name, description, price > > from MyProduct'] Process Exit... > > > > > > The database is hsql. > > > > > > Thanks, Frank > > > > > > > >
Default log format?
Hi all. I would like to specify a default log format for my sites instead of putting the same (complex) format in each of my web-site.xml files. Is there any place I can do this? I am talking specifically about the tag in web-site.xml. Thanks! -- Jason von Nieda 3Buddies.com
Remote start/stop/restart of web-app & server
Forgive me if this was already asked, but it seems like my last post did not make it to the mailing list. Anyway, from host 1 that has no Orion installed on it, is there a way to 1. start a web-application (make it available for requests) 2. stop a web-application 3. restart a web-application 4. stop the server 5. restart the server on host 2? >From what I can tell, it seems like the only way to do #4 & #5 is by installing admin.jar on host 1 and calling it by commandline "java -jar admin.jar ". I see no way for #1 - #3. I can do #1 - #3 locally by modifying the XML config files, but, again, I need to do it from remote. Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
RE: OR mapping of table joins for CMP
Title: RE: OR mapping of table joins for CMP I would seriously consider going into EJB 2.0 directly, as OR-mapping os so much neater there. There is tutorials coming up on the sites listed by Joe below, or you could have a look at the EJB 2.0 example called ATM. But afaik, there is no UML tool that can produce EJB 2.0 entities or descriptors out yet (if someone knows of one, please tell the list). WR > -Original Message- > From: Joe Walnes [mailto:[EMAIL PROTECTED]] > Sent: den 12 september 2000 18:13 > To: Orion-Interest > Subject: RE: OR mapping of table joins for CMP > > > > > I would like to learn HOW I can learn this. :) I know nothing of > > CMP and O/R > > at this point, so where do I start learning? I can't just load up > > Orion and > > blindly code this stuff..is there a good book on CMP and > O/R with EJBs? I > > realize each vendor has their own implementation of how CMP > works, but I > > would like to know more about it. > > Kevin, I recommend the O'Reilly Enterprise JavaBeans 2nd > Edition book. It > explains the concepts well and has some simple examples. > > The OR features are an added feature in Orion, so it is rare > to find a book > that addresses this. I would recommend getting up to speed on > basic CMP > first, then have a look at some of the documentation around > www.orionserver.com and www.orionsupport.com. There really > isn't all that > much to OR mapping once you've grasped CMP. > > > > One thing that caught my eye, from what you said, it sounds > like you don't > > create database tables from a special tool, then write SQL > and other stuff > > to insert, remove, update and search? Is this the case with O/R > > and CMP? Do > > you define an entity bean class, and the app server automatically > > generates > > a table for you in the database? > > This is correct. Orion generates a table and uses a naming > convention that > relates to the EJB name and properties. If you are not happy > with what it > produces, you can change the deployment configuration to > suite your needs > (eg: database object names, column types, mapping styles). > > >If that is the case, how exactly > > does it do > > this for any database type? I am using Interbase 6.0 at > home, and the SQL > > for Interbase (mainly the data types) is different than that of > > Oracle. I do > > see the /config/datasource dir that maps various database > data types..so I > > am going to take a wild guess and assume Orion uses the > > information in there > > for its mappings. > > Yup. If you're database isn't there it's painless to create a suitable > configuration file for the specific mappings. > > > Anyways, I would like to buy a book, or see some online > tutorials on how > > this all works, and how I can use it. Also, do modeling > tools (UML) work > > with CMP and O/R for you? Is it as easy as making some diagrams that > > describe the database table(s) and it writes the entity > bean for you? > > Tricky one. In theory it should be but in practise it's not so easy. > Essentially you model in components and objects rather than > tables so UML is > well suited. However there are some restictions - most > noteably inheritance > (discussed in archives on this list and the Sun EJB-Interest > list). There > are ways around this restriction though although they may not > always be as > elegant as you would like. However, most of your database OR > mapping needs > are catered for by Orion and you can model complicated object > models with > ease if you are willing to tinker. > > There are UML modelling tools available that can generate > objects and EJB's > from UML diagrams - I use Together Enterprise 4. I'm sure > there are many > others and it's a matter of taste, but I would recommend you > get confident > with generating the EJB's by hand at first before letting a > modelling tool > take over. > > While in most cases the idea of CMP Entities is what lures > people towards > EJB, you will find that there are a lot more features than just a > persistence layer and generally more scalable apps can be > developed in less > time whilst only worrying about the proposed functionality of > the app - > issues such as security, integrity, performance, caching, etc > are problems > you no longer need to worry about - let the EJB container > sort these out. > > -Joe Walnes > >
RE: OR mapping of table joins for CMP
Get Richard Monson-Haefel's book "Enterprise Java Beans". It explains things pretty well. The whole point of CMP is that you don't know (or aren't supposed to know or care) how the EJB server stores your EJBs in the database. The folks who wrote the EJB server are supposed to have studied O/R mapping issues, chosen their approach, and implemented it. Then, they can compete on speed, ease-of-use, GUI tools etc. Some vendors have even put in hooks to allow O/R mapping tool makers to put their O/R mapping engines into their EJB server to give you choices about which vendor does the CMP for you. For now, you do care how this happens because the EJB server developers may not have chosen the approach that best fits your project. Plus, you really can't make a pure OO model with entity beans because the spec writers chose not to deal with the issue of component inheritance (because it's hard and contentious and some vendor's approach would lose, costing that vendor a lot of money). By the way, PowerTier does do component inheritance, and it's such a seductive feature that it almost guarantees vendor lock-in. Each EJB is logically one class. To implement the class, you need a couple interfaces and a class or two to describe your class since the EJB model can't just take your one class and expose it's public methods and attributes via RMI (which is how COM worked with Java and was a great idea -- too bad it didn't make it into the real Java world). Plus, there's all those object factory issues Inheritance aside, with CMP you create your component model (without inheritance), do the right thing with the ejb-jar.xml file, package it all up in a jar file and hand it to Orion (after getting all the various configuration XML files right :-) and a database magically appears. It really is that simple. But it can be hard to wrap your brain around if you're used to writing SQL yourself. If you have an existing data model that you must support, and you don't want to use BMP, then you need to figure out how to "reverse engineer" it into an orion-ejb-jar.xml file. However, you should understand that most EJB servers use a "table-per-class" model for doing the persistence (something else that hinders inheritance). Each component will be in its own table and no joins are permitted other than those you can do implicitly by using attributes of the various Collection classes in your bean. For example, having a List object inside your bean results in a table being created to handle the one-to-many relationship between your bean class and the class being stored in the list. But the CMP engine manages all that for you. But, you are limited to the data models that the CMP engine understands (table-per-class, period). The EJB 2.0 spec really improves the CMP side of things with its additions to the ejb-jar.xml DTD that allow you to give better hints to the CMP engine about how your classes are related and stored in the database. You should get the draft EJB 2.0 spec (which I think comes with the Orion docs) and read it. It's not as dry as it could be. Kurt in Atlanta >-Original Message- >From: Kevin Duffey [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, September 12, 2000 11:18 AM >To: Orion-Interest >Subject: RE: OR mapping of table joins for CMP > > >Hi, > >This is to Nick, and anyone else that can shed some light.. > >> If you did this you would find that Orion would auto-create >> tables that are >> basically identical in form to those that you have, but probably with >> different names. If you now go into the orion-ejb.xml file >that orion >> generates you can change the table and column names to those that you >> already have. When you have done this, you have the two tables linked >> transparently by Orion. Just asking for a Person will automatically >> retrieve the Job, and from that you can retrieve the job_description. > >I would like to learn HOW I can learn this. :) I know nothing >of CMP and O/R >at this point, so where do I start learning? I can't just load >up Orion and >blindly code this stuff..is there a good book on CMP and O/R >with EJBs? I >realize each vendor has their own implementation of how CMP >works, but I >would like to know more about it. > >One thing that caught my eye, from what you said, it sounds >like you don't >create database tables from a special tool, then write SQL and >other stuff >to insert, remove, update and search? Is this the case with >O/R and CMP? Do >you define an entity bean class, and the app server >automatically generates >a table for you in the database? If that is the case, how >exactly does it do >this for any database type? I am using Interbase 6.0 at home, >and the SQL >for Interbase (mainly the data types) is different than that >of Oracle. I do >see the /config/datasource dir that maps various database data >types..so I >am going to take a wild guess and assume Orion uses the >information in there >for its mappings. > >Anyways, I would like to buy
Re: Run Orion on port80 without being root?
Thanks guys, This sums up everything pretty well: http://www.orionsupport.com/users.html The root of the problem (pun intended) is here: "Java, however, has no concept of a user, because Java is cross-platform and some platforms don't have any real user (such as Win98, which uses the term "user" very loosely.)" cheers, sach %s/windows/linux/g On Tue, 12 Sep 2000, Brian Beaulieu wrote: > I tried this (had to recompile the library though). > > It says it's running it as user 'nobody' however all processes are > stilled owned by nobody. When I attempt to create a directory '/blah' > (shouldn't be able to), it works. I have to find a way to do this. > I'm going to try running orion on a port > 1024 and do port forwarding > but that might cause some issues with advanced functionality. I'll look > at the JINI library to see if I can find the problem and do some more > debugging. Are there any other solutions out there? > > Regards, > > Brian > > Markus Holmberg wrote: > > > > On Mon, Sep 11, 2000 at 11:11:57AM -0700, Sach Jobb wrote: > > > Has anyone found a way of running Orion on port80 without being root? > > > > > > I'm getting ready to launch a finance based site and i'm quite concerned > > > about security. I've seen messages like this posted before but i have yet > > > to see any kind of resolution. Any ideas? > > > > Changing Orion's uid using JNI: > > > > http://www.orionsupport.com/users.html > > > > Markus > > > > -- > > > > Markus Holmberg | Give me Unix or give me a typewriter. > > [EMAIL PROTECTED] | http://www.freebsd.org/ >
RE: OR mapping of table joins for CMP
>One thing that caught my eye, from what you said, it sounds like you don't >create database tables from a special tool, then write SQL and other stuff >to insert, remove, update and search? Is this the case with O/R and CMP? Do >you define an entity bean class, and the app server automatically generates >a table for you in the database? If that is the case, how exactly does it do >this for any database type? I am using Interbase 6.0 at home, and the SQL >for Interbase (mainly the data types) is different than that of Oracle. I do >see the /config/datasource dir that maps various database data types..so I >am going to take a wild guess and assume Orion uses the information in there >for its mappings. The orion server can certainly make the tables that it requires for an entity bean, and in my experience that seems to be the simplest way of discovering exactly what type of tables it wants. With CMP you don't (generally) write code to insert, remove, or update. You change the fields in the entity, and it manages the changes in the database for you - just how is its own business. For searching using a finder method from a home interface, the SQL may have to be hand-written. If so, it is in the orion-ejb-jar.xml file. If you allow orion to create its own tables, the data types it uses come from a file in the orion/config/database-schemas directory. You specify which file using the "schema" attribute in the data-sources.xml file. As for differences in the SQL itself, my understanding is that much of that is handled by the JDBC driver for the database, so long as you (or orion) use the appropriate JDBC functionality. Nick
Re: Orion-Interest subscription notification
Hello, We have recently spent considerable amount of time trying to configure two orion servers to test our distributed application, - in the absene of documentation from the orion server itself, it proved very inefficient and frustrating. After communicating with other developers, we managed it and prepared documentation for internal use. I have attached this documentation for anyone interested and it can be used for any purpose. But there are issues I really need some explanation: - Why do we have to deploy the EJB module on both servers? I would think all we need on the client site is the home and remote interfaces for the EJBs, because the stubs implement them anyway. - Why do we have to configure remote.xml to specify the remote server? We already use the JNDI details to request the EJB stubs from the remote server. I would appreciate any comment on the above questions and attached documentation. Bulent _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com. Setting Two Orion Servers.doc
RE: Run Orion on port80 without being root?
With respect to port forwarding. I don't see why this should be a problem. Ipchains for instance on Linux would work transparant. A Quote from the IPCHAINS-HOWTO: The other major special target is REDIRECT which tells the kernel to send a packet to a local port instead of wherever it was heading. This can only be specified for rules specifying TCP or UDP as their protocol. Optionally, a port (name or number) can be specified following `-j REDIRECT' which will cause the packet to be redirected to that particular port, even if it was addressed to another port. This target is only valid for packets traversing the input chain. Packages received for port 80 on system "abc" can be forwarded to port 1234 on system "xyz". Where "abc" and "xyz" can be the same machines. This could be a solution. I guess none Lunix systems have other tools for specifying Network Address Translation (NAT). I even would expect a lot of firewalls can do the trick for you. Making the security setup even more fancy. Frank On Tuesday, September 12, 2000 4:11 PM, Brian Beaulieu [SMTP:[EMAIL PROTECTED]] wrote: > I tried this (had to recompile the library though). > > It says it's running it as user 'nobody' however all processes are > stilled owned by nobody. When I attempt to create a directory '/blah' > (shouldn't be able to), it works. I have to find a way to do this. > I'm going to try running orion on a port > 1024 and do port forwarding > but that might cause some issues with advanced functionality. I'll look > at the JINI library to see if I can find the problem and do some more > debugging. Are there any other solutions out there? > > Regards, > > Brian > > Markus Holmberg wrote: > > > > On Mon, Sep 11, 2000 at 11:11:57AM -0700, Sach Jobb wrote: > > > Has anyone found a way of running Orion on port80 without being root? > > > > > > I'm getting ready to launch a finance based site and i'm quite concerned > > > about security. I've seen messages like this posted before but i have yet > > > to see any kind of resolution. Any ideas? > > > > Changing Orion's uid using JNI: > > > > http://www.orionsupport.com/users.html > > > > Markus > > > > -- > > > > Markus Holmberg | Give me Unix or give me a typewriter. > > [EMAIL PROTECTED] | http://www.freebsd.org/ >
RE: Specifying finder-methods (full query)
Frank, The actual SQL for query should be within the deployment descriptor and not the client code. So, if you wanted to find all MyProducts by a particular name, orion-ejb-jar.xml would contain: And the client code would contain: ...findByName("Bob") It is not possible to pass SQL statements from the client to the finder method at runtime when using CMP as PreparedStatements are created in advance. Allowing this would impact performance, breach security and allow all havoc to break out. -Joe Walnes > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Frank Eggink > Sent: 12 September 2000 16:06 > To: Orion-Interest > Subject: Specifying finder-methods (full query) > > > I'm running into trouble specifying finder queries in > orion-ejb-jar. As far > as I can make sense of it the cause is in the quotes. Is that correct and > does anyone know how the get around that? > > > I've changed the default finder method to: > > > > > MyProduct > findByName > > > java.lang.String > > > > > > I call the method in my client with: > > ...findByName("select id, name, description, price from MyProduct"); > > > The following is the resulting output: > > Printing a list of all products: System/communication error: Database > error: Unexpected token: 'select id, name, description, price from > MyProduct in statement ['select id, name, description, price from > MyProduct']; nested exception is: > java.sql.SQLException: Unexpected token: 'select id, name, > description, > price from MyProduct in statement ['select id, name, description, price > from MyProduct'] Process Exit... > > > The database is hsql. > > > Thanks, Frank > > >
RE: OR mapping of table joins for CMP
> I would like to learn HOW I can learn this. :) I know nothing of > CMP and O/R > at this point, so where do I start learning? I can't just load up > Orion and > blindly code this stuff..is there a good book on CMP and O/R with EJBs? I > realize each vendor has their own implementation of how CMP works, but I > would like to know more about it. Kevin, I recommend the O'Reilly Enterprise JavaBeans 2nd Edition book. It explains the concepts well and has some simple examples. The OR features are an added feature in Orion, so it is rare to find a book that addresses this. I would recommend getting up to speed on basic CMP first, then have a look at some of the documentation around www.orionserver.com and www.orionsupport.com. There really isn't all that much to OR mapping once you've grasped CMP. > One thing that caught my eye, from what you said, it sounds like you don't > create database tables from a special tool, then write SQL and other stuff > to insert, remove, update and search? Is this the case with O/R > and CMP? Do > you define an entity bean class, and the app server automatically > generates > a table for you in the database? This is correct. Orion generates a table and uses a naming convention that relates to the EJB name and properties. If you are not happy with what it produces, you can change the deployment configuration to suite your needs (eg: database object names, column types, mapping styles). >If that is the case, how exactly > does it do > this for any database type? I am using Interbase 6.0 at home, and the SQL > for Interbase (mainly the data types) is different than that of > Oracle. I do > see the /config/datasource dir that maps various database data types..so I > am going to take a wild guess and assume Orion uses the > information in there > for its mappings. Yup. If you're database isn't there it's painless to create a suitable configuration file for the specific mappings. > Anyways, I would like to buy a book, or see some online tutorials on how > this all works, and how I can use it. Also, do modeling tools (UML) work > with CMP and O/R for you? Is it as easy as making some diagrams that > describe the database table(s) and it writes the entity bean for you? Tricky one. In theory it should be but in practise it's not so easy. Essentially you model in components and objects rather than tables so UML is well suited. However there are some restictions - most noteably inheritance (discussed in archives on this list and the Sun EJB-Interest list). There are ways around this restriction though although they may not always be as elegant as you would like. However, most of your database OR mapping needs are catered for by Orion and you can model complicated object models with ease if you are willing to tinker. There are UML modelling tools available that can generate objects and EJB's from UML diagrams - I use Together Enterprise 4. I'm sure there are many others and it's a matter of taste, but I would recommend you get confident with generating the EJB's by hand at first before letting a modelling tool take over. While in most cases the idea of CMP Entities is what lures people towards EJB, you will find that there are a lot more features than just a persistence layer and generally more scalable apps can be developed in less time whilst only worrying about the proposed functionality of the app - issues such as security, integrity, performance, caching, etc are problems you no longer need to worry about - let the EJB container sort these out. -Joe Walnes
Re: Strange getAttribute behavior
Forgot to mention: Orion 1.2.9 Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-2815 (JIT enabled: jitc)) - Original Message - From: "Mattias Arbin" <[EMAIL PROTECTED]> To: "Orion-Interest" <[EMAIL PROTECTED]> Sent: Tuesday, September 12, 2000 4:29 PM Subject: Strange getAttribute behavior > Hi. > I have noticed strange behavior when storing objects in the HttpSession. > The code fragment below (from a servlet) sometimes prints out: > > This should never happen: class knut.servlet.SessionInfo > > How is this possible? > > /Regards > Mattias Arbin > > HttpSession session = req.getSession(true); > ... > knut.servlet.SessionInfo info = null; > Object o = session.getAttribute("sessionInfo"); > if (o!=null && (o instanceof knut.servlet.SessionInfo)) { > info = (knut.servlet.SessionInfo)o; > System.err.println("Got sessionInfo: "+info.getUserId()); > } > else { > System.err.println("No sessionInfo"); > if (o!=null) { > // This should never happen, but it obviously does. Is this a bug in > Orion? > System.err.println("This should never happen : > "+o.getClass().toString()); > } > } > >
RE: OR mapping of table joins for CMP
Hi, This is to Nick, and anyone else that can shed some light.. > If you did this you would find that Orion would auto-create > tables that are > basically identical in form to those that you have, but probably with > different names. If you now go into the orion-ejb.xml file that orion > generates you can change the table and column names to those that you > already have. When you have done this, you have the two tables linked > transparently by Orion. Just asking for a Person will automatically > retrieve the Job, and from that you can retrieve the job_description. I would like to learn HOW I can learn this. :) I know nothing of CMP and O/R at this point, so where do I start learning? I can't just load up Orion and blindly code this stuff..is there a good book on CMP and O/R with EJBs? I realize each vendor has their own implementation of how CMP works, but I would like to know more about it. One thing that caught my eye, from what you said, it sounds like you don't create database tables from a special tool, then write SQL and other stuff to insert, remove, update and search? Is this the case with O/R and CMP? Do you define an entity bean class, and the app server automatically generates a table for you in the database? If that is the case, how exactly does it do this for any database type? I am using Interbase 6.0 at home, and the SQL for Interbase (mainly the data types) is different than that of Oracle. I do see the /config/datasource dir that maps various database data types..so I am going to take a wild guess and assume Orion uses the information in there for its mappings. Anyways, I would like to buy a book, or see some online tutorials on how this all works, and how I can use it. Also, do modeling tools (UML) work with CMP and O/R for you? Is it as easy as making some diagrams that describe the database table(s) and it writes the entity bean for you? Thanks.
Specifying finder-methods (full query)
I'm running into trouble specifying finder queries in orion-ejb-jar. As far as I can make sense of it the cause is in the quotes. Is that correct and does anyone know how the get around that? I've changed the default finder method to: MyProduct findByName java.lang.String I call the method in my client with: ...findByName("select id, name, description, price from MyProduct"); The following is the resulting output: Printing a list of all products: System/communication error: Database error: Unexpected token: 'select id, name, description, price from MyProduct in statement ['select id, name, description, price from MyProduct']; nested exception is: java.sql.SQLException: Unexpected token: 'select id, name, description, price from MyProduct in statement ['select id, name, description, price from MyProduct'] Process Exit... The database is hsql. Thanks, Frank
Strange getAttribute behavior
Hi. I have noticed strange behavior when storing objects in the HttpSession. The code fragment below (from a servlet) sometimes prints out: This should never happen: class knut.servlet.SessionInfo How is this possible? /Regards Mattias Arbin HttpSession session = req.getSession(true); ... knut.servlet.SessionInfo info = null; Object o = session.getAttribute("sessionInfo"); if (o!=null && (o instanceof knut.servlet.SessionInfo)) { info = (knut.servlet.SessionInfo)o; System.err.println("Got sessionInfo: "+info.getUserId()); } else { System.err.println("No sessionInfo"); if (o!=null) { // This should never happen, but it obviously does. Is this a bug in Orion? System.err.println("This should never happen : "+o.getClass().toString()); } }
Re: Run Orion on port80 without being root?
I tried this (had to recompile the library though). It says it's running it as user 'nobody' however all processes are stilled owned by nobody. When I attempt to create a directory '/blah' (shouldn't be able to), it works. I have to find a way to do this. I'm going to try running orion on a port > 1024 and do port forwarding but that might cause some issues with advanced functionality. I'll look at the JINI library to see if I can find the problem and do some more debugging. Are there any other solutions out there? Regards, Brian Markus Holmberg wrote: > > On Mon, Sep 11, 2000 at 11:11:57AM -0700, Sach Jobb wrote: > > Has anyone found a way of running Orion on port80 without being root? > > > > I'm getting ready to launch a finance based site and i'm quite concerned > > about security. I've seen messages like this posted before but i have yet > > to see any kind of resolution. Any ideas? > > Changing Orion's uid using JNI: > > http://www.orionsupport.com/users.html > > Markus > > -- > > Markus Holmberg | Give me Unix or give me a typewriter. > [EMAIL PROTECTED] | http://www.freebsd.org/
No Subject
unsubscribe
Re: client factory problem!
Dude, - orion.jar - ejb.jar - jndi.jar - jaxp.jar - parser.jar - jdbc.jar - mail.jar You need to include all of them believe it or not, but orions team is working on the client.jar at the moment which will make this task easier :). java.naming.factory.initial=com.evermind.server.ApplicationClientInitial ContextFactory java.naming.provider.url=ormi://localhost/yourApp java.naming.security.principal=log java.naming.security.credentials=pass - Original Message - From: cuenot jerome <[EMAIL PROTECTED]> Date: Tuesday, September 12, 2000 7:42 pm Subject: client factory problem! > Hello all, > > I've got a problem : When I start a client class which connects to the > Orion Server, I haven't got the correct Factory class in the > jndi.properties of my JRE. > Moreover, I don't know which Orion classes implement the > InitialContextinterface. > > Jerome. >
client factory problem!
Hello all, I've got a problem : When I start a client class which connects to the Orion Server, I haven't got the correct Factory class in the jndi.properties of my JRE. Moreover, I don't know which Orion classes implement the InitialContext interface. Jerome. begin:vcard n:Cuenot;Jerome tel;fax:+33 (0)4.37.41.82.01 tel;work:+33 (0)4.37.41.82.63 x-mozilla-html:FALSE url:http://www.stellarx.com org:StellarX;R & D adr:;;56 Avenue du 11 Novembre 1918;Lyon Tassin Le Bourg;Rhone-Alpes;69160;France version:2.1 email;internet:[EMAIL PROTECTED] title:Ingénieur Développeur note:http://www.stellarx.com fn:Jerome Cuenot end:vcard
Extending application deployment with own code
I've been trying to figure out how to add some functionality to Orion's web-app deployment (such as creating required databasestructures and setting up application specific stuff). Instead of sending a multitude of little questions I just ask: how to do it right? It should configurable from application.xml (through init-params), so I need to get application context. It should be invoked automatically, which is done somehow with manifests, I suppose? Any references? Your experiences?
Re: Run Orion on port80 without being root?
Any Unix process trying to open a socket on a port below 1024 must be running as the root user. If you want to walk around this, simply you cann't! (sorry for the bad news) Sach Jobb wrote: > > Has anyone found a way of running Orion on port80 without being root? > > I'm getting ready to launch a finance based site and i'm quite concerned > about security. I've seen messages like this posted before but i have yet > to see any kind of resolution. Any ideas? > > cheers, > sach > > %s/windows/linux/g begin:vcard n:García López;Eduardo tel;cell:649.46.78.58 x-mozilla-html:TRUE org:FI2 adr:;; version:2.1 email;internet:[EMAIL PROTECTED] title:Director de Iniciativas de Comercio Electrónico. x-mozilla-cpt:;-26272 fn:Eduardo García López end:vcard S/MIME Cryptographic Signature
RE: Run Orion on port80 without being root?
you could have 2 servers (one on port 80 and one somewhere else) with the one on port 80 forwarding all requests to the other one. Maybe not the prettiest solution, but it might work. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Sach Jobb > Sent: Tuesday, September 12, 2000 09:00 > To: Orion-Interest > Subject: Re: Run Orion on port80 without being root? > > > Idealy that is what i'm looking for: basically having it start up as root > and then switching the process over to another user (like apache does). > > In our dev env this isn't a problem because they use non-priv ports, but > there's just something about seeing a billboard with an add like: > "come visit us at our new web site www.bigcompany.com:8092" > that just doesn't have quite the right ring to it. ;) > > What's the theory behind using the JNI code? I'm not familiar with it. > > > cheers, > sach > > %s/windows/linux/g > > > On Mon, 11 Sep 2000, John Barrett wrote: > > > In *nix systems, there isnt a solution except to startup as root and > > then change to another user/group, like Apache does. I dont think that > > Java has the ability to manipulate its UID/GID without JNI code. > > > > - Original Message - > > From: Sach Jobb <[EMAIL PROTECTED]> > > To: Orion-Interest <[EMAIL PROTECTED]> > > Sent: Monday, September 11, 2000 1:11 PM > > Subject: Run Orion on port80 without being root? > > > > > > > Has anyone found a way of running Orion on port80 without being root? > > > > > > I'm getting ready to launch a finance based site and i'm > quite concerned > > > about security. I've seen messages like this posted before > but i have yet > > > to see any kind of resolution. Any ideas? > > > > > > > > > cheers, > > > sach > > > > > > %s/windows/linux/g > > > > > > > > > > > > > > > > > > > > > > > > >
Re: Run Orion on port80 without being root?
On Mon, Sep 11, 2000 at 11:11:57AM -0700, Sach Jobb wrote: > Has anyone found a way of running Orion on port80 without being root? > > I'm getting ready to launch a finance based site and i'm quite concerned > about security. I've seen messages like this posted before but i have yet > to see any kind of resolution. Any ideas? Changing Orion's uid using JNI: http://www.orionsupport.com/users.html Markus -- Markus Holmberg | Give me Unix or give me a typewriter. [EMAIL PROTECTED] | http://www.freebsd.org/
Re: SUN JDK1.3 RC1 for Linux
> >We're on RedHat 6.1 SMP. Sun's beta refresh had a memory leak in it >(with or without JIT), which still seems to be there to a lesser degree >now. IBM's crashed with JIT, and would just die after a few hours >without JIT (die in that the JVM was still alive but it just seemed to >stop handling requests). > >With all the problems we're having, maybe we should upgrade Linux and >then try again. yes, I believe getting the latest glibc is a good idea. I have just tested the IBM jdk for a few hours under real load and it crashed several times. guell we'll switch back to sun rc1, which hasn't crashed at all under the same load conditions yet. robert >Thanks, > >-joel shellman >http://www.ants.com/ (-) Robert Krüger (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt, (-) Tel: 06151 665401, Fax: 06151 665373 (-) [EMAIL PROTECTED], www.signal7.de
"Routing" a request to default web app to other web app
I have a standard web application, accessible from localhost/myapp. Is it possible to configure it to be usable from localhost/, so that the application itself remains in a separate directory in ../applications/ and can be distributed as an .ear-file.
No Subject
unsubscribe
Re: Run Orion on port80 without being root?
Idealy that is what i'm looking for: basically having it start up as root and then switching the process over to another user (like apache does). In our dev env this isn't a problem because they use non-priv ports, but there's just something about seeing a billboard with an add like: "come visit us at our new web site www.bigcompany.com:8092" that just doesn't have quite the right ring to it. ;) What's the theory behind using the JNI code? I'm not familiar with it. cheers, sach %s/windows/linux/g On Mon, 11 Sep 2000, John Barrett wrote: > In *nix systems, there isnt a solution except to startup as root and > then change to another user/group, like Apache does. I dont think that > Java has the ability to manipulate its UID/GID without JNI code. > > - Original Message - > From: Sach Jobb <[EMAIL PROTECTED]> > To: Orion-Interest <[EMAIL PROTECTED]> > Sent: Monday, September 11, 2000 1:11 PM > Subject: Run Orion on port80 without being root? > > > > Has anyone found a way of running Orion on port80 without being root? > > > > I'm getting ready to launch a finance based site and i'm quite concerned > > about security. I've seen messages like this posted before but i have yet > > to see any kind of resolution. Any ideas? > > > > > > cheers, > > sach > > > > %s/windows/linux/g > > > > > > > > > > > > > >