RE: calling native code from ejb
On Wed, 25 Oct 2000, Kurt Hoyt wrote: Actually, its the first. You are not allowed to call native code from an EJB. From the EJB Spec 1.1, Section 18.1.2, Programming Restrictions (page 274): * The enterprise bean must not attempt to load a native library. damn ok, I read the specs and you guys (someone else, Tony, also directed me to the specs) are right. but what to do if I need to use classes that call native methods? the specs says after the above sentence reproduced above: "This function is reserved for the EJB Container." what does this mean? thanks, luis Kurt in Atlanta -Original Message- From: Duffey, Kevin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 25, 2000 7:28 PM To: Orion-Interest Subject: RE: calling native code from ejb I can think of only two possible reasons. One, you are not allowed to call native code from EJB, and two, your native code is causing some sort of problem. The first..I am not sure if that is the case or not. The second seems more likely to me..something might be wrong in your call to JNI, the native code may be causing the exception which your java code is reporting, etc. Sorry..I don't know much else about it. -Original Message- From: Luis M Bernardo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 25, 2000 2:56 PM To: Orion-Interest Subject: calling native code from ejb hello, I have no experience calling native code from java applications but I managed to write my first stateless seesion bean that uses a java class that calls native methods. when use a client to invoke a method in the bean I get the following error: C:\orionjava -Djava.library.path=u:\bernardo\javaqt\unlic\com\thi\quanttools -j ar orion.jar Orion/1.3.8 initialized # # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi de the VM. # Program counter=0x10001c48 # # # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi de the VM. # Program counter=0x10001c48 # can someone suggest what the problem is. can I call native methods from ejbs? thanks.
calling native code from ejb
hello, I have no experience calling native code from java applications but I managed to write my first stateless seesion bean that uses a java class that calls native methods. when use a client to invoke a method in the bean I get the following error: C:\orionjava -Djava.library.path=u:\bernardo\javaqt\unlic\com\thi\quanttools -j ar orion.jar Orion/1.3.8 initialized # # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi de the VM. # Program counter=0x10001c48 # # # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi de the VM. # Program counter=0x10001c48 # can someone suggest what the problem is. can I call native methods from ejbs? thanks.
RE: The New Java Pet Store
it's -Djsp.reuse.tags=false maybe that's what you meant On Mon, 16 Oct 2000, Ray Harrison wrote: I thought so too, but -Djsp.tags.reuse=false produces the same error. --- Mike Cannon-Brookes [EMAIL PROTECTED] wrote: I'm thinking it's probably the same bug as in the first pet store, concerning tag reuse? Search the archives, something like -Djsp.tags.reuse=false Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ray Harrison Sent: Monday, October 16, 2000 5:51 AM To: Orion-Interest Subject: RE: The New Java Pet Store They've done a bit of re-architecting. They've broken out the EJB jars into: mailerEjb.jar shoppingcartEjb.jar petstoreEjb.jar customerEjb.jar inventoryEjb.jar as examples. They've added an admin piece to it as well. Anyway - I've started looking at the error below, but haven't gotten very far. If anyone has seen this sort of behaviour before - let me know and I will focus on that area. Cheers Ray Harrison --- Robert Nicholson [EMAIL PROTECTED] wrote: What new about it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ray Harrison Sent: Sunday, October 15, 2000 8:20 AM To: Orion-Interest Subject: The New Java Pet Store Hi - Has anyone investigated the new java pet store (came out on October 11th, I believe)? I just did a straight deploy - here's the message I receive on "Enter the Store"... -- --- java.lang.NullPointerException at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.getT agValue(ScreenFlowXmlDAO.java:332) at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.getS creens(ScreenFlowXmlDAO.java:155) at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowXmlDAO.load ScreenDefinitions(ScreenFlowXmlDAO.java:97) at com.sun.j2ee.blueprints.petstore.control.web.ScreenFlowManager.ini t(ScreenFlowManager.java:52) at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.getScreen FlowManager(MainServlet.java:96) at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.init(Main Servlet.java:37) at javax.servlet.GenericServlet.init(GenericServlet.java) at com.evermind.server.http.HttpApplication.wt(JAX) at com.evermind.server.http.HttpApplication.wb(JAX) at com.evermind.server.http.HttpApplication.um(JAX) at com.evermind.server.http.ef.su(JAX) at com.evermind.server.http.ef.dn(JAX) at com.evermind.util.f.run(JAX) -- --- Orion Version 1.4.0 Cloudscape data source AND MS Sql Server data source (the results are the same - the sources have worked before and continue to work on the previous pet store release (1.0.1)... Any clues as to where to start looking? I am not THAT interested in getting it to work, but I am a bit curious Cheers Ray Harrison __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ __ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/
Re: EJB-EJB relationship example
I don't remember whether the atm example uses jms but orion comes with jms. comment out the jms entry in the server.xml file. On Mon, 16 Oct 2000, Truong Di Ly wrote: Hi, has someone a short example with EJB2 which use EJB-EJB relationship. The atm example doesn't run because i don't have a JMS server installed. Thanks, Di
RE: New 2 Orion.
On Sat, 7 Oct 2000, Nathan Phelps wrote: 1.) You can cleanly shut Orion down using the following command: java -jar admin.jar ormi://yourservername admin youradminpw -shutdown Or, you can use the Orion console by right-clicking on the Server and choosing Shutdown from the Context-sensitive menu. does the -restart switch also works? it doesn't work with me. this is the error I get: C:\orionjava -jar admin.jar ormi://localhost admin xx -shutdown C:\orionjava -jar admin.jar ormi://localhost admin henp123 -restart Error: javax.naming.NamingException: Lookup error: java.net.ConnectException: Co nnection refused: no further information; nested exception is: java.net.ConnectException: Connection refused: no further information what is the difference between "java -jar admin -restart" and "java -jar orion.jar"? thanks.
Re: jsp.reuse.tags
OK, I think I understand what's going on. I don't know whether you are familiar with the java pet store taglibs, but they are only used in two files: template.jsp and ScreenDefinitions.jsp. What I notice is that in the ScreenDefinitions.jsp file some screens use three parameters and other use four. So I'm guessing that if I create a blank.jsp and use it just as a filler in the screens that have three parameters (so that they have four instead) I'll solve the problem and will not need to use the jsp.reuse.tags flag. Would that work? Thanks, Luis On Tue, 3 Oct 2000, Karl Avedal wrote: Hello again, Hmm, I should update my own reply, because that example is actually a bad one, since it's illegal to reuse the tag in that specific case. However, the principle is the same. Tags might be reused under certain circumstances, and they assume this isn't done. Regards, Karl Avedal Karl Avedal wrote: Hello Luis, Let's say we have this in a JSP: foo:bar baz="123" baz2="234"/ Some text foo:bar baz="123"/ In a JSP container, tags might be reused (the tag instances are pooled), so when the tag foo:bar is used for the second time above, the optional attribute baz2 may still have the value "234" since the same instance as before is used, so when having optional attributes like above, you have to be careful. This is exactly what the pet store is doing and they assume that the tag will not be reused (that they get a clean instance every time). This probably comes from the fact that they implemented using the J2EE RI. The J2EE RI is not meant to be fast, but just to follow the spec, so that implementation does not reuse the tag instances. So when they tested the petstore on the RI it worked fine, but it did not work in containers doing this optimization. For this reason we provided a property for Orion to turn off the tag instance reuse optimization. Regards, Karl Avedal Luis M Bernardo wrote: hello, can someone explain what's wrong with the pet store taglibs that we need to use the switch -Djsp.reuse.tags=false when running the orion port of that demo. thanx. luis
Re: jsp.reuse.tags
That's my turn to follow up too. I tried what I described and it didn't work... Luis On Tue, 3 Oct 2000, Luis M Bernardo wrote: OK, I think I understand what's going on. I don't know whether you are familiar with the java pet store taglibs, but they are only used in two files: template.jsp and ScreenDefinitions.jsp. What I notice is that in the ScreenDefinitions.jsp file some screens use three parameters and other use four. So I'm guessing that if I create a blank.jsp and use it just as a filler in the screens that have three parameters (so that they have four instead) I'll solve the problem and will not need to use the jsp.reuse.tags flag. Would that work? Thanks, Luis On Tue, 3 Oct 2000, Karl Avedal wrote: Hello again, Hmm, I should update my own reply, because that example is actually a bad one, since it's illegal to reuse the tag in that specific case. However, the principle is the same. Tags might be reused under certain circumstances, and they assume this isn't done. Regards, Karl Avedal
jms behavior
hello, I've had some trouble understanding how the orion implementation of jms works. first of all, and as some other people pointed out, we cannot specify a topic connection factory in the jms.xml file but instead we have to rely on the default one (named I think theTopicConnectionFactory, although that seems to be irrelevant). also, we don't seem to need to specify topics and a default one will be assigned. the difference with the topic connection factory is that nothing bad happens if we define topics in the jms.xml file, but we get an exception if we try to define a topic connection factory in that file. I have an application with a publisher in the ejb tier. this publisher publishes to 3 topics: A, B and C. in the web tier I have the subscribers. one subscriber subscribes to topics A and B, and a different subscriber subscribes to topic C. I defined the three topics in the jms.xml file. the behavior I noticed is that the jms implementation mangles the topics. say, the subscriber that only subscribes to topic C will also receive messages published to the other topics (my subscribers implement the MessageListener onMessage method). so my solution was to use selectors with the subscriber. for instance, for the subscriber of topic C I have to set a selector that filters out messages sent to the other topics even though those messages should never be present in topic C. the other anomalous behavior is that this only works if I set the noLocal variable in the TopicSession.createSubscriber() method to false. it should be irrelevant if I set it to false or true since my subscribers are not publishers. anyway, I was wondering if someone else found this. it took me a while to understand what was going on, and I think the implementation may not be perfect. cheers, luis
jsp.reuse.tags
hello, can someone explain what's wrong with the pet store taglibs that we need to use the switch -Djsp.reuse.tags=false when running the orion port of that demo. thanx. luis