Dan Dubinsky

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

Recent posts by Dan Dubinsky

I have an J2EE server based application running on an Oracle App server cluster with two load balanced nodes. The application is using the HttpsURLConnection class to connect to a remote system and post some data for credit card authorization. When server 1 in the cluster sends the post to the remote host it works fine every time. When server 2 in the cluster sends the post to the remote host about one in every four or five calls blocks.

The code looks like this:



It hangs sometimes at the last line: PrintWriter pw=new PrintWriter(novaHttpsConnection.getOutputStream()), but only on one of the two servers in the cluster.

The systems people tell me that the operating system, JDK and hardware on both servers is identical.

I was thinking it might be a bug in the HttpsURLConnection so I changed the code around to use SSLSocketFactory instead of HttpsUrlConnection.

On that version I am doing


On that version it hangs on the createSocket call.

Anybody have any thoughts on what might make this hang on one server and not another? It's a vexing problem. I'm pretty sure the blocking isn't going on at the other end because one server on this end is working perfectly and the other is hanging and they are both sending requests at the same time.


Thanks,
Dan
I have some code that is connecting to an external server using:

URL url = new URL(strRemoteServerName);
HttpsURLConnection urlConn = (HttpsURLConnection) url.openConnection();

Once in a while there is a problem with the server on the other end and they dynamically switch it to another server using some sort of fail over. After that, my connections don't work anymore. I get

Remote host closed connection during handshake
javax.net.ssl.SSLHandshakeException: Remote host closed connection
during handshake
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275(Compiled Code))
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)


until I restart my application. I suspect it's because the SSLSessions are being cached internally. If I get this error I would like to have my code invalidate the sessions and try again.

My problem is I'm not sure how to get to the SSLSessions when using HttpsURLConnection. I looked around the Javadoc and I can only see a getSession method in the SSLSocket class, but that is a level below the API I'm using.
I've seen this particular issue on various forums, but I haven't seen any solutions. I have an Oracle 10g Application server that's using javax.net.ssl.HttpsURLConnection to connect to a remote server from an EJB. Most of the time it works, but about once a month all the connections stop working. When we restart the server on our end they start connecting again, so although the error appears to be coming from the other end, I think it's some problem with the javax.net implementation on our end.

Here is the error:

javax.net.ssl. SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275(Compiled Code))
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at com.ibm.net.ssl.www.protocol.https.b.o(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.q.connect(Unknown Source)
at com.ibm.net.ssl.www.protocol.http.ci.getOutputStream(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.t.getOutputStream(Unknown Source)

Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275(Compiled Code))
... 11 more
Hi All,

I'm using MyFaces with JSPs and I'm trying to find a way to code a "page requested" event where a listener gets notified whenever a page is requested. It would be sort of like doGet in a servlet. I tried some variations of a Render Phase Listener and it seems to work, but sometimes there are no components in the UIViewRoot of the page when the event fires. It looks like the first time I go to the page the tree is empty and then after that it's OK.

Is there some way to have a event that gets fired:

1) Every time a page gets requested via a post or a get.
2) Always has the component tree for the page fully built when the event gets fired.
3) Works in JSP pages.

Thanks,
Dan
17 years ago
JSF
Salmon LLC is pleased to announce the release of SOFIA 2.2. SOFIA is a free, open source, model-view-controller framework that brings web application development functionality similar to ASP Dot Net Web Forms to the Java developer. Whereas most Java web frameworks focus on only one or two aspects of the MCV design pattern and provide little or no development tool support, SOFIA focuses on making web developers immediately more productive and so provides a complete end-to-end solution right out of the box.
SOFIA consists of a Java class library of foundation code for building business logic and graphical user interfaces, a JSP tag library for HTML user interfaces and a Swing based component library for browser based rich clients. The package also includes optional plug-ins for Eclipse and IntelliJ Idea to make coding tasks easier and an optional Dreamweaver plug-in that provides a drag and drop WYSIWYG environment for visual development. SOFIA is designed for database applications and directly supports most major engines including: Oracle, MySQL, Sybase, MS SQL Server, DB2, Ingres, Postgres and Firebird.
Version 2.2 adds the following new features:

1) Now develop with SOFIA in Linux via a new platform neutral install procedure.
2) A new Search Form, List Form and Detail Form implementation that allows you to build flexible and powerful search and data entry screens in minutes with no coding.
3) Support for JSR-168, the portlet API. Use your SOFIA JSP pages as portlets in any vendor�s JSR-168 compliant portal.
Enhanced support for EJBs.
4) Numerous additional enhancements provided by the open source community.

