taglib processing
Hello In ScreenDefinitions.jsp in Sun's Pet Store demo (which I haven't tried to run), I see: j2ee:Screen screen="%=ScreenNames.MAIN_SCREEN%" When I try to make my own taglib perform the same trick under Orion, the expression is not processed at all, and so my tag foo:mytag value="view.%= bar %"/ receives the literal string "view.%= bar %" instead of having the contents of bar stuck in there. Is the order of processing configurable somewhere? Can anyone suggest where I'm going wrong there? -- Thomas Munro [EMAIL PROTECTED] http://www.gi-technology.com/ GI Technology (Paris)
Re: taglib processing
On Fri, 26 May 2000, Thomas Munro wrote: In ScreenDefinitions.jsp in Sun's Pet Store demo (which I haven't tried to run), I see: j2ee:Screen screen="%=ScreenNames.MAIN_SCREEN%" When I try to make my own taglib perform the same trick under Orion, the expression is not processed at all, and so my tag foo:mytag value="view.%= bar %"/ receives the literal string "view.%= bar %" instead of having the contents of bar stuck in there. Is the order of processing configurable somewhere? Can anyone suggest where I'm going wrong there? In taglib.tld, set the value of the rtexprvalue to "true" for the "value" attribute. --- Joseph B. Ottinger [EMAIL PROTECTED] http://cupid.suninternet.com/~joeo HOMES.COM Developer
RE: taglib processing
This is a problem with your taglib being contra to the spec I believe. Attributes in tags must be completely runtime expressions, or completely compile time. Change foo:mytag value="view.%= bar %"/ to foo:mytag value="%= "view." + bar %"/ and it will work perfectly ;) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Munro Sent: Saturday, 27 May 2000 12:08 To: Orion-Interest Subject: taglib processing Hello In ScreenDefinitions.jsp in Sun's Pet Store demo (which I haven't tried to run), I see: j2ee:Screen screen="%=ScreenNames.MAIN_SCREEN%" When I try to make my own taglib perform the same trick under Orion, the expression is not processed at all, and so my tag foo:mytag value="view.%= bar %"/ receives the literal string "view.%= bar %" instead of having the contents of bar stuck in there. Is the order of processing configurable somewhere? Can anyone suggest where I'm going wrong there? -- Thomas Munro [EMAIL PROTECTED] http://www.gi-technology.com/ GI Technology (Paris)
RE: taglib processing
foo:mytag value="view.%= bar %"/ receives the literal string "view.%= bar %" instead of having the contents of bar stuck in there. In taglib.tld, set the value of the rtexprvalue to "true" for the "value" attribute. Also, try changing your tag to foo:mytag value="%= "view." + bar %"/. I'm unsure as to where this is in the spec, but I find taglibs only seem to recognise dynamic expressions if the entire attribute is in %= %. -Joe Walnes
Auto-deploy SQL errors - PostgreSQL on Linux
I just set up Orion server on Linux and PostgreSQL 7.0 as the backend database. When I tried to set up and deploy the sample applications (ATM and News), I received the following errors: ** Auto-deploying news-ejb.jar... SQL error: ERROR: parser: parse error at or near ")" Auto-deploying atm-ejb.jar... SQL error: ERROR: parser: parse error at or near ")" [... several tables are successfully created ...] Auto-creating table: create table com_acme_atm_ejb_AccountOwner_accounts (value varchar(255) not null, username_ varchar(255) not null, primary key (value, username_)) Warning: Error creating table: ERROR: Cannot create index: 'com_acme_atm_ejb_accountow_pkey' already exists ** When I subsequently accessed the ATM application and tried to register a new user, a SQLException was thrown: "Relation 'com_acme_atm_ejb_accountowner_a' does not exist. Earlier, I set up the same sample applications using HypersonicSQL as the backend database and there were no errors at all - with deployment or when accessing them. Do I have something configured incorrectly, or does Orion server have inherent problems when paired with PostgreSQL? Also, is there any way to turn on some diagnostic logging that will produce more detailed (and useful) error messages? I looked through the various logs in Orion's log directory and there were no errors at all. The documentation is of very little use for troubleshooting. Any help would be greatly appreciated. Thanks, -Christopher Morley
Re: How are database JOINS achieved with EJBs?
Al: YES. I'm starting off with the hypothesis that all database tables should map to EJBs, because that is what all the hype is about. Now, for real world, does it work well? Is you answer that one should make create an EJB that is not CMP, but rather one supplies a hand crafter SQL command somewhere in its member functions? STeve Punte e-Business Software Architect Technologent Inc [EMAIL PROTECTED] - Original Message - From: Al Fogleson [EMAIL PROTECTED] To: Steven Punte [EMAIL PROTECTED]; Orion-Interest [EMAIL PROTECTED] Sent: Tuesday, May 23, 2000 6:34 PM Subject: Re: How are database JOINS achieved with EJBs? you can do it the same way using BMP. Although I would be careful, I think we, as programmers have convinced ourselves that if something is in a database it MUST be an entity bean. This attitude seems to prevail all over, even at my work, where I am having a heck of a time convincing people it is just not so, or doesnt have to be :) Al - Original Message - From: "Steven Punte" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Thursday, May 25, 2000 8:52 PM Subject: How are database JOINS achieved with EJBs? Dear EJB Community: Entity java beans pretty much represent a row of data in a database table. If one has: Table XTable Y -- -- A B C DD E F G One commonly executes a SQL command like: select A from X join Y on X.D=Y.D where Y.G ="Bill Clinton" How would one do the equivalent task in an elegant "Enterprise Java Bean" like manner? That is, other than simply writing some member function that performs a JDBC select command like above. Inquiring Minds Want To Know -- STeve Punte e-Business Software Architect Technologent Inc [EMAIL PROTECTED]
Re: How are database JOINS achieved with EJBs?
Porfiriev: I'm not yet that familiar with EJBs. Can you clarify, or re-state you solution below? I don't understand what you are suggesting. Thanks STeve Punte e-Business Software Architect Technologent Inc [EMAIL PROTECTED] - Original Message - From: Porfiriev Sergey [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Cc: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, May 25, 2000 11:47 PM Subject: Re: How are database JOINS achieved with EJBs? Hello Steven, Friday, May 26, 2000, 4:52:00 AM, you wrote: example: Write folowing in yours Home interface or ( deployment orion ejb-jar.xml (full: not included) public static final String findByID_STORE_AND_ID_GRP_ORDER_BY_NAME_query= "full:SELECT PL.Id_Pricelist, PL.Datestart, PL.Datestop, PL.Discount, PL.Id_Product, PL.Id_Status, PL.Itemcomment, PL.Oldprice, PL.Price, PL.Quantity FROM PriceList PL, Product P WHERE PL.ID_PRODUCT=P.ID_PRODUCT AND PL.ID_STATUS'0' AND PL.ID_STATUS IS NOT NULL AND P.ID_STORE=$1 AND P.ID_GRP=$2 ORDER BY P.PRODUCTNAME" public static final String findByID_INVITEM_query= "Id_Value in ( select Id_Value from OrderedValues where Id_InvItem=$1 )"; SP Dear EJB Community: SP Entity java beans pretty much represent a row of data SP in a database table. SP If one has: SP Table XTable Y SP -- -- SP A B C DD E F G SP One commonly executes a SQL command like: SP select A from X join Y on X.D=Y.D where Y.G ="Bill Clinton" SP How would one do the equivalent task in an elegant SP "Enterprise Java Bean" like manner? That is, other SP than simply writing some member function that performs SP a JDBC select command like above.