PetStore Demo for Orion
Has anyone successfully run the Pet Store Demo under Orion? The installation instructions for Pet Store for Orion werent exactly accurate and I think this maybe the reason the login feature as well as catalog search feature is not working properly. Thanks, Kirk S. Kalvar
UserTransaction
Hello, as described in your FAQ i tried the (TransactionManager)context.lookup("java:comp/UserTransaction"); but i get always the exception "java:comp/UserTransaction not found" questions: - why to do tm = (TransactionManager)initial.lookup("java:comp/UserTransaction"); and not ut = (UserTransaction)initial.lookup("java:comp/UserTransaction"); ? - can i change my code to ut = (UserTransaction)tm; ? thanks klaus -- Klaus Thiele - Personal Informatik AG mailto:[EMAIL PROTECTED] "There's got to be more to life than compile-and-go."
RE: PetStore Demo for Orion
Additionally the PetStore Demo on the Orion web site has both of these features working properly. Kirk S. Kalvar, Software Engineer DRS Electronic Systems Group -Original Message- From: Kirk Kalvar [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, June 14, 2000 05:59 To: Orion-Interest Subject: PetStore Demo for Orion Has anyone successfully run the Pet Store Demo under Orion? The installation instructions for Pet Store for Orion weren't exactly accurate and I think this maybe the reason the login feature as well as catalog search feature is not working properly. Thanks, Kirk S. Kalvar
RE: find by Set
I would like to make a finder method like this: Collection findByIds( Set idSet ) which should make a query like: "SELECT * FROM a WHERE a.id IN ?" Is anything like this possible in Orion? I posted a similar question last week, and it turns out... no. Oh well, I'm sure it won't be long until the trusty Orion lot let us do it :) -Joe Walnes
RE: Can't deploy example atm with datasource db2
How can I change the type-mapping from longvarbinary to longvarchar for the LogEntries ? If you look in [orion-dir]/config/database-schemas you will find a bunch of xml files with type-mappings for various databases. Copy one of these files to db2.xml and edit it to reflect the appropriate type mappings. (see http://www2.orionserver.com/docs/database-schema.xml.html ) In config/data-sources.xml, edit the data-source being used by the application so it has the parameter schema="database-schemas/db2xml". -Joe Walnes
Accessing transaction in entity bean
Hi, i have a question, if it is possible to bypass the spec's limitation on transactions in entity beans. I'd like to get the current transaction in an entity beans business method, in order to register a Synchronization object, which will be called at the end of the transaction. Doing the following in a beans method does not throw any exceptions - but it does neither do the desired effect, as if the getTransaction call would create a new Transaction object rather than retrieving the actual associated one. Is there another jndi name for orion's container managed transaction manager? If so, is this defined by the spec or is it proprietary? Or does anybody know a completely different method to achieve the desired? ... try { Context initial = new InitialContext(); TransactionManager tm = (TransactionManager)initial.lookup("java:comp/UserTransaction"); Transaction t = tm.getTransaction(); t.registerSynchronization(new TestSync()); } catch (Exception e) {System.err.println("JNDI call failed.");} ... public class TestSync implements Synchronization { public void beforeCompletion() { System.err.println("TestSync: Before Completition"); } public void afterCompletion(int status) { System.err.println("TestSync: After Completition, status is "+status); } } Regards, Jens Stutte [EMAIL PROTECTED], http://www.netmedia.de NetMedia GmbH Neugrabenweg 5-7 66123 Saarbruecken Germany fon: +49 (0) 681 - 3 79 88 - 0 fax: +49 (0) 681 - 3 79 88 - 99
RE: Can't deploy example atm with datasource db2
Hi Esa, Hi Joe ! Thank you for the quick reponse, but my question was not so exactly. Sorry. I know database-schemes. The field "value" is generated for the serialized "LogEntryBeans" from orion. In the database-schemes the "type" is the Java-Class and the "name" is the Column-Type in the database. So the entry for name should be name="long varchar", but what is the entry for type ? Matthias Here is my database-scheme: ?xml version="1.0"? !DOCTYPE database-schema PUBLIC "-//Evermind//- Database schema" "http://www.orionserver.com/dtds/database-schemas.dtd" database-scheme max-table-name-length="25" name="DB2" not-null="not null" null="" primary-key="primary key" type-mapping type="java.lang.String" name="varchar (255)" / type-mapping type="int" name="integer" / type-mapping type="long" name="integer" / type-mapping type="float" name="float" / type-mapping type="double" name="double precision" / type-mapping type="byte" name="smallint" / type-mapping type="char" name="char" / type-mapping type="short" name="integer" / type-mapping type="boolean" name="bit" / type-mapping type="java.util.Date" name="date" / type-mapping type="java.math.BigDecimal" name="decimal(10,5)" / disallowed-field name="parent" / disallowed-field name="password" / disallowed-field name="username" / disallowed-field name="date" / /database-scheme
Two Instances of orion
I have one instance of orion running on the default port 80 now I want to run another instance of orion on another port (say 88) by using java -jar orion.jar also i should be able to shut this instance down using java -jar shutdown.jar and all this time the previous instance of orion should be on.Is there some way to do this im pretty new to orion...if any of u guys have anyideas please help me out.Like is there something i can put in the classpath java -jar orion.jar port="88" Thank you for your time Hashim Merchant winmail.dat
RE: Can't deploy example atm with datasource db2
In the database-schemes the "type" is the Java-Class and the "name" is the Column-Type in the database. So the entry for name should be name="long varchar", but what is the entry for type ? java.io.Serializable -Joe Walnes
BMP connection pooling
I'm running a series of performance tests as both a learning tool and to assist our chief designer, and am converting our test suite from CMP to BMP. I'm confused about how Orion manages jdbc connection pooling. The mail archive discussion I found , from last November, is adding to the fog The following snippet from data-sources.xml would suggest that it's possible to obtain either a pooled or non-pooled connection by using either jdbc/DefaultDS or jdbc/DefaultPooledDS - but I'm getting similar benchmark times using either one (by changing which line is commented in getConnection, below). Could someone tell me what is being returned by either of these, if I'm headed in the right direction, and where to look if I'm not? Thanks! Kirk Yarina 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:defaultdb" connection-driver="org.hsql.jdbcDriver" username="sa" password="" schema="database-schemas/hypersonic.xml" / private Connection getConnection() { //String dsName = "jdbc/DefaultPooledDS"; // Pooled connections? String dsName = "jdbc/DefaultDS"; // non-pooled connections? InitialContext initialContext = null; try { initialContext = new InitialContext(); } catch ( Exception ex ) { System.err.println( "-- Getting Initial Context --" ); ex.printStackTrace( System.err ); throw new EJBException ( "getting Sequence InitialContext, " + ex.getMessage() ); } try { DataSource ds = (DataSource) initialContext.lookup( dsName ); return ds.getConnection(); } catch ( Exception ex ) { System.err.println ( "-- looking up DataSource '" + dsName + "' --" ); ex.printStackTrace( System.err ); throw new EJBException ( "looking up dsName '" + dsName + "', " + ex.getMessage() ); } } Kirk Yarina [EMAIL PROTECTED]
Re: Two Instances of orion
Hi, In orion/config/default-web-app.xml change the web port number. If you want to use EJBs you must also change the rmi port number in rmi.xml, and of course change the url in your application client's jndi.properties file. Regards, About shutdown I cannot help, I use CTRL+C ;-) Hashim Merchant wrote: I have one instance of orion running on the default port 80 now I want to run another instance of orion on another port (say 88) by using java -jar orion.jar also i should be able to shut this instance down using java -jar shutdown.jar and all this time the previous instance of orion should be on.Is there some way to do this im pretty new to orion...if any of u guys have anyideas please help me out.Like is there something i can put in the classpath java -jar orion.jar port="88" Thank you for your time Hashim Merchant Name: winmail.dat winmail.datType: application/ms-tnef Encoding: base64
RE: PetStore Demo for Orion
Kirk, I have recently gone through this. Here are my observations on what to do. Referring to the steps in Orion's estore-install.txt file: re: 2) There are two data sources required, one for "jdbc/EstoreDataSource" and one for "jdbc/InventoryDataSource". For example: data-source name="JPS EStore data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/EstoreDataSource" pooled-location="jdbc/EStorePooledDS" xa-location="jdbc/xa/EStoreXADS" ejb-location="jdbc/EStoreEJBDS" url="jdbc:HypersonicSQL:estoredb" connection-driver="org.hsql.jdbcDriver" username="sa" password="" / data-source name="JPS Inventory data-source" class="com.evermind.sql.ConnectionDataSource" location="jdbc/InventoryDataSource" pooled-location="jdbc/InventoryPooledDS" xa-location="jdbc/xa/InventoryXADS" ejb-location="jdbc/InventoryEJBDS" url="jdbc:HypersonicSQL:estoredb" connection-driver="org.hsql.jdbcDriver" username="sa" password="" / re: 4) I ran a Hypersonic.sql script (copied and edited Sysbase.sql) to create the pet store database. (We also created an Interbase.sql script.) All the tables are in one database, so both data sources in 2) point to this. re: 9) You are correct, step 9 cannot be completed until after the web application has been deployed the first time. re: 11) The -Djsp.reuse.tags=false java option must be used to run this application under orion. At this point you can browse the pet store and put things in the cart. You should also create a user named 'j2ee' belonging to the 'customers' group in the principals.xml for the application. However, an order cannot be committed since there is no provision for HypersonicSQL in the demo. I modified com/sun/estore/order/ejb/OrderDAO.java and created com/sun/estore/order/ejb/OrderDAOHypersonic.java This also requires one new method in com/sun/estore/util/Calendar.java. I found it helpful to enable debugging by recompiling com/sun/estore/util/Debug.java and setting the debug flag to true. I would be glad to share these files. If someone on the orion team would let me know where to send them, they may be posted or integrated into the estore-patched application. Regards, Earl At 10:22 6/14/00 -0400, Kalvar, Kirk wrote: applications/estore-install.txt for step 9 directory orion/application-deployments/petstore/estore/ does not exist at this point in the installation process. Kirk S. Kalvar, Software Engineer DRS Electronic Systems Group -Original Message- From: Kalvar, Kirk [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, June 14, 2000 08:02 To: Orion-Interest Subject:RE: PetStore Demo for Orion Additionally the PetStore Demo on the Orion web site has both of these features working properly. Kirk S. Kalvar, Software Engineer DRS Electronic Systems Group -Original Message- From: Kirk Kalvar [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, June 14, 2000 05:59 To: Orion-Interest Subject: PetStore Demo for Orion Has anyone successfully run the Pet Store Demo under Orion? The installation instructions for Pet Store for Orion weren't exactly accurate and I think this maybe the reason the login feature as well as catalog search feature is not working properly. Thanks, Kirk S. Kalvar Earl Marwil SCIENTECH, Inc. 1690 International Way Idaho Falls, ID 83402 208.525.3717
Re: BMP connection pooling
Hello Kirk, You should use the datasource specified by the EJB-location. In your case that is jdbc/DefaultEJBDS. Regards, Karl Avedal KirkYarina wrote: I'm running a series of performance tests as both a learning tool and to assist our chief designer, and am converting our test suite from CMP to BMP. I'm confused about how Orion manages jdbc connection pooling. The mail archive discussion I found , from last November, is adding to the fog The following snippet from data-sources.xml would suggest that it's possible to obtain either a pooled or non-pooled connection by using either jdbc/DefaultDS or jdbc/DefaultPooledDS - but I'm getting similar benchmark times using either one (by changing which line is commented in getConnection, below). Could someone tell me what is being returned by either of these, if I'm headed in the right direction, and where to look if I'm not? Thanks! Kirk Yarina 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:defaultdb" connection-driver="org.hsql.jdbcDriver" username="sa" password="" schema="database-schemas/hypersonic.xml" / private Connection getConnection() { //String dsName = "jdbc/DefaultPooledDS"; // Pooled connections? String dsName = "jdbc/DefaultDS"; // non-pooled connections? InitialContext initialContext = null; try { initialContext = new InitialContext(); } catch ( Exception ex ) { System.err.println( "-- Getting Initial Context --" ); ex.printStackTrace( System.err ); throw new EJBException ( "getting Sequence InitialContext, " + ex.getMessage() ); } try { DataSource ds = (DataSource) initialContext.lookup( dsName ); return ds.getConnection(); } catch ( Exception ex ) { System.err.println ( "-- looking up DataSource '" + dsName + "' --" ); ex.printStackTrace( System.err ); throw new EJBException ( "looking up dsName '" + dsName + "', " + ex.getMessage() ); } } Kirk Yarina [EMAIL PROTECTED]
Re: Two Instances of orion
Hello Hashim, You set the port to listen to for a certain site in the web-site.xml file. You don't need two instances of Orion to serve 2 different ports, just set up a new site (for example by copying the default-web-site.xml, modifying it, and linking it from server.xml). However, if you do want 2 instances for some other reason, remember to change the RMI port as well (and JMS if you use that) in rmi.xml and jms.xml. Regards, Karl Avedal Hashim Merchant wrote: I have one instance of orion running on the default port 80 now I want to run another instance of orion on another port (say 88) by using java -jar orion.jar also i should be able to shut this instance down using java -jar shutdown.jar and all this time the previous instance of orion should be on.Is there some way to do this im pretty new to orion...if any of u guys have anyideas please help me out.Like is there something i can put in the classpath java -jar orion.jar port="88" Thank you for your time Hashim Merchant Name: winmail.dat winmail.datType: application/ms-tnef Encoding: base64
very basic question
I have a most basic problem that I can't seem to get beyond. I've read the FAQ, mailing list archives, and all docs. I have a new application I want to deploy (app1). It has only static html in it. I've created the application dir structure as noted in the "how to create an application" I've created the various xml docs and made the entries in the server.xml and default-web-site.xml files as stated in the docs. The server starts up fine but I can't find the index.html page. I've tried: localhost/app1/index.html, localhost/app1-web/index.html, localhost/app1/app1-web/index.html but nothing seems to find the page. here is the top level dir: /orion/app1 My question: what should the url be to access the page? thanks, clint
Re: very basic question
Hello Clint, how does your dir structure and your configuration look? It would make it easier for us to help Regards, Karl Avedal Clint Scott wrote: I have a most basic problem that I can't seem to get beyond. I've read the FAQ, mailing list archives, and all docs. I have a new application I want to deploy (app1). It has only static html in it. I've created the application dir structure as noted in the "how to create an application" I've created the various xml docs and made the entries in the server.xml and default-web-site.xml files as stated in the docs. The server starts up fine but I can't find the index.html page. I've tried: localhost/app1/index.html, localhost/app1-web/index.html, localhost/app1/app1-web/index.html but nothing seems to find the page. here is the top level dir: /orion/app1 My question: what should the url be to access the page? thanks, clint
FW: Two Instances of orion
Forwarded for the benefit of everyone -Original Message- From: Victor A. Salaman Sent: Wednesday, June 14, 2000 12:45 PM To: 'Hashim Merchant' Subject: RE: Two Instances of orion Hi Hashim: First, you don't need to run two different instances of Orion. One of them will suffice for those purposes. Step1: Open up your server.xml file, it will look like this: ?xml version="1.0"? !DOCTYPE application-server PUBLIC "Orion Application Server Config" "http://www.orionserver.com/dtds/application-server.dtd" application-server application-directory="../applications" deployment-directory="../application-deployments" rmi-config path="./rmi.xml" / jms-config path="./jms.xml" / principals path="./principals.xml" / logfile path="../log/server.log" //log global-application name="default" path="application.xml" / application name="tb" path="file:///c:/tb/application/"/ web-site path="./default-web-site.xml" / compiler executable="jikes" classpath="c:/jdk1.3/jre/lib/rt.jar" / /application-server Well, just add a line such this to the file, web-site path="./myothersite.xml" / As you can see, it's this easy.. now all you need to do is make a copy of "default-web-site.xml" and modify the new file.which in the example is "myothersite.xml" You will see that the header of this files looks much like: web-site log-request-info="true" host="[ALL]" port="80" display-name="Default" ... Now you'll need to change the port to "88" and you'll be all set If you wanted to have multiple sites with port "80", instead of different ports.. you would modify both files and replace the [ALL] with the address you want to bind that web-site to, and keep port "80" on both. Any more questions, just let us know :) Victor Salaman -- The Unofficial Orion Support team -- -Original Message- From: Hashim Merchant [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 14, 2000 1:46 PM To: Orion-Interest Subject: Two Instances of orion I have one instance of orion running on the default port 80 now I want to run another instance of orion on another port (say 88) by using java -jar orion.jar also i should be able to shut this instance down using java -jar shutdown.jar and all this time the previous instance of orion should be on.Is there some way to do this im pretty new to orion...if any of u guys have anyideas please help me out.Like is there something i can put in the classpath java -jar orion.jar port="88" Thank you for your time Hashim Merchant
Re: UserTransaction in SessionBean
Hello Klaus, We'll check this out, it does seem weird, Regards, Karl Avedal Klaus Thiele wrote: Hello, i have a SessionBean: public class PersonBean implements SessionBean { private UserTransaction ut = null; private SessionContext ctx; [...] public void ejbCreate() throws RemoteException, CreateException { ut = ctx.getUserTransaction(); ejb-jar.xml: session transaction-typeBean/transaction-type when my client calls the create-method, i get following exception: "Only beans with user-managed transaction can invoke getUserTransaction()" did i miss something? thanks klaus -- Klaus Thiele - Personal Informatik AG mailto:[EMAIL PROTECTED] "There's got to be more to life than compile-and-go."
urgent: error accessing jar file
Hello, Q1: I have a JSP tag library which uses the ECS library from apache. Both my tag library and ECS reside as *.jar files in /WEB-INF/lib. When my test page is loaded, the initialization code of ECS reads a property file from the jar with the following statement: static { try resource = ResourceBundle.getBundle("org.apache.ecs.ecs"); } catch(Exception e) { System.err.println("Cannot find org.apache.ecs.ecs.properties."); } } Even though the file org.apache.ecs.ecs.properties is in the jar file, the error message is printed out, the resource variable is not set, and I get a NullPointerException later on. I have this very same configuration running under Tomcat. However, I have seen previous versions of Tomcat having problems accessing implicitly (through placement in /WEB-INF/lib) mapped jar files via getClassForName() and getResource(). Could it be that Orion has a similar problem? If not, why is ECS unable to read the properties file from its own jar under Orion? Q2: Do I get any further docs when I buy the product? If not, when is the documentation going to be improved? thanks, Christian Sell
Just starting with Orion - some issues
Hello List, (It was great meeting some of you at the JavaOne conference, hello to you all!) For my first try at Orion, I migrated a little quick dirty site from JRun 2.3.3b153. The site is just made up of JSP pages with inline Java doing various simple things. Here are some issues I discovered: - Orion can't parse multi-line statements, like this: % String thisString = "this is a really long string that I want to appear lined-up"; % JRun does. - JRun automatically includes the java.io.* package, you don't have to do a page include manually if you use something like a java.io.BufferedReader in a JSP page. I just wondered whether or not these issues were known. Thanks, Doug -- Doug Smith Senior Developer Eviciti Corp. http://www.eviciti.com mailto:[EMAIL PROTECTED]