Some current SOFIA features:

1) Visual development of the user interface by integrating a pallet of over 50 visual components into Macromedia Dreamweaver. Simple components include: Data grids with built-in sort and paging options, Navigation Bars, Trees, Tree-Tables, Calendars, Display Boxes and a rich assortment of data input controls. More complex components allow you to build complete search and data entry screens in minutes with no coding.
2) Plug-ins for Intellij IDEA and Eclipse for increased productivity.
Code generators for many non-visual tasks such as database access.
3) Automatic binding of model and view components. The initial values on a screen will automatically reflect the values in database and all changes made on a data entry screen can be saved back to the database with one line of code.
4) Clear separation of the UI design from back end Java code. SOFIA JSP pages use zero Java inline code and no tags that try to simulate code like iteration or condition tags. The entire page definition can be described with simple HTML tags combined with SOFIA�s HTML-like JSP custom tags. Business logic is completely encapsulated from the GUI in separate Java classes.
5) Build a web GUI with HTML-like JSP tags or by instantiating Java web components in manner similar to Swing or the AWT.
6) Controllers provide event handling for web page actions in the same way Java Swing does for desktop applications.
7) Power to manage any attribute of any visual component at runtime. Controllers can directly manipulate view components by setting properties or by changing model data. Alternatively, visual component attributes (visible, enabled, color, font, URL, image source, etc�) can change dynamically at run time using simple but powerful one-line expressions.
8) Easy implementation of new JSP tags: you don't have to follow the whole JSP specification to build a new tag. Just extend SOFIA components and the development of a new tag becomes much easier.
9) Complex declarative data validation rules at the model or view level. Depending on the type, rules can be run on the client or on the server in either Java or JavaScript. Even more complex rules can be encapsulated into Java validation classes.
10) i18n: use of localization keys that can be specified on some of the SOFIA components and tags that will cause some of the attributes of the
components to change based on the language preferences of the visiting user.
11) Built-in personalization/branding. Allow your web application to have a look and feel customizable by each individual user. The personalization implementation also allows declarative security conditions by user or group (e.g.: some fields are only visible or enabled for certain users).
12) Easily pipe database or EJB data back and forth to Java applets in addition to HTML pages.
13)Display, Sort, Filter, Export and Print complex WSYIWYG reports using Jasper Reports and SOFIA�s custom Jasper Reports viewer applet.
14)Output to different clients: HTML based, WML based, Swing Applets, or Java Webstart.

SOFIA can be downloaded from SourceForge at http://sourceforge.net/projects/salmon.

For general information, complete documentation, code examples and videos check out: http://www.salmonllc.com/sofia.


About Salmon LLC:

Founded in 1995, Salmon LLC specializes in the development of Java applications using object-oriented languages, tools and techniques within intranet and Internet and architectures. Project management skills and in-depth technology expertise provide a basis for cost-effective solutions and flexible business arrangements. We offer both traditional consulting and fixed-price solutions. Find out more about Salmon at Founded in 1995, Salmon LLC specializes in the development of Java applications using object oriented languages, tools, and techniques. With offices in New York, London, and Sydney, we maintain worldwide partnerships that allow us to bring clients a wide variety of solutions and services. Our proven project management skills and technology expertise allow us to provide cost effective solutions on flexible business terms. We emphasize rapid application development and deployment using our signature framework, SOFIA. All of this is packaged in a pragmatic pricing approach to deliver quality, working systems within fixed schedules and budgets. That�s the heart of the Salmon Guarantee: We will deliver projects on time, within budget, and to 100 percent client satisfaction. For more information on how Salmon LLC can help your company, call us at 516-485-1118, or e-mail us at info@salmonllc.com.
20 years ago
Salmon LLC is pleased to announce the latest release of SOFIA, The Salmon Open Framework for Internet Applications version 2.1. SOFIA is a free, Java based open source tool set for building database driven J2EE based web applications and Swing based rich client applications.
Since the initial release of SOFIA we�ve have over 65,000 downloads and a great deal of positive feedback and contributions from the open source community. Version 2.1 adds site map functionality, integration with Jasper Reports as well as improvements in our UI components, validation components and data access components.
Downloaded SOFIA free of charge at: http://www.sourceforge.net/projects/salmon
Check out SOFIA in action with code examples at: http://www.salmonllc.com/sofiaExamples
View videos at: http://www.salmonllc.com/website/Jsp/vanity/SofiaVideo.jsp
For general information look to: http://www.salmonllc.com/sofia

