try
{
if(rs != null)
rs.close();
if(ps != null)
ps.close();
if(conn != null)
conn.close();
}
catch(SQLException sqle)
{
sqle.printStackTrace();
}
You do not make it clear, but if either
To be honest, having implemented compilers and interpretters, the for
and while loop examples that they provide seem entirely logical. The
cases, in fact, are similar to saying this statement is false, and Java
would have to specify specific behavior for these cases.
I still find it very
There are several solutions out there, both commercial and open source.
You might wish to take a look before reinventing.
tim.
Which is not that portable across Application Servers ;)
Typical issues are JNDI lookup problems up to ClassCastExceptions.
Jens
| -Original Message-
|
This is usually handled by wrapping JavaScripts around the clickable object
to disable it upon the first click, thus eliminating the next 99 clicks.
tim.
Hi,
If I make 100 clicks fastly from my browser in a servlet, it generates 100
requests and 100 processes in the server. One only process
That is not true. Every ethernet interface can listen on its own port 80.
This can even be done with virtual interfaces which share the same
physical network card. Ports are a abstraction implemented at the driver
level and based on header information in each packet.
tim.
Your machine has 2
Sounds to me like the lead developer of JBoss is a fifteen year old kid who
is too busy watching MTV to bother with a serious reply to your posting.
tim.
Wow. I know people have complained about this list being a little slow, but
if this is what I get from the lead developer of JBoss on how
Have you tried a leading slash?
file1 = getServletContext().getResource( /WEB-INF/log4j.xml );
What we do, is get the real path with:
String realPath = this.getServletContext().getRealPath( /WEB-INF/dir );
new File( realPath, fileName );
We do this because getResource() is so
I think maybe I didn't make something clear. I am using a java application
client, NOT a web client. As such, I cannot invalidate sessions, make posts, etc.
I will repeat that we have seen that Orion's InitialContext and Principal identity
features do not work. They do not work in
Did you remove the application deployment directory for your app?
This is the first thing I do when stubs are misbehaving.
tim.
I just updated to 1.5.0 as well, and everytime I start Orion it complains
about a wrapper that I can't find anymore on my machine
How do I solve this ?? (I compiled
Thanks for the quick posts.
Stupid me, I thought getInitParameter would always be for init-params.
I wonder why...
getServletContext.getInitParameter(String):String
is not
getServletContext.getContextParameter(String):String ?
Because getInitParameter() was invented before contexts
I am not sure, but this may actually be a bug in the JVM.
I say this becuase I documented a Socket bug three years ago that involved
the closing of one side of a Socket connection. For example, in the UNIX
RSH protocol, the Socket used in the protocol appears as stdio. In other
words, stdin,
Unless Orion has builtin support for server side includes, you will
probably need to find a servlet that perform this for you, and map
*.shtml to the servlet. I do believe there are open source servlets
out there that will give you server side include support. If you
are only using the include
I believe that both of these questions are completely off-topic.
Question 1:
How does an elementary Singleton pattern based Object behave
in a multi-threaded environment? What is this phenomenon called? How do you
make such a Singleton Object thread safe?
There are several excellent
The thing which puzzles me is why not go to the Entity Bean directly itself? It saves
both computer and programming resources. In all discussions and readings I have
found no decent arguments that prevent me from going direct, unless you throw in
the -valid- information hiding argument.
Now the question:
How come so many people are keen on introducing SLSBs as a facade in front
of Entity Beans to improve the performance? The same code (plus a tid bit
extra) needs to be executed, the same pooling behavior is there for the
Entity Bean and yes the SLSB introduces little
I asked a question on an MVC application architecture using XLS, and got advice to
cache XLS / XSLT style sheets, and pre compile them.
Sounds like something I would say...
Can someone give me some more background on this.
Hope so.
How?
The code we use is totally tied to Xalan, but can
java -jar orion.jar
Hi Tim,
Thanks for your reply. I would like to know how can we
create JVMs running Orion on one machine?
Thanks
Subrah
--- Tim Endres [EMAIL PROTECTED] wrote:
Orion does not invoke JVMs. It runs within a JVM.
Thus, the answer is one.
Of course, this does
Hi Steffen,
I'm new to orion as well. But I discovered, that
after deployment you find a generated
orion-ejb-jar.xml in the application-deployments/..
This can be changed and orion keeps your changes
after another deployment.
I would prefer to have the orion-ejb-jar.xml in
jar file
Orion does not invoke JVMs. It runs within a JVM.
Thus, the answer is one.
Of course, this does not prevent you from starting
any number of JVMs running Orion.
Hi,
Can anyone explain how many number of JVMs can we
create on Orion?
Thanks
Subrah
trouble is that I'm not sure of the distinct meanings
between
server
web site
web appliction
default web site
default web appliction
global...
i have not found these defined on the orion site.
j.
Tim Endres [EMAIL PROTECTED] wrote:
In my server.xml file, I have the following line
Does Orion support digital unix ?
Thanks!
I believe the answer to the question:
Does Orion support XYZ operating system?
Is answered by:
Yes, if you have an adequate JVM.
tim.
In my server.xml file, I have the following line:
global-application name=default path=application.xml /
Looks to me like you've replaced the default web-app with your own 'pussycat'.
You application should be defined by a separate app line, such as:
application name=pussycat
You will need to be more specific.
We ran into a problem with XML. We coded to the Xalan 1 API,
making use of a class named 'XPathSupport'. However, this API
has changed in Xalan 2, and Orion 1.4.8 uses Xalan 2. So we
have put off updating to 1.4.8 until we can update our code
to Xalan 2. We
I've done this before, and this does prevent multiple web servers from
listening on the same port.
I think that this is definitely a problem. A virtual IP does not have it's
own port, but it is sharing the same port with the main ip.
If a machine has main ip 1.2.3.4 and virtual 1.2.3.5
We do exactly what you propose. A servlet drives lightweight commands. The
commands get XML trees containing the HttpServletRequest information, and
fill in a subtree with the XML results. This tree is fed into XSLT and the
resulting HTML is sent down the wire. I prefer it over JSP by miles. We
It sounds like Tim has a homebrew system for going directly from Logic
to Presentation. My team has been thinking of eventually writing a
wrapper to expose JavaBeans (the model) as a DOM using reflection so you
could still have a pull-based system rather than having to build the
full tree
then skip the cost of
parsing the XSL's XML file, in exchange for the cost of serialization.
tim.
Tim,
that sounds v.interesting. Forgive my ignorance but what toolkit are you
using and what do you mean by precompile the XSL pages?
Thanks,
Trevor
On Thu, 26 Apr 2001, Tim Endres wrote
This is a fresh install of rh7.1 (not an upgrade), then install jdk1.3.1rc1.
If you just use the LD workaround, and type
myjavapath/bin/java -version
You will get a hang.
I just wanted to be clear. This works fine for me, and is running the entire
Giant Java Tree site, which is a
jar xvf file.jar
In development, I work with Orion on both Solaris and
Windows 2000. But there must be an easier way of
dealing with Orion and Jboss zip files. I use winzip
to unzip them in Windows, and FTP the unzipped version
to Solaris. Is there any third party software to
unzip a
NEVER work for a zip
-Original Message-
From: Tim Endres [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 21, 2001 10:17 PM
To: Orion-Interest
Cc: Kemp Randy
Subject: Re: .zip files and solaris
jar xvf file.jar
In development, I work with Orion on both Solaris
getContexstPath(), which is what you want, is a method of HttpServletRequest.
tim.
Nope, when doing just that I get...
500 Internal Server Error
Error parsing JSP page /aller/Allas/subscriber.jsp
Syntax error in source/Allas/subscriber.jsp.java:32: Method getContextPath()
not found in
Well I would not know - I have never met him... I wonder what makes you able
to make that king of comparison...
I believe this was a "joke", which is tied to American TV, specifically
Saturday Night Live and Dana Carvey's Satan skits. If it was not, then
I have the same question as you.
tim.
Is this what you are looking for?
RoleManager roleMgr = (RoleManager)
(new InitialContext()).lookup( "java:comp/RoleManager" );
roleMgr.login( "user", "pass" );
Unfortunately, I think that can only run in the container. To accomodate
multiple logins under a servlet, we used to use a
this call
with the user.login and user.password?
Thanks.
-AP_
-Original Message-
From: Tim Endres [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 3:04 PM
To: Orion-Interest
Cc: Alex Paransky
Subject: Re: How to enable UserManager support for arbitrary user
Because HTTP attempts to bind to port 80, which is a priveleged port
under UNIX, I believe that you must start orion as the root user.
tim.
On NT Orion is running great but on Solaris JDK1.2.2 when I do java -jar
orion.jar I get an error message flagging a problem with HTTP
initialization.
A more common reason for that error is that your database server, or the JDBC
driver, has a timeout built into the connection. For instance, MySQL will timeout
a connection after 8 hours. The MySQL JDBC driver has a option that you can turn
on to "keepalive" the database connection. If it were an
I think you need to map your servlet to the url "/", and handle from there.
tim.
Hi all,
Until now I have been using a boot.jsp page as the main entry point to my
application. But now I have changed it to a servlet.
On the web.xml I have made a servlet mapping,
servlet
Isn't DOS lovely?
I am not sure if this is an Orion issue, or a file system issue. However,
you really should fix your HTML to match the case.
One way to get around the problem would be to write a simple servlet that
managed "/". This servlet would then look at the URL and determine the
correct
I have no idea. I simply know that someone on the list claimed to have reported this
bug, and to this day my servlets simply will not properly authenticate. I do not
know
if this is a problem with just servlets, or anything using ApplicationClient{ICF}.
Our
servlets are running in Orion. I
differently. If the problem lies with me, thats
OK, I just need someone to point me in the right direction so I can fix it.
Thanks,
Bruce
-Original Message-
From: Tim Endres [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 2:24 PM
To: Orion-Interest
Subject: Re: Orion + IE
Except for orion-ejb-jar.xml, which alone has its own place in app/orion/.
tim
You can place your orion-*.xml files alongside their *.xml counterparts.
(eg, principals.xml and orion-application.xml alongside application.xml).
Note though that if the application has already been deployed,
I tried the ApplicationClientInitialContextFactory (by mistake) when I first set
this up.
I just gave me other problems (I think there was some sort of complaint about a
missing
application.xml file). As far as I know, there should be no reason that I cannot
use the
We do not have the problem that you describe.
Why? Because we do not let the container perform the authentication.
We handle authentication *entirely* in our own code, and completely
ignore the J2EE/container authentication. Thus, our servlets always
access the EJB SB's using a single
I wonder if the exception is misleading in this case. The OutOfMemoryException
is reporting "unable to create new native thread". Could this be a limitation
on the number of threads a process is allowed to invoke? Could it be that the
JVM has a limitation on the number of threads? Or, could it be
You are missing the JavaBeans Activation Framework classes (also known as Glosgow),
which are in the JAR activation.jar.
http://java.sun.com/products/javabeans/glasgow/jaf.html
tim.
Hello all,
I'm setting up J2EE program and I'm having trouble getting the Java mail
to work. I am getting
Why not have your servlet "forward" any request that it does not recognize
to another namespace. In other words, using your example, you would forward
"/app/ball.gif" to "/images/ball.gif", thus eliminating the "/app" mapping.
tim.
I've tried using the servlet-mapping of /app/* and pointing
Don't you mean to say that the two JSP pages are generating two separate classes
that are each declaring their own Website *inner* class? Your suggested solution
is, of course, correct - use a top-level class.
tim.
Conrad Chan [EMAIL PROTECTED]
It is not going to work. Both ess.jsp and
Does that actually work in the remote EJB model; I mean through the stubs?
If not, the servlets using the sessions could just as easily listen and in
turn inform the SB's.
tim.
Can't you just make the SB a HttpSessionBindingListener and implement
valueUnbound() ?
-mike
-Original
You should not be instantiating DataSource's directly. You should define
the DataSource in Orion's configuration file, and then access the DataSource
by name via your InitialContext.
tim.
In normal java application, I may use interbase.interclient.DataSource to
access Interbase:
FORM POST pages work just fine for us under Orion. However, we are not using
JSP pages, we use our own servlets.
tim.
As the subject explains problem i am facing problem with POST method.
When i develop jsp with POST method in my local machine its working great
when i place the same file in
Not Java. Not Free. Lengthy registration process required to figure this out.
No thanks.
Also try kdb at http://www.kx.com . 150kb, all in memory and FAST!!!
Mike
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Michael J.
Cannon
Sent:
The problem is not the autoresponder. It is the mailing list software that
Orion uses, which appears to be years behind more common mailing list software.
tim.
I suspect that the person the mail is from is not responsible, obviously
moved on and someone at the company set up the autoresponder.
Have you considered placing the string in the database?
tim.
Hello;
Problem: My application has many text strings (i.e. email messages, email
recipient addresses, canned messages, etc) that both my servlets and EJBs
need to access. It needs to be done in a way that these are not hardcoded
Q: do i get the dialog window appearing because i'm using a test certificate? i.e.
will the use of a live certificate mean that i don't get the dialog window appearing?
Yes, *if* the certificate chain of that certificate leads to a root
certificate that is installed in the user's browser.
The newline between the "{% and %@ include file" causes a println
to be generated and sends output the to client, which precludes the
jsp:forward from working because forwards only work before you generate
output. I think if you eliminate this newline, the problem will go away.
tim.
%@ page
One way is to write a simple Java program that uses URLConnection to hit your
JSP page and have CRON drive your simple program.
tim.
Someone suggesting hitting a JSP with a cron... how can you hit a URL with
a CRON or AT command, I didn't think you could do that! Perhaps I
misunderstood
This line (about line 881 in my version):
URL url = this.getClass().getResource(registrations[i+1]);
Must be replaced by this:
URL url = getServletContext().getResource(registrations[i+1]);
Gee, that makes it look like a bug in Struts, as opposed to the
reported bug in Orion. I believe
There is also a nice FTP package at:
http://www.gjt.org/servlets/JCVSlet/list/gjt/com/fooware/net
tim.
Multithreaded FTP-Bean (OpenSource IBM). Would not reccommend it in a
EJB-Class,
since it seems to be multithreaded.
http://www10.software.ibm.com/developerworks/opensource/cvs/ftp/
If you upgrade the mail.jar to JavaMail 1.2, the POP3 provider is included.
Replacing mail.jar is most likely your easiest route. Otherwise, you have
to deal with the javamail.providers file, which will almost certainly require
that you modify mail.jar's version of that file.
tim.
Hello,
I'm
Go to http://java.sun.com/products/jndi/ and download the LDAP service provider.
This will give you the JNDI SPI you need to access LDAP. As for docs/tutorials,
I can not help you there.
tim.
Hi all,
Today I tried to connect to a LDAP server so I tried some things for a
while, but no
Stefan,
Are you sure about the InitialContext class being loaded over the network?
I have never heard of that before, and was not aware that JNDI supported
this feature. Can you point to any documentation of the feature?
I have always understood that the JNDI properties pointed to the class to
Do you add the manifest to the jar file using jar's '-m' option?
tim.
When I try to invoke my application-client through:
"java -jar application.jar" I get "invalid manifest
format: I/O Exception?
I have a META-INF/MANIFEST.MF, both inside the
"application.jar" and in the working
OK, thanks, I understand that (which is how I fixed the code).
However, I believe this isn't the proper behaviour for JSP.
Orion should eat that newline. This is how other JSP engines behave,
including Sun's reference engine.
Seems that this would depend entirely on the JSP spec. If
It appears to me that Sun's RI is recognizing the "obvious" - that statements
can not appear between "switch" and "case", nor between "break" and "case".
Unless the spec specifically addresses this, it seems that Orion is doing the
correct thing, and Sun is providing a nicety that lulls one into
James,
Very nice work! You have made a great contribution.
tim.
I don't know about everyone else, but I had a real difficult time getting
started with Orion (coming from WebLogic). It seemed like I was stumped at
every turn. I know there are a few tutorials, but I found them difficult
MySQL has "support" for transactions. However, I think you have to download
a special build of MySQL, and it is only supported for berkley db tables. This
is a stop gap measure until 4.0, which will have much better tx support.
tim.
You are probably right in your asumptions. Might I ask why
Hi Rich,
Could you narrow it down? Specifically which JAR breaks Orion. We have replaced
the xalan.jar and xerces.jar files with version 1.2.2 and Orion is happy. Is it
just the jaxp.jar file that is the issue?
Also, I believe that somewhere in the mailing list archives, you will find posts
[Loaded java.lang.NoSuchMethodError from C:\Program
Files\JavaSoft\JRE\1.3\lib\r
t.jar]
java.lang.NoSuchMethodError
at
org.apache.crimson.tree.AttributeSet.init(AttributeSet.java:139)
Richard, do you have the source code for that line it is croaking on?
tim.
Folks,
Orion has responded to this request at length.
The response was simple. If you can't remember the email address you
subscribed to the list with, how are they going to figure it out? If
you use the unsubscribe form, and it does not work, then guess what?
You are trying to unsubscribe the
Once you run your app, go to the application-deployments directory and into the
directory for your application. In there you will find a file named
orion-application.xml.
Add something like this to that file:
log
file path="application.log" /
/log
I keep getting internal server
More than anything else, though, I think Orion needs a FAQ-O-MATIC.
Seconded!
I am not certain about Jim's example. However, we use this style of code to
null out "transient" fields that get filled in during the use of an entity
bean. The problem is that these fields are not "cleared" between passivation
and re-activation. Thus, you can have fields with invalid values from
This has been discussed before, so there are postings in the archive.
The problem lies in the Class files themselves. Java Class files have
16 bits limitations, as well as others. The primary issue appears to
be the large number of string constants generated by JSP pages. I
believe that
However, MySQL support has not always been that "first class". I can remember the days
when
MySQL support was much like Orion support today - you needed the mailing list!
Lets hope that Orion can make the same transition to providing strong support.
tim.
If you use mysql, I think you need to
Orion's performance relative to other J2EE products is debatable, but I
believe it is at the very top, if not the fastest. In addition, Orion is
pure Java, so it is very portable (I actually develop on my Win98 laptop).
I wanted to follow up and expound on this last parenthetical comment.
I
Cliff,
I think your posting was sufficiently complex and general that it was
unlikely to generate a reponse. Speaking for myself, but suspecting
that it applies to other "professionals", I am very busy, and do not
have the time to devote to such a response. Sorry.
However, I believe you would
I do not think that JDBC is inherently the issue here. Think about it - if the
JDBC-ODBC bridge is faster than the JDBC driver, how can that be? They are both
based on JDBC, and the bridge has ODBC in the processing as well. Thus, I would
conclude that the Merant JDBC driver is poorly written. In
Does Saxon solve this particular issue? If so, how?
Thanks, tim.
We have observed this behaviour with Xalan (1.2.x family) both in and
outside of app servers. Xalan uses the "working directory", according to
Java, as the base URI. Which is of course wrong.
Dunno about Xalan2. Possibly
Your GC times are huge because you have provided so much memory. If you
reduce the 500MB to 128MB, you will see more GC's, but they will be much
shorter. This is a well known optimization issue. Too little memory causes
to many GC runs, while too much memory causes GC runs to be too long. You
Orion folder
a nd n ot web-app root?
Orion should just replace Xalan for Saxon anyways... and use TraX instead of
a propietary interface to Xalan... Xalan is Apache's excuse for having a
XSLT processors, besides being one of the slowest in the crowd...
-- Victor
-Origin
I can't seem to find the email with the setSystemId(). Can you either
forward it to me, or show me how you did it so I can try it out. Where is
that set specifically?
Thanks.
Here it is. Not very detailed, but hopefully the clue you need.
tim.
-Original Message-
From: Matt
You need a proper jndi.properties file on your ClassPath. It will define
the property 'java.naming.factory.initial', as well as others. These are
needed by JNDI to find your InitialContext.
tim.
I have download a couple of MS SQL Server trial JDBC2.0 drivers including
the free one from
XSLTInputSource; I tried
that and it worked out fine for fixing this problem (with Xalan).
Regards,
Arved Sandstrom
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
Sent: Tuesday, February 13, 2001 3:02 PM
To: Or
This is not a bug. It is a lack of understanding of ClassLoaders by the poster
you referred to in your search. If you search the Orion mailing list archives,
you will see many postings related to this subject. The problem is that ClassLoader
issues are more complicated in an application server
If you read the xalan source, you will see that this is a problem with xalan.
The method that determines the location of the included file is written to be
file-system and URL based. If has no concept of calling a method like
"getRealPath()" to get a path relative to your webapp. The code is a
Your context path can change depending on deployment. It is
best to let the HttpServletRequest extract it from the URI.
So the call to request.getContextPath() is your best bet.
tim.
where should I place the image filesPetr Podsednik wrote:
img
a table name different than the
default one without touvhign the application-deployments folder?
Wouldn't make more sense if I can change these things in the "ejb-jar.xml"
that is part of the EJB package?
Danut
At 08:55 PM 2/5/2001 -0500, Tim Endres wrote:
Check the docs. There
Since I have no code, I can only guess...
Sounds to me like you are getting a different URLConnection subclass in the
two cases. I would try to print out the connection that you are getting to
see what it is. Then you will need to see if you can correct the problem
from there.
tim.
Hello all!
Check the docs. There is a flag that you need to set to tell Orion
that is does not have "exclusive" access to the database, and that
it needs to recognize when a record is updated by a program other
than Orion.
I believe you need to look at the "exclusive-write-access" attribute
of the
This is a very general HTTP/browser question that you might get a quicker answer
to from a more target newsgroup, such as comp.infosystems.www.browsers, or one
related to HTTP. However, if someone on this list has the answer, I know I sure
would like to hear it. I wonder if have a servlet field
I believe that is perfectly normal behavior. Init() is called whenever a servlet
instance is created, and they may be created at any time and in any number (unless
you specify a limit in your servlet engine, or you use the single threaded model
for your servlet, which I do not recommend for
I found it very easy...I use:
http://mmmysql.sourceforge.net/ - jdbc driver
http://javaexchange.com/ - connection pooling
One variable i had was w/javaexchange's DBBroker, set AutoReconnect=true...
so far so good...been using awhile
Which mysql are you using? Not all
First, we faced big problem of lookup which everybody is facing.
We solved that after very long exercise. Now we are facing another bigger problem.
Please elaborate and explain to the list what you did to solve this problem.
tim.
My thought is that you should rotate that log file the same way that many logfiles
are rotated. Then it will not grow to 2.1GB.
tim.
Hey there,
Has anyone ever delt with the application.log file size? We ran into a
situation where orion died because it could not access the log file. It's
We have a servlet that sends back PDFs that are stored in a database.
Everything seems to work great but the one oddity/issue that I would like to
solve if possible is. When someone wants to save the PDF, instead of
viewing, it wants to save the PDF as the name of the servlet. I understand
Setting the session's timeout to infinite makes sense when you are
managing the timeout within your logic. For instance, our system uses
its own concept of an EJB session, which the servlet "fronts" with its
own HTTPSession. Thus, when the EJB session times out, we would then
invalidate the
That is exactly correct. Say during a long download, the user hits the "Stop"
button. The browser will close the connection, and the Exception indicated
will be thrown by the underlying stream for the servlet. You will need to
catch these exceptions if they are a problem for the servlet.
tim.
ApplicationClientInitialContextFactory is the right factory when using
application clients (J2EE - application-client.xml). If you want to use a
pure stand alone Java Application
RMIInitialContextFactory should be your choice.
Please elaborate. What is the difference between an "application
Try using:
prop.setProperty(
"java.naming.factory.initial",
"com.evermind.server.rmi.ApplicationClientInitialContextFactory");
Hello!
I'm trying to connect to my EJB's from a stand alone client like this:
Properties prop = new Properties();
I want to second this sentiment. We looked at JSP, Cocoon, Struts, and all
of the other so-called "logic/presentation separation schemes". However,
every time I looked at the pages of those schemes I saw code embedded in
there. That did not look like separation to me.
So, we built a simple
1 - 100 of 125 matches
Mail list logo