OffTopic: Entity-Beans and relational structure
Excuse me for asking off topic (and stupid), I am just learning to use Entity Beans on Orion. In most tutorials entity beans only represent ONE ROW from ONE TABLE, but relational databases go far beyond that. I have a relational database for movies, actors, directors writers. So I have a table tblMovies INT id, VARCHAR title, INT year, VARCHAR description e.g.: 1, 'Casablanca',1942,'the classical movie' 2, 'The Maltese Falcon',1946,'begin of the dark series' 3, 'The Seawulf',1947,'after the novel from Jack London' ... I have a tblActors (INT id, VARCHAR name) 1,'Humphrey Bogart' 2,'Ingrid Bergman' 3,'Edward G. Robinson' ... and in the same manner tblDirectors, tblWriters And I have tables for the relations, e.g. tblRoles (INT filmid, INT actorid) 1,1 2,1 1,2 3,3 .. and also tblMisEnScene, tblScreenplay meaning: Humphrey Bogart (actorid: 1) appeared in 'Casablanca' (filmid: 1) and 'The Maltese Falcon' (filmid: 2), Ingrid Bergman (actorid: 2) appeared in 'Casablanca' (filmid: 1), Edward G. Robinson (actorid: 3) appeared in 'The Seawulf' (filmid: 3) . So this relational structure allows that one film can have multiple actors, writers, directors and one actor can appear in multiple films. Relational basework, of course. If I want to extract those films in which Humphrey Bogart appeared I can do this easily in SQL (used by a Servlet) with: SELECT title FROM tblFilms WHERE id IN (SELECT filmid FROM tblRoles WHERE actorid=(SELECT id FROM tblActors WHERE name='Humphrey Bogart')) (or as in my case with JOINS from MySQL) When I do want to write an EJB-Application using this database, how do I do this ? How do I represent the relational data ? Do I have to keep Entity Beans for EVERY row of ANY table ? Do I have to create temporary tables with all information merged ? This creates a problem because one film can have one or more writers (Casablanca had three) and (in most cases) more than one actor. This way ? public class MovieBean implements javax.ejb.EntityBean { String Title; String[] Actors; ... public String getTitle() throws RemoteException; {... } public String[] getActors() throws RemoteException; { return Actors[]; } } using Arrays filled from the database with all actors, directors, writers ? Please give me a hint ! (Well, I know I am stupid. But it is a good work to help stupid persons) Maximilian Eberl http://www.derdickemax.de mailto:[EMAIL PROTECTED]
Re: idea=$395.00USD
At 07:28 PM 3/24/2002, you wrote: On Sun, 24 Mar 2002, Maximilian Eberl wrote: mailing list of developers of whom - I suppose - the majority has an IQ of 90 points or even more. As I wrote or even more if You noticed. I personally do have an IQ of 135. But if You do not understand fine, sophisticated humour, You need of course that kind of 'porn' and 'bastard'-humour that was presented earlier. Maximilian Eberl
Re: idea=$395.00USD
One fancy detail: I tried IDEA at home on a 200 Mhz Pentium with 64 MB RAM on Win 95 - it works fine with smaller projects, even takes less time than JBuilder6 in the office. post scriptum: You can't afford $400?!? where the hell are all you cheap bastards working that you can't scrape up $400? I think you all need to focus a little harder on working and spending less time looking at porn; I really do not think that this is an appropriate discussion style for a mailing list of developers of whom - I suppose - the majority has an IQ of 90 points or even more. And: there are countries where a developer's salary is about 2-300 USD and students have to live on USD 50 monthly. -- Maximilian Eberl [ developer ] - netzdenker.de mailto:[EMAIL PROTECTED] http://www.netzdenker.de Ludwigstrasse 2 D-67346 Speyer / Germany tel: +49-6232-2602-02 fax: +49-6232-2602-05
Re: automatic invocation of servlet as the root-service
If Your server allows FollowSymLinks just set a symbolic link /usr/httpd/htdocs/index.html - /usr/orion/web-app/WEB-INF/classes/indexservlet Or use the HTML-way: meta http-equiv=refresh value=0, url:http://www.maycompany.com/servlets/indexservlet; Please look the docs for correct syntax Max - Original Message - From: Robert Virkus [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 10:06 AM Subject: automatic invocation of servlet as the root-service Hello everybody! I hope someone can give me a hint for my problem: I want to try to use a servlet as the root of my web-application, so I want the servlet/com.company.mystuff.MyServlet - servlet called, when I do not specify any file in my http-request. So I want to map my servlet to the root of the web-application; if I call www.mycompany.com I want to get to my servlet, rather than receiving default.jsp or index.html (or a directory-browsing not allowed - message). Thanks in advance for your help!!! best regards, Robert Virkus Director Mobile Solutions -- 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
Re: question about ip allocation
Your machine has 2 IP-adresses but only one port 80 ! No 2 servers can listen on 1 port - no matter how many network cards You pull in. You have to bind the IPs to different ports. I am doing this on Linux but don't know how this is done on Windows. Max -- Maximilian Eberl - developer - netzdenker.de http://www.netzdenker.de mailto:[EMAIL PROTECTED] Ludwigstrasse 2 D-67346 Speyer / Germany tel: +49-6232-2602-02 fax: +49-6232-2602-05
Re: Instantiating a SAX parser (Xerces)
Have You tried to place the JAR file in the /orion main directory ? That is not very elegant but has worked many times in such ClassNotFound-cases. -- Maximilian Eberl Online Development Astarte New Media AG Waldstrasse 65 76133 Karlsruhe Tel.: 0721-98554-80 Fax 0721-98554-99 mailto:[EMAIL PROTECTED] www.astarte.de
servlet-Tag
Does Orion support the servlet-Tag in HTML-pages and what is the correct syntax ? I couldn't find anything about this in FAQ and documentation. Max