About Salmon LLC
Founded in 1995, Salmon LLC specializes in the development of Java applications using object oriented languages, tools, and techniques. With offices in New York, London, and Sydney, we maintain worldwide partnerships that allow us to bring clients a wide variety of solutions and services. Our proven project management skills and technology expertise allow us to provide cost effective solutions on flexible business terms. We emphasize rapid application development and deployment using our signature framework, SOFIA. All of this is packaged in a pragmatic pricing approach to deliver quality, working systems within fixed schedules and budgets. That�s the heart of the Salmon Guarantee: We will deliver projects on time, within budget, and to 100 percent client satisfaction. For more information on how Salmon LLC can help your company, call us at 516-485-1118, or e-mail us at info@salmonllc.com.
20 years ago
Salmon LLC is pleased to announce the latest release of SOFIA, the Salmon Open Framework for Internet Applications, version 2.0. For those unfamiliar with SOFIA, it is an open source tool set for quickly building database-driven applications in the J2EE and/or Swing Set. SOFIA consists of:
1) An extensive Java class library of foundation components for building Web and Swing applications. The class library uses design patterns such as Model View Controller, GUI components, and event listeners to abstract and hide a lot of the plumbing code required in a typical Java database-driven application. This allows you to concentrate on business requirements and not spend a lot of time on low-level infrastructure.
2) A custom tag library for building Web pages that eliminates the need for any in-line Java in JSPs. The tag library contains over 40 GUI components, with everything from simple buttons and edit fields to complex components such as trees, tables, data grids, calendars, and navigation bars. All the GUI components can be attached to back-end data sources� like relational databases, XML files, or Enterprise Java Beans�with no additional coding.
3) Tight integration with best-of-breed off-the-shelf tools: Dreamweaver for painting Web pages and IntelliJ IDEA or Eclipse for the Java code. These tools combine to create a rapid application development environment similar to Dot Net Studio that makes development with the J2EE quick and easy. Unlike Dot Net Studio, this RAD tool is open source, vendor neutral, and the resulting applications can be deployed to any server with J2EE support.
Since the initial release of SOFIA last year we�ve had over 60,000 downloads and a great deal of positive feedback and contributions from the open source community. Version 2.0 adds the following new features:
1) SOFIA Swing Set Extensions. In SOFIA 2.0 we�ve extended the Swing Set components so that they can be bound to SOFIA model components. This allows the Swing components to do data retrieval, validation, and update with only a few lines of code. Java Applets and applications can use the SOFIA-bound components to communicate with remote database engines via HTTP or HTTPS without the need for signing jars or opening firewall ports.
2) Declarative data validation rules in SOFIA models. Now you can centrally define business rules in your models with only a few lines of script and they will automatically be enforced whenever a user changes the data, whether the data entry is Swing-based or JSP-based.
3) Personalization. We�ve added the ability to define skins in SOFIA that can be applied to both JSP- and Swing-based applications.
4) Support for Ingres, Postgres, and Firebird SQL engines. This is in addition to the support already provided for Oracle, Sybase, MS SQL Server, mainframe and desktop DB2, and MySQL.
5) Integration with industry standard logging packages, Log4J, and/or JDK 1.4 logging.
6) Improved support for all of the latest tools such as Tomcat 4.1, Eclipse 2.1, IntelliJ IDEA 3.0, and Dreamweaver MX.
7) Numerous improvements and bug fixes to SOFIA components such as the Navigation Bar, Tree Control, Drop Down List, and Applet provided by Salmon LLC and by the open source community.

For more information on SOFIA take a look at http://www.salmonllc.com/sofia
SOFIA can be downloaded free of charge from Source Forge at
http://sourceforge.net/projects/salmon
About Salmon LLC
Founded in 1995, Salmon LLC specializes in the development of Java applications using object oriented languages, tools, and techniques. With offices in New York, London, and Sydney, we maintain worldwide partnerships that allow us to bring clients a wide variety of solutions and services. Our proven project management skills and technology expertise allow us to provide cost effective solutions on flexible business terms. We emphasize rapid application development and deployment using our signature framework, SOFIA. All of this is packaged in a pragmatic pricing approach to deliver quality working systems within fixed schedules and budgets. That�s the heart of the Salmon Guarantee: We will deliver projects on time, within budget, and to 100 percent client satisfaction. For more information on how Salmon LLC can help your company, call us at 516-485-1118, or e-mail us at info@salmonllc.com.
21 years ago