J Norm

Greenhorn
+ Follow
since Feb 24, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by J Norm

The panel entry table is a bridge between panel and MRN, because there is a many-to-many relationship betweent them.

Those tables are irrelevant to the question at hand.

Thanks again for the advice. Now I just need to convince my boss that the simpler way is the best way to go.

-Jason
Thanks for your advice guys.

Can anyone point me to a good Oracle forum? I can tell I'm going to have a lot of questions, as this is my first full-on Oracle project. I'm not a DBA, I'm a J2EE programmer, but I'm having to play the roll of the DBA for this project.

I don't like to post off topic if I don't have to, and there really isnt an Oracle forum here.
This isn't really a Java question, more about how I should design my tables.
I have a table called panel. The situation is that a panel can contain multiple panels. And a panel can be contained by multiple panels.
So far, this is the schema (below) I've come up with. The thing I don't like is having the two relationships between the panel and accumulated_panels table. It seems so goofy, but I can't think of another way to allow that two-way relationship.
With this schema, I could say select containing_panel from accumulated_panels where contained_panel = XXX. That would get me every panel that XXX is part of. Or I could say select contained_panel from accumulated_panels where containing_panel = YYY. That would get me all of the panels contained by YYY.
Is there a better way?
I'm looking for a way to force an EJB to be removed from the container cache. Or, at least a way to force the container to create a new EJB instance.
Here is the situation. I have a stateless session bean that connects to and communicates with a socket service. It is important that the EJB maintain a connection with the socket throughout it's life, but because of some bugs in the socket service itself, the EJB needs to reinitialize the socket connection from time to time.
What I'm supposed to do is write a delegate that uses the EJB, and when the delegate catches the exception indicating a corrupted socket connection, we want it to discard the EJB and get a new one. The problem is that when we discard the EJB, it goes back into the cache, and so when we ask for a new one, we are just getting the same EJB with the same bad socket connection. I'm currently using the remove() method from the EJBObject interface, but all that seems to do is place the EJB back in the pool.
Is there a way to explicitly destroy an EJB instance?
OK, nevermind. I solved the problem.
For the record, the problem is the order of jars in my weblogic server classpath. I found a related problem in a Weblogic newsgroup that suggested putting the JSSE jars in the classpath before the weblogic.jar. So I tried that and now everything works.
It is still very odd that this problem only pops up when I use the HttpClient package, not when using java.net.URL.
Hi,
I have an EJB that connects to a web server over HTTPS and reads some data. It connects to the server using a url similar to the following...
https://my.host.name/path/to/some.cgi?queryString
Using standard java.net.URL or java.net.URLConnection, everything works fine.
Except now I'mm supposed to implement a socket-level timeout to keep it from waiting too long for a connection. So, I used the Apache Commons project's HttpClient version 2.0 alpha 2 package to replace the URL code.
There is infuriatingly little documentation on HttpClient, and absolutely none about using HTTPS. So I'm not 100% sure I've done it correctly.
The problem is that I get an exception:
javax.net.ssl.SSLHandshakeException: FATAL Alert:HANDSHAKE_FAILURE - The handshake handler was unable to negotiate an acceptable set of security parameters.
I don't understand. Why does the EJB connect fine when using the java.net.URL object, and not the HttpsClient code? I'm using the same server, same certfiles, same everything.
The EJB is hosted on a Weblogic 6.1 server, and trying to connect to an Apache server. I have no control over the configuration of the Apache server, and I know nothing about it other than it is apache, and it works fine when I use java.net.URL, or when I browse to it with a web browser.
Here is a code snipet...
----------------
String urlText = "https://my.host.name/path/to/some.cgi?queryString";
URI myUrl = new URI( urlText );
Protocol myProtocol = Protocol.getProtocol(myUrl.getScheme());
HttpConnection connection = new HttpConnection(myUrl.getHost(), 443, myProtocol);
connection.setSoTimeout(10000);
HttpState state = new HttpState();
GetMethod method = new GetMethod(myUrl.toString());
// This is where the exception is thrown.
//
method.execute(state, connection);
--------------------------
I've also tried other classes in the HttpClient API, actually creating a HostConfiguration object and using the actual HttpClient class and all that, but I found an example of doing almost exactly the same thing I'm doing, but only using HTTP, and it was done in the way indicated above.
Does anyone have any idea why this would be happening? Again, remember, it works fine when I use plain old java.net.URL.