RE: tag library problem with attributes
Title: RE: tag library problem with attributes Kit, should that be %=library.getBooks()% (notice the equals sign missing in your code) WR -Original Message- From: Kit Cragin [mailto:[EMAIL PROTECTED]] Sent: den 12 oktober 2000 07:52 To: Orion-Interest Subject: tag library problem with attributes Hi: I am getting the error message Attribute of type 'java.util.Collection' must be a request time attribute when Orion attempts to parse my JSP. This seems weird because I do set rtexprvalue to true in my taglib.tld (see below). I was attempting to create an iterator similar to the one defined in the orion taglib tutorial at http://www.orionserver.com/taglibtut/index.jsp and include it in my web application. My JSP contains: %@ taglib uri=tags prefix=model % jsp:useBean id=library type=com.mongoosetech.model.Library scope=application/ ... model:iterator name=book type=com.mongoosetech.model.Book collection=% library.getBooks() % jsp:getProperty name=book property=name/br/ /model:iterator where library.getBooks() returns a java.util.Collection of Book. I have 2 classes: public class NestedTagInfo extends TagExtraInfo { public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo(data.getAttributeString(name), data.getAttributeString(type), true, VariableInfo.NESTED) }; } } and public class IteratorTag extends BodyTagSupport { public int doStartTag() { if (iterator == null || !iterator.hasNext()) return SKIP_BODY; pageContext.setAttribute(name, iterator.next(), PageContext.PAGE_SCOPE); return EVAL_BODY_TAG; } public int doAfterBody() throws JspException { if( !iterator.hasNext()) return SKIP_BODY; pageContext.setAttribute(name, iterator.next(), PageContext.PAGE_SCOPE); return EVAL_BODY_TAG; } public int doEndTag() throws JspException { try { if(bodyContent != null) bodyContent.writeOut(bodyContent.getEnclosingWriter()); } catch(java.io.IOException e) { throw new JspException(e.getMessage()); } return EVAL_PAGE; } public void setName(String name) { this.name = name; } public void setCollection(Collection collection) { if (collection.size() 0) iterator = collection.iterator(); } public void setType(String type) { this.type = type; } private String name; private String type; private Iterator iterator; } defined in the com.mongoosetech.tags package and a taglib.tld that looks like: taglib ... tag nameiterator/name tagclasscom.mongoosetech.tags.IteratorTag/tagclass teiclasscom.mongoosetech.tags.IteratorTagInfo/teiclass bodycontentJSP/bodycontent attribute namename/name requiredtrue/required /attribute attribute nametype/name requiredfalse/required /attribute attribute namecollection/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute /tag /taglib and is a part of WEB-INF/lib/tags.jar which has the structure: com/mongoosetech/tags/IteratorTag.class com/mongoosetech/tags/IteratorTagInfo.class META-INF/taglib.tld Finally, I have a web.xml with an entry to point to the tag library: taglib taglib-uritags/taglib-uri taglib-location/WEB-INF/lib/tags.jar/taglib-location /taglib Anyone have any ideas why this is happening? Thanks... Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
RE: How to select an other datasource then the default one?
Ralph and others, My datasources.xml looks like: ?xml version="1.0"? !DOCTYPE data-sources PUBLIC "Orion data-sources" "http://www.orionserver.com/dtds/data-sources.dtd" data-sources data-source name="Default data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/DefaultDS" pooled-location="jdbc/DefaultPooledDS" xa-location="jdbc/xa/DefaultXADS" ejb-location="jdbc/DefaultEJBDS" url="jdbc:HypersonicSQL:./database/DB" connection-driver="org.hsql.jdbcDriver" username="xxx" password="xxx" / data-source name="Default data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/TestDS" pooled-location="jdbc/TestPooledDS" xa-location="jdbc/xa/TestXADS" ejb-location="jdbc/TestEJBDS" url="jdbc:HypersonicSQL:./database/Test" connection-driver="org.hsql.jdbcDriver" username="xxx" password="xxx" / /data-sources Guess there is not much wrong in that. The trouble I have is making the application point to the right datasource. Using CMP I would expect you can add some option somewhere to tell the server to use that connection, but where do I need to put the great 'use-this-datasource' option? Orion-application.xml seemed logical to me. Frank On Wednesday, October 11, 2000 8:41 PM, Ralph Crawford [SMTP:[EMAIL PROTECTED]] wrote: Here's an example of a data-sources.xml file with two different datasources... data-source name="Default data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/DefaultDS" pooled-location="jdbc/DefaultPooledDS" xa-location="jdbc/xa/DefaultXADS" ejb-location="jdbc/DefaultEJBDS" url="jdbc:oracle:thin:@blah.domain.com:1521:dbinstance" connection-driver="oracle.jdbc.driver.OracleDriver" username="username" password="password" / data-source name="Othert data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/OtherDS" pooled-location="jdbc/OtherPooledDS" url="jdbc:postgresql://blah.domain.com:5432/postgres" connection-driver="postgresql.Driver" username="username" password="password" / Obviously, in this case, I've got both the Oracle and Postgres drivers in my orion/lib directory. Then when you want to get a pooled connection, you'd use... connection = ((javax.sql.DataSource) ctx.lookup("jdbc/DefaultPooledDS")).getConnection(); and if you wanted to use the other database, you'd use jdbc/OtherPooledDS instead of jdbc/DefaultPooledDS. Hope this helps. Ralph From: Frank Eggink [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: How to select an other datasource then the default one? Date: Wed, 11 Oct 2000 15:19:04 +0200 MIME-Version: 1.0 Received: from [195.84.237.200] by hotmail.com (3.2) with ESMTP id MHotMailBBADCD3A0024D82197D8C354EDC808540; Wed Oct 11 08:07:44 2000 Received: from druid.evermind.net (IDENT:[EMAIL PROTECTED] [127.0.0.1])by druid.evermind.net (8.9.3/8.9.3) with SMTP id PAA10617;Wed, 11 Oct 2000 15:26:20 -0100 Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20])by paladin.evermind.net (8.9.3/8.9.3) with ESMTP id QAA06513for [EMAIL PROTECTED]; Wed, 11 Oct 2000 16:22:12 -0400 Received: from [212.238.78.167] (helo=barabas)by post.mail.nl.demon.net with smtp (Exim 3.14 #2)id 13jLql-0003J1-00for [EMAIL PROTECTED]; Wed, 11 Oct 2000 13:23:15 + Received: by localhost with Microsoft MAPI; Wed, 11 Oct 2000 15:19:18 +0200 From [EMAIL PROTECTED] Wed Oct 11 08:11:44 2000 Message-ID: [EMAIL PROTECTED] Organization: De Frisse Jongens X-Mailer: Orion ListServer Sender: [EMAIL PROTECTED] Hi, How do you select a different datasource? I have defined a second data source in the datasources.xml file. Also I have added "default-data-source="jdbc/TestEJBDS" to the orion-application.xml file in the application-deployments/application directory, as suggested by the manual. It doesn't work though, Frank _ 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.
RE: HARDWARE FOR J2EE apps
I would reconsider implementing such low-level functionality. the deeper you dig into it, the more little things you will discover that have the potential to break your neck. It's probably not that hard to this stuff up and running. the problem is to get it really stable. we're currently planning on the following setup. 2 rather powerful dual processor machines, that run orion and interbase 6 on linux with heartbeat for ip-address takeover. one is running as a hot standby and they are syncronized using the IBReplicator product that was already mentioned in this thread (http://www.synectics.co.za/). the performance of the syncronization that's described in the docs is enough for our application to believe it will basically be real-time (something like 200 updates per second over a 10Mbit link and pentium 200s). of course this only takes care of availability and doesn't do any load balancing but for us the performance we can achieve by using good caching algorithms at the application level and fast dual processor machines is enough. for a really scalable solution I'd probably look at sybase (the commercial versions, the free version doesn't support clustering). of course, if the database is not the bottleneck one could use the standby solution for the database only and put a real cluster of orion servers in front. robert At 23:37 11.10.00 , you wrote: Hi! On Wed, 11 Oct 2000, Robert Krueger wrote: [description of budget-friendly Orion setup - snip] sounds very nice but what about the database? how do you cluster that without spending an arm and a leg? our experience is, that it's not that hard to set up clustered web services with static pages and servlets but the really expensive part is, when you want that high availability for your database. it doesn't buy you much if you have highly available ejbs when the database server goes down. many people use clustered apache/jserv on linux and cheap pc-hardware for high volume transactional websites but have a large enterprise sun running oracle in the back. anyone out there running a configuration with orion that includes a database with failover that doesn't blow up the budget too much (compared to other components)? Ah. Deja Vu. :-) I'm involved with a startup company here in Sweden, and considering Orion as app server we are also contemplating what non-arm-and-a-leg-spending ways there are to enable a database for failover and load-balancing functionality. We are looking at either PostgreSQL, InterBase, SAP-DB or MySQL (yeah, I know) as our database. We have not seen any currently freely available solutions for failover for either of those (anybody?). So, we are thinking about implementing something by ourselves. Nothing definite so far, but: - The synchronizing of data will be done on the application-level, not by the database servers themselves. See below. - We'll avoid numeric sequences for record keys to make this easier. We will implement some unique key-generation scheme based on whatever is needed to make keys unique but still not rely on strict monotone numeric sequences or similar ( md5(table_name+timestamp()), perhaps? ). - We'll code a DB-abstraction layer that takes care of executing all update queries against all configured database servers and all read queries against one of them known to be alive and lightly loaded (or not recently accessed, or some other scheme). - I guess that if we need database-specific stuff such as stored procedures or similar we need to use the same database software for all failover machines. - If we stay away from database-specifics we could possibly allow failover between different database products. Would be cool. Using straight, standard SQL, could make this feasible. These are very premature thoughts, we are getting closer to the planning and design stage, but we haven't actually started yet. Any thoughts? Ridiculously naive? Or possible to pull off? robert /David Reach me by - Email: [EMAIL PROTECTED], WWW: http://www.dtek.chalmers.se/~d0dak/ - --/David--- (-) 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
RE: HARDWARE FOR J2EE apps
I was wondering whether it would be possible to let the orion server(s) switch datasource as a sort of failover procedure. I haven't digged myself into clustering and failover, but here's the idea. Assuming you have made sure the server are running with failover and you have bought yourself a SCSI-raid configuration with a Y connection (that is the disk are connected to two systems), the largest risk of failure is the database server. If however orion could automatically switch on some sort of connection timeout from one server to another, you can solve this problem almost to easy. This stil leaves you with a number of risks like: - write failure of the db-software corrupting your database. - program logic failures. - site disaster (fire, flooding, tornado etc.). - human error. Depending on the sort system I guess, I could live with that. Frank On Wednesday, October 11, 2000 11:37 PM, David Kinnvall [SMTP:[EMAIL PROTECTED]] wrote: Hi! On Wed, 11 Oct 2000, Robert Krueger wrote: [description of budget-friendly Orion setup - snip] sounds very nice but what about the database? how do you cluster that without spending an arm and a leg? our experience is, that it's not that hard to set up clustered web services with static pages and servlets but the really expensive part is, when you want that high availability for your database. it doesn't buy you much if you have highly available ejbs when the database server goes down. many people use clustered apache/jserv on linux and cheap pc-hardware for high volume transactional websites but have a large enterprise sun running oracle in the back. anyone out there running a configuration with orion that includes a database with failover that doesn't blow up the budget too much (compared to other components)? Ah. Deja Vu. :-) I'm involved with a startup company here in Sweden, and considering Orion as app server we are also contemplating what non-arm-and-a-leg-spending ways there are to enable a database for failover and load-balancing functionality. We are looking at either PostgreSQL, InterBase, SAP-DB or MySQL (yeah, I know) as our database. We have not seen any currently freely available solutions for failover for either of those (anybody?). So, we are thinking about implementing something by ourselves. Nothing definite so far, but: - The synchronizing of data will be done on the application-level, not by the database servers themselves. See below. - We'll avoid numeric sequences for record keys to make this easier. We will implement some unique key-generation scheme based on whatever is needed to make keys unique but still not rely on strict monotone numeric sequences or similar ( md5(table_name+timestamp()), perhaps? ). - We'll code a DB-abstraction layer that takes care of executing all update queries against all configured database servers and all read queries against one of them known to be alive and lightly loaded (or not recently accessed, or some other scheme). - I guess that if we need database-specific stuff such as stored procedures or similar we need to use the same database software for all failover machines. - If we stay away from database-specifics we could possibly allow failover between different database products. Would be cool. Using straight, standard SQL, could make this feasible. These are very premature thoughts, we are getting closer to the planning and design stage, but we haven't actually started yet. Any thoughts? Ridiculously naive? Or possible to pull off? robert /David Reach me by - Email: [EMAIL PROTECTED], WWW: http://www.dtek.chalmers.se/~d0dak/ - --/David---
RE: Interbase Details [Was HARDWARE FOR J2EE apps]
At 16:43 12.10.00 , you wrote: I'm not sure why noone has mentioned Sybase yet? Sybase 11.0.3.3 on Linux is free for all uses, and supports replication, backup servers etc etc etc. Replication using 11.0.3.3? Do you mean with the additional Replication Server (commercial) or is there another way? Are you using replication with that version of sybase? We are deciding between sybase 11.0.3.3 and Interbase 6 and are currently leaning towards Interbase because we don't know how Sybase will support this product in the future. What if they decide not to support JDBC X.X for the free versions at some point. then you'll be forced to buy the commercial version. that's why we felt we'd go for Interbase if it works well with orion. We have installed it here and have migrated one large orion application (ejb and direct sql) that was running on adabas to interbase. that took two days and seems to work very well. it's a shame Software AG failed so miserably making Adabas D a well-supported product. they were the first commercial database vendor to port to linux and the software has all the features you need (including clustering support) at an unbeatable price. somehow nobody outside germany seems to use it, which is why we'll eventually be dropping it (no community support). robert Very full featured and quite fast from my experience, a true enterprise RDBMS. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Michael Rimov Sent: Thursday, October 12, 2000 3:06 PM To: Orion-Interest Subject: Interbase Details [Was HARDWARE FOR J2EE apps] At 06:24 PM 10/11/2000 -0400, you wrote: Why would you use mySQL over Postgresl? They're both free, but Postgresql has a JDBC driver that's XA-compliant. Also, mySQL is known to blow away your whole database if it has a bad crash, whereas Postgresql is better at persisting data through a bad crash. How does Interbase 6 compare to Postgresql? Is it free? Interbase is now free. It used to be a commercial Database sold by Inprise/Borland. Because this is the first opensource release, not all the new features for IB6 are fully available for ODBC and JDBC yet. I've worked with the JDBC drivers, and I have no complaints. Drivers that support all the new features are in the works (ODBC drivers are in beta, JDBC drivers are still in development). Interbase does support transactions and blobs. Most current users of Interbase are from Borland Delphi and C++ Builder camps. There's a company out of South Africa that's offering a replication engine that might be useful for people trying to set up a failover-capable system. (Don't have any details on hand... sorry) As far as speed goes, I don't know how it compares to postgresql. Mers, inc. has an online full-text search setup of all the Inprise newsgroups made from their own commercial extensions to interbase. Its pretty snappy. It exists on http://www.mers.com/ And finally, for windows users, there's a very nice management console that you can use to locally or remotely administer your database. (The database itself doesn't have to reside on windows) I think that's about all I can say about it. The biggest problem it has right now is that the multi-threaded server version doesn't scale well with multiple processors. Of course, since its open source, we don't have to wait until Borland releases a new version a year down the road to get that feature fully going. :-) Hope this clarifies information on it! -Mike (-) 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
RE: allow/deny host access
Hello, I believe so. Look at the Orion documentation for web-app settings: http://www.orionserver.com/docs/orion-web.xml.html --Deepak -Original Message- From: Mike Atkin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 10, 2000 4:03 AM To: Orion-Interest Subject: allow/deny host access Hi, Is possible to do host based access control with orion in a similar way to apache i.e. Deny from all Allow from xxx.xxx. We have a directory on a site which we only want computers from the client's network to have access to ( accounting and admin pages ). Cheers, Mike
Re: XSLT processors
To my knowledge, Xerces is an XML parser, and Xalan does the XSLT stuff. Hope you got that right in your book :-). I used Xerces to write a custom tag for a JSP book I co-wrote that's coming out in a month or so. The tag looks like this on a JSP, for example: synd:rdf rdfURL="http://www.slashdot.org/slashdot.rdf" xslURI="xml/rdf092.xsl"/ It's slowed by the initial request for the RDF page, but if you have all your XML and XSL local or in a database, this stuff goes much quicker (but doing syndication will always require someone/something to hit the Web for updates). The code is very simple and just uses the Xerces APIs to do the processing. You could also include the dynamic XML output of one JSP into another JSP or servlet, which could then call XSLT engine APIs and a stylesheet to convert the XML to another type of data. My main beef about Xerces is that it's 1.5 MB. That's way too big if all you want is a fast, light XSLT engine. But its' free and it's got features and it works well and its very easy to use. James Clark has a lightweight XSLT processor:
RE: Restricting access by IP
Hello, Look at the Orion documentation: http://www.orionserver.com/docs/orion-web.xml.html --Deepak -Original Message- From: Aleksi Kallio [mailto:[EMAIL PROTECTED]] Sent: Monday, October 09, 2000 3:00 AM To: Orion-Interest Subject: Restricting access by IP How to restrict access to Orion server to some IP-pattern? It could be also per wep-app.
RE: Saving JSP responses
Hello, Why do you want to forward to the jsp page. If you just want to capture the response from the jsp page, you can create a URL object and do a GET or POST and capture the output. One thing I'm not sure about is session management - whether a new session will be created or the current session will be reused. --Deepak -Original Message- From: Claudio Cordova [mailto:[EMAIL PROTECTED]] Sent: Monday, October 09, 2000 6:20 PM To: Orion-Interest Subject: Saving JSP responses Hello, I am a newbie on JSP and I am trying to forward a request fom a servlet to a jsp page and some how read the response and save it into a file without sending the result to the browser. Instead, I want repeate the process as many times as I need. Then responde with a different HTML response. Is this possible? Claudio
vm stability on linux
I know this is getting a little OT but I believe it might be important to some of you. We've just upgraded to the latest glibc upudates (both redhat and suse have one) and seen a remarkable improvement in stability running orion on SMP machines, especially on redhat. robert (-) 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
EJB 2.0 CMP question
Hi! I asked this question a few days ago but didn't get any answer yet. Can I have container managed relationships between dependent objects? And if so, is the creation protocol which is specified in the chapter 9.4.4.1 implemented in Orion 1.3.8? Please answer so that I can stop my trial-and-error development cycle :) Joni [EMAIL PROTECTED]
RE: Interbase Details [Was HARDWARE FOR J2EE apps]
Sybase JDBC drivers are called "JConnect". Current version is 5.2 (for JDBC2) and 4.2 (JDBC1) I had a few problems with them ages ago and bought a commercial driver - never tried again, but they have evolved I think. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David Kinnvall Sent: Thursday, October 12, 2000 5:29 PM To: Orion-Interest Subject: RE: Interbase Details [Was HARDWARE FOR J2EE apps] Hi! On Thu, 12 Oct 2000, Mike Cannon-Brookes wrote: I'm not sure why noone has mentioned Sybase yet? Sybase 11.0.3.3 on Linux is free for all uses, and supports replication, backup servers etc etc etc. Very full featured and quite fast from my experience, a true enterprise RDBMS. And JDBC drivers for Sybase? Last time I tried to get them from Sybase I failed miserably. Couldn't find them, not to mention download them. I seem to remember a very awkward system with registration and icky navigation to get to the drivers at all...is that easier now? Maybe I gave up to late. :-) Enough rambling: - Where can the JDBC drivers for Sybase be downloaded? - Which version should be used? - Any special things worth knowing about Sybase and its JDBC drivers that could cause problems otherwise? Mike Thanx for any help, David. Reach me by - Email: [EMAIL PROTECTED], WWW: http://www.dtek.chalmers.se/~d0dak/ - --/David-- -
Re: HARDWARE FOR J2EE apps
Hi Kevin, Do you create the database in IBConsole ? Because the ibconsole has an bug when creating databases. If so, you probably have to get the newer version of IBConsole : URL : http://www.interbase.com/open/downloads/ib_download.html goto the miscellaneous section (at the bottumn of the page) and download IBConsole - build 308. You must overwrite the ibconsole in your interbase install directory. If you want the interbase-database-schema.xml (for orion cmp managed persistence) mail me and i will sent it to you. Further more i think interbase 6 is an very good database but I would like to know if it handle a large amount of connections at the same time (like 500 or something). There isn't much info about that in the docs. Greetings Wim Veninga. "Duffey, Kevin" wrote: Hey Scott, Interbase 6 is pretty nice in my opinion. Its SQL 92 compliant (if that means anything), its completely free and is now open-source, has a type IV jdbc driver, and it has a VERY small foot-print. It runs on most platforms I believe, and thus far its pretty darn fast. However, I have not been able to successfully create a database in it. I keep getting some stupid error when I try to create a database and I can't find any information on it. I'll have to post to the Interbase site probably..or maybe there is a newer version. I wish there was some more detailed info on how to completely set up Interbase. I can however connect via my java app and get connections out. I just can't seem to create tables and what not. Anyways..I worked with Interbase 4 and it was pretty fast, so I am sure 6 is better in many ways (that is not always true..but I hope it is). -Original Message- From: Scott Stirling [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 11, 2000 3:25 PM To: Orion-Interest Subject: RE: HARDWARE FOR J2EE apps Why would you use mySQL over Postgresl? They're both free, but Postgresql has a JDBC driver that's XA-compliant. Also, mySQL is known to blow away your whole database if it has a bad crash, whereas Postgresql is better at persisting data through a bad crash. How does Interbase 6 compare to Postgresql? Is it free? Scott Stirling West Newton, MA -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin Sent: Wednesday, October 11, 2000 4:01 PM To: Orion-Interest Subject: RE: HARDWARE FOR J2EE apps Hi, sounds very nice but what about the database? how do you cluster that without spending an arm and a leg? our experience is, that it's not that hard to set up clustered web services with static pages and servlets but the really expensive part is, when you want that high availability for your database. it doesn't buy you much if you have highly available ejbs when the database server goes down. many people use clustered apache/jserv on linux and cheap pc-hardware for high volume transactional websites but have a large enterprise sun running oracle in the back. anyone out there running a configuration with orion that includes a database with failover that doesn't blow up the budget too much (compared to other components)? Well, to start off with there is mySQL and the one I like the most is Interbase 6..a free powerful RDBMS. However, as far as clustering them..I don't quite know the best way. I would think a load-balancer or a switch or something, would be required. Nobody ever said it was cheap! ;) I used to think $25,000 could easily set up a website from front to back, software, hardware, etc..but not even close these days. If you are just starting out, I would use Orion for front-end and ejb-logic tiers in a clustered environment (for developing/testing), with a single server running mySQL or Interbase for the database. Once you get some funding and move beyond the concept phase, you should put a sizeable chunk to invest in co-locating your site and doing the full load-balancing setup. I would estimate a cheap setup with 2 front-end web/servlet servers failed over, 2 ejb servers, and a database cluster will still run around $100,000, to co-lo it..which is probably the best thing to do to make sure its up 24/7.
Invalidating an Entity bean
Hi gurus How do I do this cleanly. I have and Entity that has attributes A,B,C and D. These attributes are all read from database tables. A and B are read from Table 1 C and D are read from Table 2 So I have Entity Bean 1, this is loaded by the app server (perhaps by a findByPrimaryKey) method. This means that Entity Bean 1 is now a cache of the data in A,B,C and D. However while this entity bean is in the cache, via a session bean I change the data of C and D in table 2. This mean that Entity Bean 1 now has dirty data. So the question is how do I force the Entity beans to do and EJB Load. Also the data in C and D in table 2 may be shared by N number of entity beans so I may need to refresh N number of Entity Beans depending on which ones are in the cache. I only want to call EJB load for Entity beans currently in the cache and of these I only want to call ejb load for the ones that refer to the changed data. Cheers Peter
NEWBIE QUESTION: How do I shut this thing down
Hi Guys, I have trawled through the docs to try and find a way to shut orion down cleanly, however I can't find the default username and password in order to shut it down. Can you guys let me know what it is? cheers Rob
Re: Interbase Details [Was HARDWARE FOR J2EE apps]
it's a shame Software AG failed so miserably making Adabas D a well-supported product. they were the first commercial database vendor to port to linux and the software has all the features you need (including clustering support) at an unbeatable price. somehow nobody outside germany seems to use it, which is why we'll eventually be dropping it (no community support). Robert, dont you think that this is going to improve now that SAP DB (same as ADABAS D?!) is on the way to open source??
RE: I cannot use ejbmaker
Hi, I found out about the same bug and entered a new bug report in bugzilla yesterday, its number is #106. Hope they fix it soon. Bye, Martijn -- _ Martijn van Berkum GX creative online development _ mailto:[EMAIL PROTECTED] _ http://www.gx.nl/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Frank Eggink Sent: woensdag 11 oktober 2000 18:58 To: Orion-Interest Subject: RE: I cannot use ejbmaker Neither have I. On Wednesday, October 11, 2000 6:06 PM, Sean Han [SMTP:[EMAIL PROTECTED]] wrote: Hi, everyone: When using ejbmaker, I found I cannot restore it from a saved .skeleton file. No matter what I entered for the bean, I always get an empty package when I reopen it. Can anyone tell me what's wrong? regards, Sean
Charsets, i18n and confusion
Guys, I really need some help here - anything you can all do to help is fantastic. I'm trying to build a site in Big 5 characters, but sometimes they come up and sometimes they're just garbled. To complicate matters, sometimes people are submitting the form with Big5 characters. Here's the scenario: Big 5 text - web form - EJB - Database... DB - EJB - getter method - web site What encodings should I use where? If the text is Big5 encoded ASCII (is that right? text typed from a Big5 keyboard into the form) do I need to manually convert it to unicode somehow before putting it in the entity bean? Does it matter what encoding the entry form page is in? Will it affect the result? Are there any current bugs with i18n that you know of? Has anyone used Big5 with Orion extensively? Cheers - you'll save my bacon, Mike
calling ProductServlet
Hey, I'm testing the Product example with EJB's. How I must call the ProductServlet? I tried to put it in the classes directory, but it doesn't work! Some one could help me? Thanks kuno -- -- http://zap.to/kuno - Homepage -http://www.eif.ch -- --026/ 494.19.56- Telefon - 026/ 429.66.11 -- -- [EMAIL PROTECTED] - eMail - [EMAIL PROTECTED] --
Library path.
Hi People, The /config/application.xml definesa general library path for theServer. library path="../lib" / Is it possible to: 1) Add to this. If so what is the syntax? (';' as a path separator within the same quotes?) 2) I would like to have custom lib paths for each app. Can this be done? (I have tried adding the library tag to an application.xml without success). If I have missed something in the documentation please point out the page. Thanks. --Miles DaffinJava DeveloperHOT Company BV Mathernesserlaan 171 3014 HA Rotterdam Land: +31 (0) 10 476 2500Fax: +31 (0) 10 476 5762Mobile: +31 (0) 2959 1423http://www.hotobjects.nl
Re: Interbase Details [Was HARDWARE FOR J2EE apps]
Mike Cannon-Brookes wrote: Sybase JDBC drivers are called "JConnect". Current version is 5.2 (for JDBC2) and 4.2 (JDBC1) I had a few problems with them ages ago and bought a commercial driver - never tried again, but they have evolved I think. And JDBC drivers for Sybase? Last time I tried to get them from Sybase I failed miserably. Couldn't find them, not to mention download them. I seem to remember a very awkward system with registration and icky navigation to get to the drivers at all...is that easier now? Maybe I gave up to late. :-) - Where can the JDBC drivers for Sybase be downloaded? - Which version should be used? - Any special things worth knowing about Sybase and its JDBC drivers that could cause problems otherwise? The drivers can actially be found at sybase ;-) It took me a couple of hours to find them their site really sucks in relation to navigation. I'm using JConnect 5.2 and it's a pretty good driver (much better imho than for example DB2 Oracle drivers. I've heard of one bug, but haven't seen it myself, it's simmilar to the bug in the older MySql (mm) drivers, and does not allow images of more than 32k to be inserted into or obtained from the database. But I agree with the above mentioned. IMHO the free linux version is the best i've seen so far. Highly scalable, quite fast (select * from where pk='x' on a table with more than 7 million records is almost instantanious and several joins on tables with more than 7 million records goes in less than a second), it's slow (imho) in populating the db (700 records took about 14 hrs (4 on mysql!)). The docs are great (about seven books(ps) with 500+ pages) sven -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
RE: XSLT processors
Oh, you caught that! I thought it might slip by after I sent it and realized it myself. Yes, I did get it right in the book. More pluses/minuses on Xerces and Xalan: Xalan Java is the XSLT processor, which was 843 KB last time I checked. It depends on Xerces by default, which was/is around 1.5 MB. The plus is that you can use Xalan with other XML parsers that support DOM 2/SAX 1. Scott -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Christian Sell Sent: Thursday, October 12, 2000 3:10 AM To: Orion-Interest Subject: Re: XSLT processors To my knowledge, Xerces is an XML parser, and Xalan does the XSLT stuff. Hope you got that right in your book :-).
RE: Library path.
Add more library tags for each path, one per tag. No custom lib paths for each app as far as I know, just throw it in an EJB module, that's visible to all parts of the app. (and you can reload those classes) Mike -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Miles DaffinSent: Thursday, October 12, 2000 10:19 PMTo: Orion-InterestSubject: Library path. Hi People, The /config/application.xml definesa general library path for theServer. library path="../lib" / Is it possible to: 1) Add to this. If so what is the syntax? (';' as a path separator within the same quotes?) 2) I would like to have custom lib paths for each app. Can this be done? (I have tried adding the library tag to an application.xml without success). If I have missed something in the documentation please point out the page. Thanks. --Miles DaffinJava DeveloperHOT Company BV Mathernesserlaan 171 3014 HA Rotterdam Land: +31 (0) 10 476 2500Fax: +31 (0) 10 476 5762Mobile: +31 (0) 2959 1423http://www.hotobjects.nl
Sources for change unix user
Hi, i now that can change the user who start the orion under Unix, but a haven`t the sources for libnative... Could you send me the sources or explain me how do that. Thanks George __ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/
RE: XSLT processors
Hello everyone. If anyone has some standard HTML pages set up on Orion, without the corresponding servlets, EJBs, etc., I would love to see the XML configuration files that were set up. I had to append this message, since I am not sure of the group address. -Original Message-From: Duffey, Kevin [mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 11, 2000 2:57 PMTo: Orion-InterestSubject: RE: XSLT processors I would be interested in knowing how to even use an XSLT engine! I know I can get JSP to output XML with a header, but how do I actually pass the XML to the XSLT engine, and how do I specify I want HTML or WML output? Is it a servlet, and you just call upon it somehow from a JSP page or when a request is made, inside you grab the page using a URL connection to get XML output from the JSP page, then pass it on to an XSLT engine somehow? I guess I should buy a book on this topic..but I was hoping it would be easy enough to figure out. Thanks. -Original Message-From: Derek Akers [mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 11, 2000 7:53 AMTo: Orion-InterestSubject: XSLT processors I have been using Xalan and JAXP as XSLT processors for the past little while, and have recently become aware of Saxon as well. I was wondering if there is anyone out there who has used all three (or at least some combination) at various times who would be willing to tell me what differences there are between the three re: processing efficiency, ease of use, documentation, community, etc. Thanks, Derek Akers Internet Application DeveloperEldan Software, Torontowww.eldan.com
RE: XSLT processors
Take a look at the XSLT Programmer's Reference: http://www.bookpool.com/.x/micoqah72r/ss/1?qs=xslt At 12:56 PM 10/11/00 -0700, you wrote: I would be interested in knowing how to even use an XSLT engine! I know I can get JSP to output XML with a header, but how do I actually pass the XML to the XSLT engine, and how do I specify I want HTML or WML output? Is it a servlet, and you just call upon it somehow from a JSP page or when a request is made, inside you grab the page using a URL connection to get XML output from the JSP page, then pass it on to an XSLT engine somehow? I guess I should buy a book on this topic..but I was hoping it would be easy enough to figure out. Thanks. -Original Message- From: Derek Akers [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 11, 2000 7:53 AM To: Orion-Interest Subject: XSLT processors I have been using Xalan and JAXP as XSLT processors for the past little while, and have recently become aware of Saxon as well. I was wondering if there is anyone out there who has used all three (or at least some combination) at various times who would be willing to tell me what differences there are between the three re: processing efficiency, ease of use, documentation, community, etc. Thanks, Derek Akers Internet Application Developer Eldan Software, Toronto http://www.eldan.comwww.eldan.com Kirk Yarina [EMAIL PROTECTED]
Re: NEWBIE QUESTION: How do I shut this thing down
Robert Keith wrote: Hi Guys, I have trawled through the docs to try and find a way to shut orion down cleanly, however I can't find the default username and password in order to shut it down. Can you guys let me know what it is? cheers Rob I guess it's the one you created with: java -jar orion.jar -install sven -- == Sven E. van 't Veer http://www.cachoeiro.net Java Developer [EMAIL PROTECTED] ==
NEWBIE QUESTION:Configuring a web application, that is not contained in a WAR file
Hi Guys, I have a quick question about deploying a Web application to Orion.I have a directory that contains all the required classes, html, Java script etc.I have also written the web.xml file describing the servlets that are available in the application. There are no JSP pages or anything like that. Can you give me a brief overview of how to get Orion to serve this application. I have tried adding it to the default-web-application.xml file, but have had not success. The console tells me that it cannot find the application. When I look at the HTTP properties in the Admin Console. Thanx Rob -Original Message- From: Klaus Thiele [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 12, 2000 1:49 PM To: Robert Keith Subject: Re: NEWBIE QUESTION: How do I shut this thing down Hi Robert, I have trawled through the docs to try and find a way to shut orion down cleanly, however I can't find the default username and password in order to shut it down. Can you guys let me know what it is? you are not starting the server with the graphical console? = java -jar orion.jar -console2 then you can easyly shutdown from there otherwise do java -jar admin.jar ormi://localhost admin _admin_password_ -shutdown (type only 'java -jar admin.jar' and you get some help) hope that helps klaus -- Klaus Thiele - Personal Informatik AG mailto:[EMAIL PROTECTED] "There's got to be more to life than compile-and-go."
Re: NEWBIE QUESTION: How do I shut this thing down
See the 'orion/Readme.txt' (should be renamed to README_FIRST.txt - I missed it for days). Follow the instructions. General ACL stuff is set in /config/principals.xml. * To shutdown:java -jar admin.jar ormi://localhost/ adminID adminPass -shutdown * To restart:java -jar admin.jar ormi://localhost/ adminID adminPass -restart Some people (me too) have had trouble with -restart command. You can get all kinds of Exceptions at various times, and I cannot see why (the weather?). I run all commands from batch files so I know it's not typos. Mostly it works but sometimes it doesn't. -shutdown almost always works. Ctrl + C works every time! Hi Guys, I have trawled through the docs to try and find a way to shut orion down cleanly, however I can't find the default username and password in order to shut it down. Can you guys let me know what it is? cheers Rob
Re: Interbase Details [Was HARDWARE FOR J2EE apps]
At 13:58 12.10.00 , you wrote: it's a shame Software AG failed so miserably making Adabas D a well-supported product. they were the first commercial database vendor to port to linux and the software has all the features you need (including clustering support) at an unbeatable price. somehow nobody outside germany seems to use it, which is why we'll eventually be dropping it (no community support). Robert, dont you think that this is going to improve now that SAP DB (same as ADABAS D?!) is on the way to open source?? I was not aware of that. I just checked the docs and didn't find anything on clustering. Does it support that? I know Adabas D does (or used to?). Definitely worth a look, though. Thanks for the info. Robert (-) 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
Re: Charsets, i18n and confusion
Hello Mike, DB -> EJB -> getter method -> web site What encodings should I use where? If the text is Big5 encoded ASCII (is that right? text typed from a Big5 keyboard into the form) do I need to manually convert it to unicode somehow before putting it in the entity bean? Did you changed the encoding when getting the parameters from the web form? We use java.io.InputStreamReader to change the encoding to "Big5". Does it matter what encoding the entry form page is in? Will it affect the result? Yes, it does. Good luck! Richard Chuo
Re: Interbase Details [Was HARDWARE FOR J2EE apps]
At 13:58 12.10.00 , you wrote: it's a shame Software AG failed so miserably making Adabas D a well-supported product. they were the first commercial database vendor to port to linux and the software has all the features you need (including clustering support) at an unbeatable price. somehow nobody outside germany seems to use it, which is why we'll eventually be dropping it (no community support). Robert, dont you think that this is going to improve now that SAP DB (same as ADABAS D?!) is on the way to open source?? one more thing. have you used sap db with orion? if you have or will please keep the list posted how well everything works. robert (-) 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
Re: NEWBIE QUESTION: How do I shut this thing down
On Thu, Oct 12, 2000 at 12:17:06PM +0100, Robert Keith wrote: Hi Guys, I have trawled through the docs to try and find a way to shut orion down cleanly, however I can't find the default username and password in order to shut it down. Can you guys let me know what it is? java -jar admin.jar ormi://localhost admin_user admin_password -shutdown Give that a go. (It's _almost_ covered in the FAQ under "How do I restart Orion?") HTH. -- Chris Woods [EMAIL PROTECTED] ICQ #21740987 AIM GnarlyBob69
Re: NEWBIE QUESTION:Configuring a web application, that is not contained in a WAR file
the web app structure should look something like this(which is really just an unpacked WAR) web-app/ *.html, *.jsp, ... WEB-INF/ web.xml classes/ loose classes(override lib directory jarred classes) lib/ jar and zip files of classes Then I believe you need to add a line to server.xml in orion/config that looks like this: application name="my app" path="path/to/my/app" deployment-directory="path/to/my/app/deploy" / Hope this helps -Matt
RE: HARDWARE FOR J2EE apps
Wim, We've used IB extensively for the past few years - it's an excellent low-maintenance choice (DBA-free) for small to medium applications, but doesn't scale well to large numbers of users or heavy loads. Depending on the OS platform, there is a hard limit of 250 simultaneous connections - but we often run into concurrency problems well below that number, even on large Sun servers. E-mail me if you need more info, Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of wim veninga Sent: 12 October 2000 18:53 To: Orion-Interest Subject: Re: HARDWARE FOR J2EE apps Hi Kevin, Do you create the database in IBConsole ? Because the ibconsole has an bug when creating databases. If so, you probably have to get the newer version of IBConsole : URL : http://www.interbase.com/open/downloads/ib_download.html goto the miscellaneous section (at the bottumn of the page) and download IBConsole - build 308. You must overwrite the ibconsole in your interbase install directory. If you want the interbase-database-schema.xml (for orion cmp managed persistence) mail me and i will sent it to you. Further more i think interbase 6 is an very good database but I would like to know if it handle a large amount of connections at the same time (like 500 or something). There isn't much info about that in the docs. Greetings Wim Veninga. "Duffey, Kevin" wrote: Hey Scott, Interbase 6 is pretty nice in my opinion. Its SQL 92 compliant (if that means anything), its completely free and is now open-source, has a type IV jdbc driver, and it has a VERY small foot-print. It runs on most platforms I believe, and thus far its pretty darn fast. However, I have not been able to successfully create a database in it. I keep getting some stupid error when I try to create a database and I can't find any information on it. I'll have to post to the Interbase site probably..or maybe there is a newer version. I wish there was some more detailed info on how to completely set up Interbase. I can however connect via my java app and get connections out. I just can't seem to create tables and what not. Anyways..I worked with Interbase 4 and it was pretty fast, so I am sure 6 is better in many ways (that is not always true..but I hope it is). -Original Message- From: Scott Stirling [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 11, 2000 3:25 PM To: Orion-Interest Subject: RE: HARDWARE FOR J2EE apps Why would you use mySQL over Postgresl? They're both free, but Postgresql has a JDBC driver that's XA-compliant. Also, mySQL is known to blow away your whole database if it has a bad crash, whereas Postgresql is better at persisting data through a bad crash. How does Interbase 6 compare to Postgresql? Is it free? Scott Stirling West Newton, MA -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Duffey, Kevin Sent: Wednesday, October 11, 2000 4:01 PM To: Orion-Interest Subject: RE: HARDWARE FOR J2EE apps Hi, sounds very nice but what about the database? how do you cluster that without spending an arm and a leg? our experience is, that it's not that hard to set up clustered web services with static pages and servlets but the really expensive part is, when you want that high availability for your database. it doesn't buy you much if you have highly available ejbs when the database server goes down. many people use clustered apache/jserv on linux and cheap pc-hardware for high volume transactional websites but have a large enterprise sun running oracle in the back. anyone out there running a configuration with orion that includes a database with failover that doesn't blow up the budget too much (compared to other components)? Well, to start off with there is mySQL and the one I like the most is Interbase 6..a free powerful RDBMS. However, as far as clustering them..I don't quite know the best way. I would think a load-balancer or a switch or something, would be required. Nobody ever said it was cheap! ;) I used to think $25,000 could easily set up a website from front to back, software, hardware, etc..but not even close these days. If you are just starting out, I would use Orion for front-end and ejb-logic tiers in a clustered environment (for developing/testing), with a single server running mySQL or Interbase for the database. Once you get some funding and move beyond the concept phase, you should put a sizeable chunk to invest in co-locating your site and doing the full load-balancing setup. I would estimate a cheap setup with 2 front-end web/servlet servers failed over, 2 ejb servers, and a database cluster will
Re: Invalidating an Entity bean
Hi Peter, I'm not claiming guru-hood, but as far as I know you CAN'T do that cleanly. My thoughts on your best options are: 1) Tell Orion that the entity beans do not have exclusive write-access to the database by setting exclusive-write-access="false" in the orion-ejb-jar.xml (which is orion-specific). I believe this causes the data to be re-read at the start of every transaction. 2) Re-write your session bean to makes its database changes through the entity beans rather than through direct JDBC. Nick At 12:02 PM 10/12/00 +0100, you wrote: Hi gurus How do I do this cleanly. I have and Entity that has attributes A,B,C and D. These attributes are all read from database tables. A and B are read from Table 1 C and D are read from Table 2 So I have Entity Bean 1, this is loaded by the app server (perhaps by a findByPrimaryKey) method. This means that Entity Bean 1 is now a cache of the data in A,B,C and D. However while this entity bean is in the cache, via a session bean I change the data of C and D in table 2. This mean that Entity Bean 1 now has dirty data. So the question is how do I force the Entity beans to do and EJB Load. Also the data in C and D in table 2 may be shared by N number of entity beans so I may need to refresh N number of Entity Beans depending on which ones are in the cache. I only want to call EJB load for Entity beans currently in the cache and of these I only want to call ejb load for the ones that refer to the changed data. Cheers Peter
RE: HARDWARE FOR J2EE apps
As far as DB redundancy, I have heard that it is possible to have two boxes using a shared RAID that holds the data. The first box is the primary database, and if that one is down, the second one takes over. The RAID itself taking care of the disk level redundancy, and the two boxes handling the System level redundency. I have never personally tried this, but it sounds intriguing. -Lkb At 04:26 PM 10/11/00 -0700, Duffey, Kevin wrote: Is a veritos cluster expensive? I know we are using that here with Oracle 8i, but I am not sure if that is outrageous in price, and if it works with all db's, or if its specific. Also, does Oracle, IBM DB2, and so on support clustering by themselves..or does it require 3rd party software to make this work? -Original Message- From: David Kinnvall [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 11, 2000 2:37 PM To: Orion-Interest Subject: RE: HARDWARE FOR J2EE apps Hi! On Wed, 11 Oct 2000, Robert Krueger wrote: [description of budget-friendly Orion setup - snip] sounds very nice but what about the database? how do you cluster that without spending an arm and a leg? our experience is, that it's not that hard to set up clustered web services with static pages and servlets but the really expensive part is, when you want that high availability for your database. it doesn't buy you much if you have highly available ejbs when the database server goes down. many people use clustered apache/jserv on linux and cheap pc-hardware for high volume transactional websites but have a large enterprise sun running oracle in the back. anyone out there running a configuration with orion that includes a database with failover that doesn't blow up the budget too much (compared to other components)? Ah. Deja Vu. :-) I'm involved with a startup company here in Sweden, and considering Orion as app server we are also contemplating what non-arm-and-a-leg-spending ways there are to enable a database for failover and load-balancing functionality. We are looking at either PostgreSQL, InterBase, SAP-DB or MySQL (yeah, I know) as our database. We have not seen any currently freely available solutions for failover for either of those (anybody?). So, we are thinking about implementing something by ourselves. Nothing definite so far, but: - The synchronizing of data will be done on the application-level, not by the database servers themselves. See below. - We'll avoid numeric sequences for record keys to make this easier. We will implement some unique key-generation scheme based on whatever is needed to make keys unique but still not rely on strict monotone numeric sequences or similar ( md5(table_name+timestamp()), perhaps? ). - We'll code a DB-abstraction layer that takes care of executing all update queries against all configured database servers and all read queries against one of them known to be alive and lightly loaded (or not recently accessed, or some other scheme). - I guess that if we need database-specific stuff such as stored procedures or similar we need to use the same database software for all failover machines. - If we stay away from database-specifics we could possibly allow failover between different database products. Would be cool. Using straight, standard SQL, could make this feasible. These are very premature thoughts, we are getting closer to the planning and design stage, but we haven't actually started yet. Any thoughts? Ridiculously naive? Or possible to pull off? robert /David Reach me by - Email: [EMAIL PROTECTED], WWW: http://www.dtek.chalmers.se/~d0dak/ - --/David-- - /** * @author: Lorin Kobashigawa-Bates [EMAIL PROTECTED] * @title: CodeMonkey / COO - Robot6 Inc. * @phone: 415.345.8872 * @addr: 1177 Polk St. San Francisco, CA 94109 */
RE: tag library problem with attributes
Title: RE: tag library problem with attributes Thanks! Amazing how you can stare at code for hours and then someone comes along and notices the problem immediately! - Kit -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus RydinSent: Thursday, October 12, 2000 1:25 AMTo: Orion-InterestSubject: RE: tag library problem with attributes Kit, should that be %=library.getBooks()% (notice the equals sign missing in your code)
SSL question
Hi all I have a problem using the command below. keytool -keystore keystore -keyalg "RSA" -import -trustcacerts -file my.host.com.cer I get this error: keytool error: Failed to establish chain from reply But, this command worked fine keytool -import -trustcacerts -file my.host.com.cer Is there any problem using the second command, since it's missing some arguments as indicated in the ssl-how-to documentation. Thanks -kit
Re: NEWBIE QUESTION:Configuring a web application, that is not contained in a WAR file
Can you give me a brief overview of how to get Orion to serve this application. 1) Have you go the thing to serve the default website and its default application? 2) If 1 look at the supplied docs - the How-To's section. 3) Then look at: http://www.znerd.demon.nl/orion-primer/ Summary of Primer: ## BASIC STEPS ### Step 1: Setup directory structure Snip Step 8: Write the Web deployment descriptor - web.xml: Servlets aliases. Snip Step 10: Install the application To actually install our application, we need to add the following line to server.xml in the Orion configuration directory (orion/config): application name="orion-primer" path="path to ear file" / In my case: application name="orion-primer" path="/home/ernst/projects/orion-primer/rel/orion-primer.ear" / Step 11: Bind the web application - *** Now we need to bind the web application to the default site. This is done by adding the following line to the file default-web-site.xml in the Orion configuration directory: web-app application="orion-primer" name="orion-primer-web" root="/orion-primer" / Step 12: Start Orion I combined this with the directory structure suggested in the How-To's section: /docs/application-creation-howto.html. It takes a while to get your head around the relationships between the varios XML files - Orion's and the ones that link up an app. I have got an app serving HTML, JSP, Servlet as a basic development env in about 3/4 days.
Re: NEWBIE QUESTION:Configuring a web application, that is not contained in a WAR file
Can you give me a brief overview of how to get Orion to serve this application. 1) Have you go the thing to serve the default website and its default application? 2) If 1 look at the supplied docs - the How-To's section. 3) Then look at: http://www.znerd.demon.nl/orion-primer/ Summary of Primer: ## BASIC STEPS ### Step 1: Setup directory structure Snip Step 8: Write the Web deployment descriptor - web.xml: Servlets aliases. Snip Step 10: Install the application To actually install our application, we need to add the following line to server.xml in the Orion configuration directory (orion/config): application name="orion-primer" path="path to ear file" / In my case: application name="orion-primer" path="/home/ernst/projects/orion-primer/rel/orion-primer.ear" / Step 11: Bind the web application - *** Now we need to bind the web application to the default site. This is done by adding the following line to the file default-web-site.xml in the Orion configuration directory: web-app application="orion-primer" name="orion-primer-web" root="/orion-primer" / Step 12: Start Orion I combined this with the directory structure suggested in the How-To's section: /docs/application-creation-howto.html. It takes a while to get your head around the relationships between the varios XML files - Orion's and the ones that link up an app. I have got an app serving HTML, JSP, Servlet as a basic development env in about 3/4 days. You don't need to mess with EJBs at 1st, if ever Last tip: look at the Orion default web app structure.
Problems with EJB and JNDI-context
Hi, I am facing a problem with my EJBs that i cannot solve. I try to access a EJB via a JSP page: %-- Setting up an error page --% %@ page errorPage="/errorpage.jsp" % %-- Taglibs --% %@ taglib uri="ejbtags" prefix="ejb" % ejb:useHome id="user" type="de.tako.userHome" location="java:comp/env/ejb/user" / html head titletest/title /head body test /body /html This is the result i get (thru errorpage.jsp): javax.servlet.jsp.JspException: NamingException: Error instantiating web-app JNDI-context: No location specified and no suitable instance of the type 'de.tako.user' found for the ejb-ref ejb/user at com.evermind.ejb.taglib.UseHomeTag.doStartTag(Compiled Code) at __jspPage0_index_jsp._jspService(Compiled Code) at com.orionserver.http.OrionHttpJspPage.service(Compiled Code) at com.evermind.server.http.HttpApplication.xa(Compiled Code) at com.evermind.server.http.JSPServlet.service(Compiled Code) at com.evermind.server.http.d3.so(Compiled Code) at com.evermind.server.http.d3.sm(Compiled Code) at com.evermind.server.http.ef.su(Compiled Code) at com.evermind.server.http.ef.dn(JAX) at com.evermind.util.f.run(Compiled Code) My ejb-ref looks like this: ejb-ref ejb-ref-nameejb/user/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homede.tako.userHome/home remotede.tako.user/remote /ejb-ref Is there any aspect i am missing? I could not find any clues on the list, nor in the web. Maybe someone can give me a hint? :) thanks, --nils -- ** * Your mouse has moved. Windows must be restarted for the change to take effect. * ** * Nils Frohberg * *http://www.tako.de/ * **
Re: SSL question
the first line is correct. it's telling you that this certificate does not match the private key (which you made with -genkey first, right?) in your keystore. in the second one you didn't specify where your keystore is. this this and see if you have both the private key and the certificate in your keystore. keytool -keystore keystore -v -list cheers, sach On Thu, 12 Oct 2000, Kit wrote: Hi all I have a problem using the command below. keytool -keystore keystore -keyalg "RSA" -import -trustcacerts -file my.host.com.cer I get this error: keytool error: Failed to establish chain from reply But, this command worked fine keytool -import -trustcacerts -file my.host.com.cer Is there any problem using the second command, since it's missing some arguments as indicated in the ssl-how-to documentation. Thanks -kit
RE: ANSWER: How to use pooled connections in Orion?
Hi, The way you access the datasource is dependent on where will you access the datasource from. I'm currently accessing the datasource from a servlet which is pretty straightforward: InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("jdbc/SQLServerDS"); The above method might not be portable but it works for me so I mention it. Note that you don't need any special Orion datasource name. DataSource is defined in javax.sql.* The portable way which require more work is to add the following to your web.xml if you access the datasource from servlets and/or JSP: context-param param-namemyDS/param-name param-valuejdbc/SQLServerDS/param-value /context-param resource-ref descriptionA data source/description res-ref-namemyDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authCONTAINER/res-auth /resource-ref Now, you can access the datasource by: InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("java:comp/env/myDS"); --Deepak -Original Message- From: Luis M Bernardo [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 12, 2000 7:39 AM To: Goel, Deepak Subject: Re: ANSWER: How to use pooled connections in Orion? hi. thanks for posting this message, but could you show me how you make the connection (a code snippet)? Looking at old postings I see some people using a DataSource and some others a ConnectionPoolDataSource. Also, you use a DriverManagerDataSource, some other people use a ConnectionDataSource. cheers, luis On Sat, 7 Oct 2000, Goel, Deepak wrote: Hello everyone, I've seen that many people are confused over how to setup pooled connections in Orion (even I was initially). Now since I figured out through documentation and through some hit and try, I would like to share these instructions. Keep in mind that this is only one way of setting it up and there are other ways to setup depending on capabilities of the driver. 1. Basically, the first step is to create a non-pooled version of your data source. This can be done by adding something like this to your data-sources.xml: data-source class="com.evermind.sql.DriverManagerDataSource" name="SQLServerNP" location="jdbc/SQLServerNP" xa-location="jdbc/xa/SQLServerXANP" ejb-location="jdbc/SQLServerNP" connection-driver="com.inet.tds.TdsDriver" username="user" password="pwd" url="jdbc:inetdae:localhost" inactivity-timeout="30" schema="database-schemas\ms-sql.xml" / The above example is for a SQL Server data source using i-net driver. Remeber to change the connection-driver, username, password and url. 2. Now, the following step will add the pooled version. Add the following lines to data-sources.xml. data-source class="com.evermind.sql.OrionPooledDataSource" name="SQLServer" location="jdbc/SQLServerDS" xa-location="jdbc/xa/SQLServerXADS" ejb-location="jdbc/SQLServerDS" max-connections="4" source-location="jdbc/SQLServerNP" pooled-location="jdbc/SQLServerDS" inactivity-timeout="30" connection-driver="com.inet.tds.TdsDriver" url="jdbc:inetdae:localhost" / Note that the source-location should correspond to location in the 1st step. "max-connections" can be changed to suit your requirements. I'm not sure whether url and connection-driver are required here. The above steps should work for any JDBC drivers. If your driver vendor supplies a data source, step 1 will be little bit different. Also, some of the driver vendors directly provide pooled data source implementation in which case 2 steps are not needed. I could successfully use i-net OPTA PooledDataSource with Orion. --Deepak
RE: Invalidating an Entity bean
the situation is this. this is the current data model I have and entity bean called "Content" this repsents 1 row in a table called "content". The content enitity bean can have N number of images (corresponds to n number of rows in the images table) and N number of text blocks (corresponds to n number of rows in the text table). However images and text blocks are independent of content. Content is only a grouping of these assets if you like. So we get a many to many relationship. 1 content can reference many images 1 image can be referenced by many content. (same for text) so when a content entity bean loads up it loads into its attributes all the data from the images and text that it references. So lets assume all this data is now in a cache. if i then change the data in an image or text independently of the entity bean (perhaps by a session bean) then the data that is cached in the entity bean is dirty (does not match what is in the database). SO how do i notify the entity bean to refresh it's self ? Another model you hinted on was that Image and text could be enitity beans. They are certainly independent enities (qualify as enities). However i consider them to be too fine grained. For example text block could be as small as "hello this is a sentance" which is just a small string and so wrapping this small string in an entity bean seem way too much overhead. But the flip side is it would so the cache problem. the session bean would do updates via the image and text beans and so they would always contain the correct data. And content would get the data from the image and text entity bean each time. However if the content has 50 text block and 50 images that is 100 calls (one to each of the entity beans that represent this data), which as you see is a major overhead Any thoughs on how i best model this. cheers -Original Message- From: Nick Newman [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 12, 2000 5:08 PM To: Orion-Interest Subject: Re: Invalidating an Entity bean Hi Peter, I'm not claiming guru-hood, but as far as I know you CAN'T do that cleanly. My thoughts on your best options are: 1) Tell Orion that the entity beans do not have exclusive write-access to the database by setting exclusive-write-access="false" in the orion-ejb-jar.xml (which is orion-specific). I believe this causes the data to be re-read at the start of every transaction. 2) Re-write your session bean to makes its database changes through the entity beans rather than through direct JDBC. Nick At 12:02 PM 10/12/00 +0100, you wrote: Hi gurus How do I do this cleanly. I have and Entity that has attributes A,B,C and D. These attributes are all read from database tables. A and B are read from Table 1 C and D are read from Table 2 So I have Entity Bean 1, this is loaded by the app server (perhaps by a findByPrimaryKey) method. This means that Entity Bean 1 is now a cache of the data in A,B,C and D. However while this entity bean is in the cache, via a session bean I change the data of C and D in table 2. This mean that Entity Bean 1 now has dirty data. So the question is how do I force the Entity beans to do and EJB Load. Also the data in C and D in table 2 may be shared by N number of entity beans so I may need to refresh N number of Entity Beans depending on which ones are in the cache. I only want to call EJB load for Entity beans currently in the cache and of these I only want to call ejb load for the ones that refer to the changed data. Cheers Peter
Deploying a ear file, not a war file
Hi, Is it possible to create a .ear file which contains the ejb-jar file, but not the web-jar file. Orion should then retrieve it's web related files from a subdirectory. This way I can deploy the ejb's using a jar file, but test them using .jsp files, which I don't need to deploy when changing just a little code. The only way to do this I could think of right now is using two seperate deployments, one with the .ear file and one for the webroot dir. Thanks, Martijn -- _ Martijn van Berkum GX creative online development _ mailto:[EMAIL PROTECTED] _ http://www.gx.nl/
RE: How to select an other datasource then the default one?
Hello, When you deploy your application, Orion creates a subdirectory with the name of the app under application-deployments. You should see another subdirectory with the name of your ejb jar file. So for example if you have an app named myApp and myApp.ear contains myEJB.jar, then you should see orion-home/application-deployments/myApp/myEJB.jar/orion-ejb-jar.xml This file is automatically created by Orion and can be changed to suit your needs. For each entity bean deployed, there will be an entry here: entity-deployment name="Cabinet" location="Cabinet" wrapper="CabinetHome_EntityHomeWrapper7" table="cab" data-source="jdbc/SQLServerDS" validity-timeout="2" /entity-deployment For more info, look at the documentation for this file: http://www.orionserver.com/docs/orion-ejb-jar.xml.html --Deepak -Original Message- From: Frank Eggink [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 12, 2000 12:28 AM To: Orion-Interest Subject: RE: How to select an other datasource then the default one? Ralph and others, My datasources.xml looks like: ?xml version="1.0"? !DOCTYPE data-sources PUBLIC "Orion data-sources" "http://www.orionserver.com/dtds/data-sources.dtd" data-sources data-source name="Default data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/DefaultDS" pooled-location="jdbc/DefaultPooledDS" xa-location="jdbc/xa/DefaultXADS" ejb-location="jdbc/DefaultEJBDS" url="jdbc:HypersonicSQL:./database/DB" connection-driver="org.hsql.jdbcDriver" username="xxx" password="xxx" / data-source name="Default data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/TestDS" pooled-location="jdbc/TestPooledDS" xa-location="jdbc/xa/TestXADS" ejb-location="jdbc/TestEJBDS" url="jdbc:HypersonicSQL:./database/Test" connection-driver="org.hsql.jdbcDriver" username="xxx" password="xxx" / /data-sources Guess there is not much wrong in that. The trouble I have is making the application point to the right datasource. Using CMP I would expect you can add some option somewhere to tell the server to use that connection, but where do I need to put the great 'use-this-datasource' option? Orion-application.xml seemed logical to me. Frank On Wednesday, October 11, 2000 8:41 PM, Ralph Crawford [SMTP:[EMAIL PROTECTED]] wrote: Here's an example of a data-sources.xml file with two different datasources... data-source name="Default data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/DefaultDS" pooled-location="jdbc/DefaultPooledDS" xa-location="jdbc/xa/DefaultXADS" ejb-location="jdbc/DefaultEJBDS" url="jdbc:oracle:thin:@blah.domain.com:1521:dbinstance" connection-driver="oracle.jdbc.driver.OracleDriver" username="username" password="password" / data-source name="Othert data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/OtherDS" pooled-location="jdbc/OtherPooledDS" url="jdbc:postgresql://blah.domain.com:5432/postgres" connection-driver="postgresql.Driver" username="username" password="password" / Obviously, in this case, I've got both the Oracle and Postgres drivers in my orion/lib directory. Then when you want to get a pooled connection, you'd use... connection = ((javax.sql.DataSource) ctx.lookup("jdbc/DefaultPooledDS")).getConnection(); and if you wanted to use the other database, you'd use jdbc/OtherPooledDS instead of jdbc/DefaultPooledDS. Hope this helps. Ralph From: Frank Eggink [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: How to select an other datasource then the default one? Date: Wed, 11 Oct 2000 15:19:04 +0200 MIME-Version: 1.0 Received: from [195.84.237.200] by hotmail.com (3.2) with ESMTP id MHotMailBBADCD3A0024D82197D8C354EDC808540; Wed Oct 11 08:07:44 2000 Received: from druid.evermind.net (IDENT:[EMAIL PROTECTED] [127.0.0.1])by druid.evermind.net (8.9.3/8.9.3) with SMTP id PAA10617;Wed, 11 Oct 2000 15:26:20 -0100 Received: from post.mail.nl.demon.net (post-10.mail.nl.demon.net [194.159.73.20])by paladin.evermind.net (8.9.3/8.9.3) with ESMTP id QAA06513for [EMAIL PROTECTED]; Wed, 11 Oct 2000 16:22:12 -0400 Received: from [212.238.78.167] (helo=barabas)by post.mail.nl.demon.net with smtp (Exim 3.14 #2)id 13jLql-0003J1-00for [EMAIL PROTECTED]; Wed, 11 Oct 2000
RE: Invalidating an Entity bean
Sorry, but as I said, there is (as far as I know) no clean (ie. portable) way to tell an entity bean to refresh itself. The specs even specifically say that an entity bean does NOT have to worry about the database being changed "behind its back" (although you should peraps check the exact details). I agree that separate entity beans seem to be too small. How about using dependent objects? If you had a big entity bean that contained Collections of dependent objects (images and text) then changing these dependent objects inside the bean will leave the bean in a "clean" state. The changes will be persisted to the DB automatically. (EJB 2.0 would perhaps be better than EJB 1.1 for this approach). I'll have to leave you to decide if that's really workable. If you decide you have to stick with direct JDBC access to write to the DB from a Session bean, then I think you'll be stuck with non-portable solutions. Good luck! Nick At 07:59 PM 10/12/00 +0100, you wrote: the situation is this. this is the current data model I have and entity bean called "Content" this repsents 1 row in a table called "content". The content enitity bean can have N number of images (corresponds to n number of rows in the images table) and N number of text blocks (corresponds to n number of rows in the text table). However images and text blocks are independent of content. Content is only a grouping of these assets if you like. So we get a many to many relationship. 1 content can reference many images 1 image can be referenced by many content. (same for text) so when a content entity bean loads up it loads into its attributes all the data from the images and text that it references. So lets assume all this data is now in a cache. if i then change the data in an image or text independently of the entity bean (perhaps by a session bean) then the data that is cached in the entity bean is dirty (does not match what is in the database). SO how do i notify the entity bean to refresh it's self ? Another model you hinted on was that Image and text could be enitity beans. They are certainly independent enities (qualify as enities). However i consider them to be too fine grained. For example text block could be as small as "hello this is a sentance" which is just a small string and so wrapping this small string in an entity bean seem way too much overhead. But the flip side is it would so the cache problem. the session bean would do updates via the image and text beans and so they would always contain the correct data. And content would get the data from the image and text entity bean each time. However if the content has 50 text block and 50 images that is 100 calls (one to each of the entity beans that represent this data), which as you see is a major overhead Any thoughs on how i best model this. cheers -Original Message- From: Nick Newman [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 12, 2000 5:08 PM To: Orion-Interest Subject: Re: Invalidating an Entity bean Hi Peter, I'm not claiming guru-hood, but as far as I know you CAN'T do that cleanly. My thoughts on your best options are: 1) Tell Orion that the entity beans do not have exclusive write-access to the database by setting exclusive-write-access="false" in the orion-ejb-jar.xml (which is orion-specific). I believe this causes the data to be re-read at the start of every transaction. 2) Re-write your session bean to makes its database changes through the entity beans rather than through direct JDBC. Nick At 12:02 PM 10/12/00 +0100, you wrote: Hi gurus How do I do this cleanly. I have and Entity that has attributes A,B,C and D. These attributes are all read from database tables. A and B are read from Table 1 C and D are read from Table 2 So I have Entity Bean 1, this is loaded by the app server (perhaps by a findByPrimaryKey) method. This means that Entity Bean 1 is now a cache of the data in A,B,C and D. However while this entity bean is in the cache, via a session bean I change the data of C and D in table 2. This mean that Entity Bean 1 now has dirty data. So the question is how do I force the Entity beans to do and EJB Load. Also the data in C and D in table 2 may be shared by N number of entity beans so I may need to refresh N number of Entity Beans depending on which ones are in the cache. I only want to call EJB load for Entity beans currently in the cache and of these I only want to call ejb load for the ones that refer to the changed data. Cheers Peter
Re: NEWBIE QUESTION: How do I shut this thing down
Robert, Check the principals.xml file in the config directory. In it you should find an entry for the admin user and his password -- see below. users user username="admin" password="123" deactivated="false" descriptionThe default administrator/description group-membership group="administrators" / group-membership group="guests" / group-membership group="users" / /user Enjoy, Hitesh Robert Keith wrote: Hi Guys, I have trawled through the docs to try and find a way to shut orion down cleanly, however I can't find the default username and password in order to shut it down. Can you guys let me know what it is? cheers Rob
No Suspension of client transactions with Bean Managed Transaction
Friends, I have an entity bean which calls a stateless session bean's method from within its ejbCreate method. I need to ensure the highest level of transaction isolation (serializable) for the database read performed in the session bean method. Because a connection's isolation level must be set outside of any transaction, I assume I am forced to use bean managed transaction for this session bean. When I attempt to run this (using jdk1.2.2 from sun, linux RedHat6.2, Orion1.2.9, Postgres7 database) I get a java.sql.SQLException (stack trace below). I am setting the isolation level right after I first get a connection from the data-source, and I do no updates and start no transactions in my session bean before setting this level. When I use Sybase instead of Postgres, I get a bit further, but end up getting a different exception (Stack trace follows below). From some debug statements, I've managed to deduce that when I first get the UserTransaction (in the business method of the Session Bean), it has Status.STATUS_ACTIVE. It stays this way through beginning a transaction, performing updates and selects from Sybase, and committing the transaction. However, after commit() is called, the status is Status.STATUS_NO_TRANSACTION. When this method completes, and the EntityBean's ejbCreate method resumes, I get an OrionRemoteException (that's the second stacktrace given). It seems to me that when the Session Bean's method begins, the client transaction has NOT been suspended. This seems to be in violation of the spec. What gives? Has anyone ever managed to use bean managed transactions using Orion and these databases? Using Posgres7 -- javax.transaction.TransactionRolledbackException: java.sql.SQLException: ERROR: SET TRANSACTION ISO LATION LEVEL must be called before any query at com.evermind.server.ejb.EJBUtils.getUserException(JAX) at MessageNumberManager_StatelessSessionBeanWrapper15.nextMessageNumber(MessageNumberManager _StatelessSessionBeanWrapper15.java:49) at com.dbusa.ejb.message.MessageBean.ejbCreate(MessageBean.java:84) at MessageHome_EntityHomeWrapper55.create(MessageHome_EntityHomeWrapper55.java:647) at com.dbusa.util.message.MessageCreator.createMessage(MessageCreator.java:83) at com.dbusa.util.message.MessageCreator.createMessage(MessageCreator.java:57) at java.lang.reflect.Method.invoke(Native Method) at org.webmacro.util.PropertyOperator.invoke(PropertyOperator.java:788) at org.webmacro.util.DirectAccessor.get(PropertyOperator.java:1012) at org.webmacro.util.PropertyOperator.getProperty(PropertyOperator.java:535) at org.webmacro.util.PropertyOperator.getProperty(PropertyOperator.java:89) at org.webmacro.Context.getLocal(Context.java:401) at org.webmacro.Context.getProperty(Context.java:339) at org.webmacro.engine.PropertyVariable.getValue(PropertyVariable.java:28) at org.webmacro.engine.Variable.evaluate(Variable.java:128) at org.webmacro.engine.Variable.write(Variable.java:156) at org.webmacro.engine.Block.write(Block.java:56) at org.webmacro.engine.IfDirective.write(IfDirective.java:161) at org.webmacro.engine.Block.write(Block.java:56) at org.webmacro.engine.IfDirective.write(IfDirective.java:154) at org.webmacro.engine.Block.write(Block.java:56) at org.webmacro.engine.WMTemplate.write(WMTemplate.java:251) at org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacro Service.java:237) at org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacro Service.java:208) at org.apache.turbine.services.webmacro.TurbineWebMacro.handleRequest(TurbineWebMacro.java:1 07) at org.apache.turbine.modules.screens.WebMacroSiteScreen.buildWMTemplate(WebMacroSiteScreen. java:192) at org.apache.turbine.modules.screens.WebMacroSiteScreen.buildTemplate(WebMacroSiteScreen.ja va:145) at org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.java:124) at org.apache.turbine.modules.Screen.build(Screen.java:100) at org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:126) at org.apache.turbine.modules.layouts.WebMacroSiteLayout.doBuild(WebMacroSiteLayout.java:106 ) at org.apache.turbine.modules.Layout.build(Layout.java:93) at org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:120) at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:171) at org.apache.turbine.modules.Page.build(Page.java:92) at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:119) at org.apache.turbine.Turbine.doGet(Turbine.java:366) ---Using Sybase -- com.evermind.server.rmi.OrionRemoteException: User interference with CMP
JMS QueueReceiver.receiveNoWait() blocks!
The following code blocks until a message appears on a queue: queueReceiver.receiveNoWait(); We are using orionserver 1.3.8. Cheers, Simon.
RE: Charsets, i18n and confusion
Richard, Thanks for this - would you mind just verifying the procedure? I'm sure it will be useful to others in the future for the archives. 1. My web form arrives to the user encoded in Big5 (using default-charset="Big5" in the orion-web.xml file). 2. The user fills in lots of Big5 characters (which are represented on screen, but underneath are just Big5 encoded ASCII correct?) 3. When the form is submitted, the encoding of the form is Big5. First Q: Can you give me a quick code snippet to convert that to a storable format? Do I need to convert it to Unicode? 4. The data is now stored in the EJB in a portable manner. 5. A user requests to view a page, and the EJB is retrieved, it's content accessed through ejb.getParameter() and displayed on my page. The page is encoded again in Big5 - it should just turn up now correct? Thanks in advance - you really are a lifesaver, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Richard Chuo Sent: Friday, October 13, 2000 12:22 AM To: Orion-Interest Subject: Re: Charsets, i18n and confusion Hello Mike, DB - EJB - getter method - web site What encodings should I use where? If the text is Big5 encoded ASCII (is that right? text typed from a Big5 keyboard into the form) do I need to manually convert it to unicode somehow before putting it in the entity bean? Did you changed the encoding when getting the parameters from the web form? We use java.io.InputStreamReader to change the encoding to "Big5". Does it matter what encoding the entry form page is in? Will it affect the result? Yes, it does. Good luck! Richard Chuo
RE: Invalidating an Entity bean
Have you tried putting a "required" in the transaction for the entity bean? Also, if the session bean is not using the entity bean to make the change in the table, you can't use any of the j2ee transaction stuff. I would only change the table 2 through the entity bean. You can do that in the session bean by calling the home, and findby to grab your entity bean, then make the change to table 2. This way you always have the bean fresh. If you are worried about having lots of beans lying around, you can make sure that you only have one instance of your entity bean in your session bean. The petstore example in the j2ee blueprint uses this approach. Regards, Lawrence -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Delahunty Sent: Thursday, October 12, 2000 4:02 AM To: Orion-Interest Subject: Invalidating an Entity bean Hi gurus How do I do this cleanly. I have and Entity that has attributes A,B,C and D. These attributes are all read from database tables. A and B are read from Table 1 C and D are read from Table 2 So I have Entity Bean 1, this is loaded by the app server (perhaps by a findByPrimaryKey) method. This means that Entity Bean 1 is now a cache of the data in A,B,C and D. However while this entity bean is in the cache, via a session bean I change the data of C and D in table 2. This mean that Entity Bean 1 now has dirty data. So the question is how do I force the Entity beans to do and EJB Load. Also the data in C and D in table 2 may be shared by N number of entity beans so I may need to refresh N number of Entity Beans depending on which ones are in the cache. I only want to call EJB load for Entity beans currently in the cache and of these I only want to call ejb load for the ones that refer to the changed data. Cheers Peter