RE: EntityBean Events inside tx.
You could wrap your whole process under a session bean and let the session bean to fire events for you based on your transaction outcome. A session bean implemented interface SessionSynchronization will be notified when transaction is commited or aborted. Conrad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 03, 2001 8:25 AM To: Orion-Interest Subject: EntityBean Events inside tx. We would like our entity beans to propagate events in the same fashion than regular java beans. Therefore we must, for example, send events notifying of property changes inside the bean. The problem with this is that we don't know if this method was called inside a transaction that might be rolled back later on, and hence the property change event should not have been sent at all. Clearly, we want to propagate the events only when the transactions are commited. Is there a standard "pattern" to manage this sort of thing ? TIA Ramiro Diaz Trepat Opetra
RE: Class cast exception....
It is not going to work. Both ess.jsp and ess2.jsp are declaring their own Website subclass and they can't be cast to each other (They are totally different classes). Use a real java class instead. Conrad -Original Message-From: Christian Meunier [mailto:[EMAIL PROTECTED]]Sent: Friday, March 16, 2001 5:02 PMTo: Orion-InterestSubject: Class cast exception Hi all, i got a class cast exception trying to use an instance of an object throught 2 jsp pages or so. dumb example: fct.jsp: --- %!public class Website{private int num;private String nom; public Website(){this.num=100;this.nom="example";}}% ess.jsp: %@ include file="/fct.jsp" %%@ page import="java.util.*"%%Website ess=new Website();Vector v=new Vector();v.add(ess);session.setAttribute("essai",v);System.out.println(ess.getClass().getName());% ess2.jsp --- %@ include file="/fct.jsp" %%@ page import="java.util.*"%%Vector v=(Vector)session.getAttribute("essai");Website ess=(Website)v.get(0);% = i first load ess.jsp and got the following in log: __jspPage2_ess_jsp$Website =When i load ess2.jsp i got a class cast exception and when i check the class name : __jspPage2_ess_jsp$Website How i can bypass this trouble and why the class name is not Website and thats all ? Thx in advance for ur help. Chris
RE: How to set orion to perform a timely task..
Title: SV: How to set orion to perform a timely task.. First of all, there is an option to load a servlet at startup so that you don't need to wait for the first request comes in. Secondly I prefer this way better. You could create a separate ejb client application to start your timer daemon thread and package with your ear file. Then configure your orion-application.xml to start your embeded ejb application at start-up. Conrad -Original Message-From: Yves Bossel [mailto:[EMAIL PROTECTED]]Sent: Tuesday, March 06, 2001 6:18 AMTo: Orion-InterestSubject: RE: How to set orion to perform a timely task.. Could you explain me the servlet solution with a Timer, please ? The point that I do not undestand is following: On one hand, the servlet cannot stay loaded forever, probably the server will detect and unload unused servlets.On the other hand, in order to activate a servlet, the server has to receive an HTTP request to the tcp/ip port that server is listening to, therefore the Timer should implemente a tcp/ip socket. So, how can I wake up my servlet without having to write a socket ? Thanks for explanations, Yves Bossel
RE: JAXP
Have you try to package your version of JAXP files inside your application archive (ear, war)? This idea comes from the fact that every class is identified not only its class name but also which class loader it is loaded from. Since Orion supports dynamic loading of application files, it should be using a custom classloader for every application. Hence, by theory, you should be able to use a different JAXP than the one Orion uses. Of course it depends on exactly how Orion implements this. If Orion looks for classes from the default classloader first, it is still not going to work. But I think it does worth a try. Hope this help Conrad -Original Message- From: Richard Doust [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 4:31 PM To: Orion-Interest Subject: JAXP I have been working on this problem all day. I have posted once before and no one responded. I will try again. I'm no Java expert and this is just my ignorance, but can anyone tell me if I'm correct in my assumptions on this. I am trying to develop server side code that runs under Orion that uses the JAXP code that Sun has recently released. There are different versions of parser.jar, xalan.jar and jaxp.jar distributed with Orion. Older ones. I have tried replacing the older ones with the newer ones because my code requires the newer ones and I guess that my code will be running in the same image as Orion. Orion fails to start due to an exception while trying to parse its configuration files. Putting the old .jar files back, it works again. So, now it occurs to me that I'm basically stuck running with whatever version of support code the tools I'm using are dependent on. If I'm right, that means I can't use the latest version of JAXP until Orion does? Is that right? Anyone? Thanks, Rich
RE: Error Page
Or set the return status code backto 200 since I really don't see a reason why I would like to return 500 if my error page will be probably shown. Conrad -Original Message-From: SureTicket.com [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 21, 2001 1:20 PMTo: Orion-InterestSubject: RE: Error Page To be honest i think its because of IE's friendly error messages. You can turn them off and try again. -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]Sent: Wednesday, February 21, 2001 1:15 PMTo: Orion-InterestSubject: Error Page Hello, I placed an error page tag in the web.xml in order to show a warning when any kind of error occurs. However, that works fine with Netscape but not with Internet Explorer. Does anyone have any idea? The following is the error page tag that I put. error-page error-code500/error-code exception-typejava.lang.Exception/exception-type locationerror_500.jsp/location /error-page I tried to put the whole URL in the location field, but it was of no use. Please anyone.. I really appreciate all your clues in advance. Simon
RE: Best practices: How to initialize state in EntityBean's super class
Normally I would reset all my variables when my bean is passivated or removed. That would let garabage collector to clean up those variables sooner since those values aren't valid any more after bean passivated or removed. This means differently than marking a variable transient. Hope this help Conrad -Original Message- From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 12:34 AM To: Orion-Interest Subject: RE: Best practices: How to initialize state in EntityBean's super class Thanks for your reply. I think you are right about naming the pseudo-method "ejbCreate()" - makes good sence. I could not help noticing, though, how you set states=null in some of your methods... I don't think that is necessary. If you'd like the Vector called "states" not to be stored just declare it as transient Vector states; Actually I found a place in my own code where I forgot to put the transient keyword in front of a variable which should not be persisted by Orion and it works anyway, but it should be corrected, as the fact that it works may very well be Orion specific. See section 6.4.1 of the specification (I looked it up in the 2.0 spec but I think it is the same in 1.0). Yours Randahl -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Conrad Chan Sent: 20. februar 2001 02:17 To: Orion-Interest Subject: RE: Best practices: How to initialize state in EntityBean's super class I am doing something very similar to what you described. My base class is actually coded like a Entity bean so that it has all the ejbActivate, ejbLoad, ejbStore etc. Hence it is a self-contained entity bean which handles its own state information nicely and my subclasses are not required to re-declare those dummy functions if they do not need to. Something like the following: - abstract class MyBase implements EntityBean { protected transient EntityContext ctx; Vector states; /** My pseudo ejbCreate function */ public void ejbCreate() states = new Vector(); } public void setEntityContext(EntityContext ctx) { this.ctx = ctx; } public void unsetEntityContext() { this.ctx = null; } public void ejbActivate() { states = new Vector(); } public void ejbPassivate() { states = null; } public void ejbRemove() { stats = null; } public void ejbLoad() { } public void ejbStore() { } } public class MySubclass extends MyBase implements EntityBean { String value; public Integer ejbCreate(String value) { super.ejbCreate(); this.value = value; return null; } } Conrad -Original Message- From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 19, 2001 4:18 PM To: Orion-Interest Subject: Best practices: How to initialize state in EntityBean's superclass Suppose you have two EntityBean classes A and B which share some common functionality and state by inheriting from the same superclass S. Then, if S has some member variable, say a java.util.Vector called "foos", which is part of the persistent state of both A and B, my question is this: When should "foos" be initialized? I am positive that the ejbCreate methods of A and B could include an instantiation like "foos = new Vector();" but if I use this model, I have to remember to write this instantiation into every subclass of S, and if S has many member variables (and many subclasses) that becomes error prone. - Not to mention that if I add a new member variable to S I have to modify all subclasses A, B, etc. to make their ejbCreate(...) instantiate this new variable. My own suggestion is to define a method in S, lets call it "void instantiateS()" and have subclasses A, B, etc. invoke this method in their ejbCreate(...). I believe this method should *not* be the (no-arg) constructor of S as I expect this contructor will be called everytime an instance of A or B is loaded from persistant storage (which is unnecessary). What are your suggestions? What do you do when using inheritance in your beans? Any comments would be appreciated. Randahl.
RE: Best practices: How to initialize state in EntityBean's superclass
I am doing something very similar to what you described. My base class is actually coded like a Entity bean so that it has all the ejbActivate, ejbLoad, ejbStore etc. Hence it is a self-contained entity bean which handles its own state information nicely and my subclasses are not required to re-declare those dummy functions if they do not need to. Something like the following: - abstract class MyBase implements EntityBean { protected transient EntityContext ctx; Vector states; /** My pseudo ejbCreate function */ public void ejbCreate() { states = new Vector(); } public void setEntityContext(EntityContext ctx) { this.ctx = ctx; } public void unsetEntityContext() { this.ctx = null; } public void ejbActivate() { states = new Vector(); } public void ejbPassivate() { states = null; } public void ejbRemove() { stats = null; } public void ejbLoad() { } public void ejbStore() { } } public class MySubclass extends MyBase implements EntityBean { String value; public Integer ejbCreate(String value) { super.ejbCreate(); this.value = value; return null; } } Conrad -Original Message- From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 19, 2001 4:18 PM To: Orion-Interest Subject: Best practices: How to initialize state in EntityBean's superclass Suppose you have two EntityBean classes A and B which share some common functionality and state by inheriting from the same superclass S. Then, if S has some member variable, say a java.util.Vector called "foos", which is part of the persistent state of both A and B, my question is this: When should "foos" be initialized? I am positive that the ejbCreate methods of A and B could include an instantiation like "foos = new Vector();" but if I use this model, I have to remember to write this instantiation into every subclass of S, and if S has many member variables (and many subclasses) that becomes error prone. - Not to mention that if I add a new member variable to S I have to modify all subclasses A, B, etc. to make their ejbCreate(...) instantiate this new variable. My own suggestion is to define a method in S, lets call it "void instantiateS()" and have subclasses A, B, etc. invoke this method in their ejbCreate(...). I believe this method should *not* be the (no-arg) constructor of S as I expect this contructor will be called everytime an instance of A or B is loaded from persistant storage (which is unnecessary). What are your suggestions? What do you do when using inheritance in your beans? Any comments would be appreciated. Randahl.
RE: problem invalidating servlet
I think he was trying to invalidate the existing session before setting the attribute. Conrad -Original Message- From: Boris Erukhimov [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 4:05 AM To: Orion-Interest Subject: Re: problem invalidating servlet Try this ... if (event instanceof LogoutEvent) { HttpSession validSession = request.getSession(true); validSession.setAttribute(WebKeys.ModelManagerKey, mm); } ~boris Matt Bauer wrote: I have this small bit of code that handles a log out. What I want to do is invalidate the session and put a new on in its place. The problem is when I try to set the attribute, I get an exception telling my the session is invalidated. Am I missing something? if (event instanceof LogoutEvent) { request.getSession().invalidate(); HttpSession validSession = request.getSession(); validSession.setAttribute(WebKeys.ModelManagerKey, mm); } Thanks M
RE: ResultSet Caching
I would just like to clarify that I mean to use HttpSession to store your temporary data rather than Session bean. A usual technique I have been using is to load a whole bunch of kind-of static data and serialize it into Xml. Hence the XML data can be stored in the HttpSession safely or even persistently since my XML data is just a string. Of course a more sophisticated solution can also be built on top of this generic architecture like cache time-out etc. Hope this help Conrad -Original Message- From: Neal Kaiser [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 4:31 PM To: Orion-Interest Subject: RE: ResultSet Caching Right, I definitely wouldn't use an entity bean for list/search functionality. Way too much overhead. Stateless session beans is the way to go, but I don't think throwing in large variable sets into a session is a good solution either. Bloated sessions don't perform well either. Some app servers provide a caching solution, like Gemstone I believe, and I was just wondering if Orion had something similar. I guess it makes most sense to just re-issue the query for each page. But if someone has any better ideas, I'm all ears! Thank you. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Conrad Chan Sent: Friday, January 05, 2001 5:57 PM To: Orion-Interest Subject: RE: ResultSet Caching I don't think entity bean can effectively solve your problem since calling entity bean can potentially be remote calls. Why not use session variables? Session variable is intended for temporary storage, like cache data. Conrad -Original Message- From: Neal Kaiser [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 1:18 PM To: Orion-Interest Subject: RE: ResultSet Caching What's the benefit of using those products over an entity bean then? How does it differ? Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tony Wilson Sent: Friday, January 05, 2001 3:50 PM To: Orion-Interest Subject: RE: ResultSet Caching There are products that act as middlemen between you and the Database. They also offer database object abstraction (so you can have an object representing table data. You define field - property mappings, and the product handles the transfer of data.) These products usually have built-in caching. Two products are TopLink (expensive, but nice) http://www.objectpeople.com VBSF (pretty inexpensive, and still nice) http://www.objectmatter.com -Original Message- From: Neal Kaiser [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 10:49 AM To: Orion-Interest Subject:ResultSet Caching Does Orion have any built in caching functionality? Let's say I have a database query which returns 1,000 records and the user will page thru 100 at a time. Instead of re-issuing the query each time (each page), is there some sort of cache object? How do you guys typically handle this? Thanks, Neal
RE: ResultSet Caching
I don't think entity bean can effectively solve your problem since calling entity bean can potentially be remote calls. Why not use session variables? Session variable is intended for temporary storage, like cache data. Conrad -Original Message- From: Neal Kaiser [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 1:18 PM To: Orion-Interest Subject: RE: ResultSet Caching What's the benefit of using those products over an entity bean then? How does it differ? Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tony Wilson Sent: Friday, January 05, 2001 3:50 PM To: Orion-Interest Subject: RE: ResultSet Caching There are products that act as middlemen between you and the Database. They also offer database object abstraction (so you can have an object representing table data. You define field - property mappings, and the product handles the transfer of data.) These products usually have built-in caching. Two products are TopLink (expensive, but nice) http://www.objectpeople.com VBSF (pretty inexpensive, and still nice) http://www.objectmatter.com -Original Message- From: Neal Kaiser [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 10:49 AM To: Orion-Interest Subject:ResultSet Caching Does Orion have any built in caching functionality? Let's say I have a database query which returns 1,000 records and the user will page thru 100 at a time. Instead of re-issuing the query each time (each page), is there some sort of cache object? How do you guys typically handle this? Thanks, Neal
RE: Group/role-mapping problem with own User implementation
I had the same problem as you do before. After days of try and error, finally I realized that I have to put my group name into your application's principals.xml to work. Personally I do see this as a bug Hope this help Conrad -Original Message- From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 25, 2000 12:19 PM To: Orion-Interest Subject: RE: Group/role-mapping problem with own User implementation Hi, Kai You say that you are authenticating. This is cool, but authentication means only that you are verifying that the given username/password pair exists. In order to actually identify the user to the server, and in the proper role, you want to use the login() method of RoleManager. Arved Sandstrom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kai Schilz Sent: Saturday, November 25, 2000 12:13 PM To: Orion-Interest Subject: Group/role-mapping problem with own User implementation Hi everybody, I have a problem with the EJBUserManager. I have written my own implementation of User, which extends EJBUser to include the user's e-mail-address. The UserManager is set up correctly and it finds the right user, which is correctly authenticated. But then either the group is not correcly determined or the group is not mapped correctly to the corresponding role. I don't know what happens exactly but I always get an http-error "401 Unauthorized" when accessing the secured document. [ Snippage ]
RE: webapp design: how to handle connection pooling
Here is my input on this interesting topic. * some people say, it's best practice to put 1 connection into 1 user's http session and use it for all requests of that user This only works if you don't have a lot of users concurrently, say a small intranet application, that doesn't care scalibility. The reason is database connection can't be serialized for sure and connection in http session can't be replicated across your web server farm. Hence each user in a session requires to use the same machine in your web farm. This could be terrible if you intend to serve thousands of users concurrently. Secondly database licensing is an issue. Some database vendors charge you by concurrent opened connection. If your site has a thousand users concurrently, you will need to purchase a thousand licenses (That is the thing scares me most). * other people say it's best practice to use a connection for every request. (and if more than one methods are involved, the connection should be given as a method parameter) I would rather use this per-requset approach. Only open a connection whenever a request comes in and needs database access. I can't think of a reason why passing around connection as parameter is a bad idea as long as it is in the same request. * again other people argue that they don't care at all about reusing connection, they just open and close them when they need/want to I would not like this idea since opening a database connection is expensive unless there is a connection pooling mechanism in place. Conrad
RE: How to trap orion shutdown
Furthermore, I have an auto-start java module that will listen for socket connection. Every time I redeploy my application. The java module will start again and of course will return a 'Address already bind' error. I defintely need the shutdown notification to stop the running instance gracefully before the new instance can be started. Conrad -Original Message- From: Vidur Dhanda [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 26, 2000 1:24 PM To: Orion-Interest Subject: Re: How to trap orion shutdown I'm really looking for trapping the shutdown for the EJB container. I need to do some clean up for the EJBs. Thanks, Vidur Robert Krueger wrote: At 07:57 26.07.00 , Eric Richardson wrote: Hi Vidur, I don't know if this will help but Servlet.destroy() should be called on shutdown of the web container. Eric :-) and also when the web application is reloaded due to a code change or a change in web.xml which is probably not what he wants. Vidur? regards, robert Vidur Dhanda wrote: Hello, Is there a way to get a notification when the orion server gets a shutdown request? My application needs to do some clean-up prior to server shutdown. Thanks, Vidur (-) 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 -- Vidur Dhanda Active Solutions tel: 617/566-1252 [EMAIL PROTECTED] www.active-solutions-inc.com
PROBLEM: Primary-child CMP object
Here is a simplified version of my problem: I have a Person entity object that contains a list of phone numbers as string, which encapsulates Person and Phone database tables joined by foreign key person_id. When I create a person instance first and then fill in phone numbers information, everything is fine and all the data is stored into their underlying tables properly. However if I need to fill in all phone numbers during the creation of person instance (i.e. in ejbCreate()), I will get a foreign key constraint error. public Integer ejbCreate(...) { phones = new ArrayList(); phones.add("123-3456"); phones.add("888-"); phones.add("911"); } I look like to me that Orion tries to create all the dependent objects first before the primary objects and hence violates the underlying database constraint. Could someone explain to me is there a reason Orion creates object in this order since it doesn't quite make sense to me. P.S. Here is my orion-ejb-jar.xml snap-shot entity-deployment name="Person" location="Person" wrapper="PersonHome_EntityHomeWrapper25" table="Person" data-source="jdbc/ejb/NiceDb" primkey-mapping cmp-field-mapping name="id" persistence-name="id" / /primkey-mapping cmp-field-mapping name="name" persistence-name="name" / cmp-field-mapping name="phones" list-mapping table="phone" primkey-mapping cmp-field-mapping name="id" persistence-name="personid" / /primkey-mapping value-mapping type="java.lang.String" cmp-field-mapping persistence-name="phonenumber" / /value-mapping /list-mapping /cmp-field-mapping /entity-deployment
RE: Declare variable using Taglib TEI
I believe the error is telling you that 'java.lang.String[]' is not a valid java class name Conad -Original Message- From: Jen Hsien Huang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 19, 2000 3:32 PM To: Orion-Interest Subject: Declare variable using Taglib TEI While I am tring to declare variable in TEI I return the VariableInfo array in TEI class like this == return new VariableInfo[] { new VariableInfo[]{ data.getAttributeString("errorId"), , "java.lang.String[]" , true , VariableInfo.AT_END } { Orion just told me that No such bean type "java.lang.String[]" It's terrible that I can't delcare array type. Now I use Collection instead, but this is not a good way. Is this a bug? Regards., Jen Hsien Huang
RE: Auto creating table
You should edit orion-ejb-jar.xml instead. Take a look at its DTD and you will know how. It is very trivial. Conrad -Original Message- From: Rick Bos [mailto:[EMAIL PROTECTED]] Sent: Friday, July 07, 2000 9:25 AM To: Orion-Interest Cc: Orion-Interest Subject: RE: Auto creating table I don't see an auto-create element in the entity bean !ELEMENT entity (description?, display-name?, small-icon?, large-icon?, ejb-name, home, remote, ejb-class, persistence-type, prim-key-class, reentrant, cmp-field*, primkey-field?, env-entry*, ejb-ref*, security-role-ref*, resource-ref*) !-- from http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd -Original Message- From: David Sierra Fernandez [SMTP:[EMAIL PROTECTED]] Sent: July 7, 2000 12:16 PM To: Rick Bos Cc: Orion-Interest Subject: Re: Auto creating table You have to edit the deployment descriptor ejb-jar.xml and set to false the autocreate option of the beans you don't want to create tables. - David Sierra Fern ndez E.T.S.I. Telecomunicaci¢n Universidad de ValladolidAULA CEDETEL Campus Miguel Delibes E-Mail: [EMAIL PROTECTED] 47011 Valladolid (SPAIN) -- -- Sierr@ -- On Fri, 7 Jul 2000, Rick Bos wrote: How do I turn off auto creating a table for an entity bean ? I am not using any of the GUI tools that come with Orion, just the command line. Thanks,
RE: False bug alarm [ was: Bug of RC2? - About Javac instantiating ]
Try to move your library tag from server.xml to application.xml (or vice versa). I remember I did have the same problem and that was how I fixed the issue after days of try and error. Orion is still in beta. I wouldn't be surprised that their configuration DTDs will change constantly. But Orion should update their documents in their web site accordingly to avoid confusion. Conrad -Original Message- From: Jen Hsien Huang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 30, 2000 5:04 PM To: Orion-Interest Subject: RE: False bug alarm [ was: Bug of RC2? - About Javac instantiating ] No, I have use Orion for a long time, I am sure not my fault, because the same configuration works fine under RC1. My enviroment is Win2k and JDK 1.3, 1.2.2, both can't work. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ernst de Haan Sent: Wednesday, May 31, 2000 2:53 AM To: Orion-Interest Cc: Orion-Interest Subject: False bug alarm [ was: Bug of RC2? - About Javac instantiating ] Dear Jen, Please read what the message says, it's quite verbose :) This is not a bug, this is a feature. :) Ernst Jen Hsien Huang wrote: I have try the newest orion, but Javac seem can't work, under the same configuration, it works fine. So, this should be a bug Orion/1.0rc2 initialized Error instantiating compiler: Javac not installed, copy tools.jar from your sun JDK dir's lib dir to the orion dir or add a library path="the/path/to/tools.jar " / and restart
RE: EJB CMP suggestion
How about having your Product company finder query to be "SELECT * FROM Product WHERE Product.company = (SELECT Company.id FROM Company WHERE Company.name LIKE ?" I understand that this query may not be identical to the query you provided. But my point is it is possible. Conrad -Original Message- From: Jen Hsien Huang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 09, 2000 3:38 AM To: Orion-Interest Subject: EJB CMP suggestion EJB CMP feature is fantasy. But it's use less because I cant do a simple joint on it, so I wonder the benifit of CMP is just a dream. for example I have two EJB , Company and Product, a Product can use Company as it CMP field , but if I want a finder method search the Product by the Company name, that's impossible. So why not define a CMP finder syntax can do a simple joint ? for example public Collection findByCompanyName(String value) throws RemoteException, FinderException; public static final String findByCompanyName_query = "$company.name LIKE $1"; this will generate a SQL call that joint tables of Product and Company. ex "SELECT * from Product , Company where Company.id = Product.company and Company.name LIKE ? " I think this will make CMP more useful.
RE: Stateful Session timeout, JSPs
I bet you don't really want to have a dummy ping method to burden your server load. If the current implementation will throw java.rmi.NoSuchObjectException when session beans timeout, you could define in your war archive configuration to redirect to a particular page automatically if this error is thrown unhandled. Hence you don't need to remember to put handling code everywhere in your pages. Conrad -Original Message- From: Thomas Munro [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 04, 2000 9:37 AM To: Orion-Interest Subject: Stateful Session timeout, JSPs Hello I have a design question. I have a (1) JSP session which stores a reference to (2) a stateful session EJB. If either times out, I want the user to be bounced to a page where they have to log in (again). The problem is that the JSP session and the session EJB time out under different conditions -- that is to say, merely surfing around the web application will keep the JSP session alive, but the EJB is only kept alive by accessing it, which doesn't necessarily happen on every page. Otherwise, I could simply set the EJB to timeout after a longer time than the JSP session. I have a %@ include file="/system/bouncer.jsp" % at the top of all my JSP pages, which tests whether the JSP session has timed out (among other things), and if so, it bounces to the log-in page. However, for the session EJB, I have to catch "java.rmi.NoSuchObjectException: Session has timed out" to know that the EJB has expired. In the interests of tidiness, I am inclined to try to put this test in the same included file. Which is the better design? (A) to make a dummy method "ping()" on my EJB, and then try to call it inside a try block from the included JSP (= extra network hit per page view), or (B) make each JSP page which uses the EJB capable of redirecting to the log-in page if the Exception is thrown (thus coding the same thing in many places, and potentially introducing the need to buffer everything, in order to be able to response.sendRedirect()). Or perhaps (C), I'm way off the mark (I'm not using JavaBeans or a taglib to access the EJB, for example, which might well be the source of my vexation). Opinions, solutions, experiences much appreciated. -- Thomas Munro [EMAIL PROTECTED] "Travelling through hyperspace http://www.gi-technology.com/ isn't like dusting crops, boy." GI Technology (Paris)
RE: Security problems with RMI and Orion
You may not provide us enough information about your problem. I just don't understand how this 'ClassNotFoundException' issue relates to security manager Just curious Conrad -Original Message-From: Eric Hodges [mailto:[EMAIL PROTECTED]]Sent: Wednesday, April 19, 2000 1:51 PMTo: Orion-InterestSubject: Security problems with RMI and Orion I have a servlet that tries to call an RMI method. The RMI method tries to return a serializable object. I receive this error: java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: com.sun.xml.tree.XmlDocument (no security manager: RMI class loader disabled)java.lang.ClassNotFoundException: com.sun.xml.tree.XmlDocument (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(Unknown Source) at sun.rmi.server.LoaderHandler.loadClass(Unknown Source) at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source) at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at java.io.ObjectInputStream.inputObject(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source) at sun.rmi.server.UnicastRef.invoke(Unknown Source) at com.mongoosetech.mojo.MojoAgentServices_Stub.getDocument(MojoAgentServices_Stub.java:230) at com.mongoosetech.mojo.BasicMWO.doRefreshAction(BasicMWO.java:79) at com.mongoosetech.mojo.BasicMWO.doMainAction(BasicMWO.java:63) at java.lang.reflect.Method.invoke(Native Method) at com.mongoosetech.portal.DispatcherServlet.service(DispatcherServlet.java:279) at javax.servlet.http.HttpServlet.service(HttpServlet.java:324) at com.evermind.server.http.c1.l_(JAX) at com.evermind.server.http.c1.forward(JAX) at com.evermind.server.http.dc.ca(JAX) at com.evermind.util.b.run(JAX) It seems that the security manager isn't running. How do I get it started?
Missing orion-ejb-jar.xml when using EAR archive
When I package my application in an ear archive, I realize that there is no orion-ejb-jar.xml file created. I tried to deploy news and atm apps using their ear archives and the xml file is not created as well. So how am I supposed to configure my EJB objects when using ear archive? P.S. This is a very promising EJB server! Great work Orion team! Conrad