Lehmann Blogger
|
|
Wednesday, March 31, 2004 |
|
Open Source BPEL Over the last few months a number of Apache projects started on the next level of Web service protocols - Apache Sandesha based on the unsubmitted IBM/MS WS-ReliableMessaging specification, Apache Addressing based on the unsubmitted IBM/MS WS-Addressing specification, WSS4J based OASIS WS-Security and lastly WSRP4J based on OASIS WSRP - Web Services for Remote Portlets. These efforts were clearly a harbinger for the BPEL space. Today Tug Grall pointed me at an open source BPEL implementation he found - Twister, put out in mid-March. Paul Brown mentioned OpenBPEL as another example in the space arriving sometime back in February. Clearly early days if you download either one, but some serious initial effort appears to be underway. This should be seen as a "good thing" because the more public BPEL implementations there are the clearer the ambiguities in the specifications/standards become. It becomes more viable for groups like the WS-I to conceive and arrive at reasonable interoperability scenarios against a range of implementations. We also get to see a bit of how the different implementations will go about differentiating themselves in the face of some initial commoditization of the standard. comment [] 11:03:30 PM |
|
|
Tuesday, March 30, 2004 |
|
Connectivity not Functionality Nice presentation from Jean-Jacques Dubray posted yesterday. Lots to chew on, but for reasons of discussions we have been having around SOA recently, I particularly liked this cliche line that is likely used by every integration vendor on the planet but still rings true in this space: "Today value is not defined as much by functionality but by connectivity" Check it out: http://www.ebpml.org/csfsoa.ppt comment [] 1:20:10 AM |
|
BPELJ - One More Comment It seems like BPELJ, IBM/BEA's submission to facilitate JSR 207 discussion has brought out a chorus of voices opining about whether it is good or bad - Paul Brown, Edwin Khodabakchian, Phil Wainewright, Howard Smith, The Register and many more ... shock, disbelief, outrage and much more. It doesn't get much more exciting in the world of Web services. I think the general agreement outside of IBM/BEA is that embedding Java in BPEL is generally not a "good thing" but I also think a number of folks, including myself (though I can't say I am representative of the opinions in Oracle), wish there was some variation of the "window in the glass bottomed boat" that Paul Brown calls BPELJ ... but with some more restrictive rules on its usage rather than the wholesale tight coupling provided by the BPELJ proposal. There are clearly many BPEL friendly ways to hook Java in to BPEL ranging from simply working with Java as Web services to giving more native access through frameworks like WSIF. Yet at the same time, having some well-defined hooks for native languages, not just Java, because of idiosyncracies in your BPM project, seems like something that vendors will naturally provide anyway. Avoided by thoughtful project managers - just like proprietary J2EE extensions - those same managers will be happy they are there when they need them, treating them with caution as they rightfully should. Further, perhaps, while the analogy may be weak, just as JSP scriptlets turned into tag libraries which resulted in JSTL, usage patterns and best practices of a more constrained and thoughtful BPELJ-like feature set may in fact turn into well-considered general changes to the underlying BPEL specification over time. Others are more dogmatic that BPELJ is an evil idea for which, analogously, we will end up paying the multi-year standards evolution price we paid to get to the reasonably usable CMP EJB 2.0 solution (with EJB 3.0 to fix it even better!) which is fair enough. Hopefully given this is being discussed in at least two relatively open standards forums (OASIS, JCP) unlike other proprietary specifications, both sides will be accomodated. Whether it resolves in something useful for users rather than something that vendors will use to promote proprietary implementations remains to be seen. For insight into the jockeying and general user opinion on this, it is worthwhile to peruse the OASIS BPEL mailing list. comment [] 12:39:31 AM |
|
|
Monday, March 22, 2004 |
|
Nothing/Everything is a Web Service I've been on a bit of a rant lately to folks who complain that nothing is a Web service - my simple minded retort is everything is a Web service. What I mean by that is that nearly any executable/programmatic resource/component can be described using WSDL and, generally, though not necessarily, talked to using SOAP. Some of these things are nicely standardized in the Java world with J2EE 1.4; others are provided by vendor/product extensions (e.g. JMS Web services are not standardized but most folks offer some solution in the space; database DML/SQL are not Web services but nearly every database vendor worth their salt gives you tooling to do these things via a Web service, nearly all proprietary platforms inevitably offer their "things" as Web services too etc). This doesn't mean that when you build a Web service centric solution that every endpoint will be the ideal Web service. Real life is messy. Things like C programs, Forms applications, CICs, JCA and much more don't quite fit but more often than there are relatively painless ways to make them work (see the resolution in my Forms note as an example). Further, there are interesting technologies like WSIF which enable WSDL descriptions of endpoints but then let clients bind using native protocols rather than packaging things up using SOAP (e.g. native bindings to JCA). But if your going in position when building a new Web service centric solution is that everything of interest can be normalized to a service with WSDL, then it shapes how you go about about solving the problem. The cries of performance, reliability, transactions security and much more will inevitably come up (and all are clear issues to be dealt with) but starting from a "everything can be a Web service" gives a consistent context to shape your response and ultimate solution. I think a common sentiment and it is just my turn to say the obvious. I must be in my "everything is a nail because I have a hammer" mode which generally indicates too big of a problem is being solved. I suppose we will see. comment [] 10:11:30 PM |
|
|
Wednesday, March 10, 2004 |
|
BPEL Import A slide from a recent Microsoft presentation: BPEL Import It's 3 I have to wonder about - BPEL by its very name is *executable* and generally seems best suited for private processes. Abstract BPEL gives a view of a BPEL process's external, public behaviour but I am not sure it is enough to really capture all the semantics of a peer to peer, business to business collaboration. This is the complementary problem to BPEL the folks in the W3C Choreography group are tackling with CDL. Taken from Edwin Khodabakchian's blog where he posted a link to a broadcast that was hard to resist last night. As he notes, Scott Woodgate is a heck of a presenter - someone who clearly knows his story. comment [] 10:21:21 PM |
|
Kids, Grades and Exercise The San Francisco Chronicle had an interesting, likely purposeful juxtaposition, of stories on the front page today:
I guess the conclusion is kids are getting smarter from all that studying but perhaps by doing less sports but their lifespans will be shortened because of all that inactivity. Go figure. These things start seeming more relevant when you have kids. Fortunately, my six year old daughter doesn't seem to have inactivity on the brain quite yet. She is currently whipping me into shape by getting me into having jump rope contests at every spare moment I have. Anyone whose tried "hot peppers" as she calls them - skipping as fast as you can until either you trip or fall down from exhaustion - will know that it's either a quick way to get a coronary or an amazingly intense workout in 30 second to 1 minute intervals. comment [] 9:35:30 PM |
|
|
Tuesday, March 09, 2004 |
|
Oracle Bloggers Running Amok Jeepers, the Oracle Bloggers are running amok ... I see today that Shay Shmeltzer, a huge JDeveloper advocate, has been blogging away for several months too. Both of us were hired into the same group at Redwood Shores originally back in 2001 - he's ended up on the JDeveloper team and I have ended up on the OC4J team. comment [] 9:43:03 PM |
|
Sending a File to a Web Service 1 A recurring question folks seem to have in the Oracle Web services world and likely elsewhere is how to send a file to a Web service ... the typical use case being one or more XML documents from a partner, separate department or external client that needs to be shared/processed by a peer service. This can be done in a number of ways - two outlined here:
Recently, a customer had been asking me to provide a sample for #1 and I finally got around to getting this out today. It's pretty easy to do once you have done it once; it's doing it the first time that seems tricky, especially to folks unfamiliar with XML and type support within Web services. The Web service implementation is provided in below. I did two things here - first, the inbound parameter is of type org.w3c.dom.Element, a supported parameter type in Oracle's and most other Web service implementations; second, I had the service endpoint write the inbound document out to a server file, another customer requirement. I published this as a doc/literal Web service using the steps outlined in my JDeveloper Doc/Lit tip. Remember from that entry the key thing is *not* to deploy the WSDL generated by JDeveloper (which is rpc/literal) so that the server side generates the correct doc/literal WSDL. Here is the implementation: package com.doc.server; // Turn the inbound Element back into an XML document I then generated the client from the server WSDL (in my deployment available at http://127.0.0.1:8888/ws/XMLDataHandlerService?WSDL) and then did two things in the stub - first, I read the XML from a local file assuming it was an XML document; second, I converted it to an XML element and sent it off to the service endpoint published above. Here is the relevant bit of code that does the work - this is the main method within the stub generated from the WSDL called XMLDataHandlerServiceStub. public static void main(String[] args) // Read in some arbitrary XML document Not the prettiest code you've ever seen but it does the trick and gives hopefully the folks that are stumped with this problem a quick step up to a working example which can be easily enhanced to do things like schema validation, more efficient reads and writes etc etc. Something to bear in mind with this approach is I had to read the entire document into DOM which can be a machine killer if your document is large; it is perfectly fine if your inbound file/document is small. Larger documents likely need a different treatment - one being SAAJ. For another day.
comment [] 9:26:42 PM |
|
|
Sunday, March 07, 2004 |
|
XForms, Java Server Faces, InfoPath and BPEL I thought Jonas Jacobi of Oracle's JavaServer Faces team had started and stopped his blog as the version I was looking at only had two entries. I ran into him the other night and harassed him a little (not having much of a leg to stand on given my February output!) and found out he had moved his blog to Orablogs and has been blogging nearly daily since the move. Those thinking about JSF should add it to their must read list. Added to my Oracle blog list - check it out - http://www.orablogs.com/jjacobi. There seems like there should be an interesting intersection that bears exploration between JSF and XForms from a schema centric XML forms perspective:
Microsoft has embarked down this path schema centric forms development in a big way with Infopath which is based on the same ideas as XForms though productized and now embedded in much of Microsoft's client technology. See this comparison between XForms and Infopath. They set the bar on this integration last week with a launch announcement of the pending production release of Biztalk 2004. Why does a guy thinking about BPEL care about this? Well, one of the missing links in the BPEL specification is the link to human interaction which consists of many different things (users and roles for instance) that will either need to be added to BPEL or to a complimentary product/specification. One key feature of such support will be how to provide highly user friendly, interactive user interfaces for the schema bound documents that feed into and out of BPEL scenarios.
comment [] 8:10:46 PM |
|
Eclipse, Lomboz and OC4J Last night I gave a crack at building a tutorial on using Eclipse, Lomboz and OC4J together. I was quite impressed ... rather than trying to mask the complexity of the underlying task, they tried to make the common tasks and activities that are there by the very nature of J2EE easy and straightforward. It had some rough edges ... that is why I am writing up the tutorial to save other folks a bit of pain ... hopefully by end of this coming week I will be done. Simple example: when you are building, assembling and packaging J2EE applications many developers think in terms of JARs, WARs and EARs. This isn't an after thought, it is fundamentally how you work with your application. Not doing it this way can be confusing to J2EE folks. Lomboz does it exactly that way - from the start you are thinking in that context. Folks new to J2EE or unfamiliar may find this strange but it as soon as they pick up a book on J2EE, build their first real J2EE application or start maintaining an existing one, it will likely become pretty clear. Here's a quick Eclipse/Lomboz screen shot of the launch tool where you can choose different J2EE artifacts to build. ![]() comment [] 12:20:42 AM |
|
|
Saturday, March 06, 2004 |
|
Business Process Modelling Notation A few months ago I wrote a simplified view of tooling for BPEL and divided the world up into roughly three categories - those who want to see BPEL, those who want to model BPEL and those who want to work at some level of abstraction beyond BPEL though semantically based on BPEL. This article, Process Modelling Notation and Workflow Patterns, at Business Process Trends, authored by Stephen White out of the standards research organization of IBM, gives a pretty comprehensive comparison of the BPMN Business Process Diagram Notation versus UML 2.0 Activity Diagram notation out of the IBM standards group. If you are in the midst of building BPEL tooling, this makes for a good read. He does it in context of another well know article in the BPEL, Pattern Based Analysis of BPEL4WS by Petia Wohed, Wil M.P. van der Aalst and Marlon Dumas, who broke BPEL4WS into 20 different patterns and analyzed them against other process languages (and have a ton of other material on the patterns Web site of the Faculty of Technology Managment at the Technische Universiteit Eindhoven). While one can easily get lost in the academic sideroads of process language analysis when there is a whole supporting product infrastructure to be built to make the world of BPEL really work, there is something that just feels right when there is this kind research going on to both validate and extend the area. It is very reminiscent of the same kind of work that went on in the world of relational databases before Larry Ellison had his aha! moment and went on to build a $10 billion a year business. Paul Brown did some nice leg work here to gather up a whack of academic research on BPEL. Check it out.comment [] 9:42:37 AM |
|
|
Thursday, March 04, 2004 |
|
OC4J 10.0.3 Developer Preview 2 - J2EE 1.4 Compatible Finally, it's out the door ... a lot of folks here at Oracle worked awfully hard to get it out. About 17,900 or so Sun CTS tests passed along with our own massive regression suites - with the last two weeks filled with "squashing" the last bugs. A lot of folks pretty happy it's done. Check it out: We have a variety of exit criteria and an obvious one is, are all the demos working including Sun's Adventure Builder application? We were feeling pretty good because we've had Adventure Builder .9x running since sometime around Christmas but then somewhere around mid-February we noticed that Adventure Builder 1.0 was out. Same UI but architecturally a completely different application using all sorts of interesting features of J2EE 1.4. A little bit of panic that close to release but OC4J came through with flying colors. Debu Panda, the EJB PM on OC4J and general all round J2EE wizard, did a lot of the last minute "squashing" on that one including sending back a bunch of fixes to Sun (Steve Button, another of my teammates [who I believe reads J2EE specifications for entertainment :-) ] talks about one issue here). The how-to for this, which for all intents and purposes is "ant deploy" with lots of words around it, should be available early next week. Nice to see the value proposition of J2EE illustrated but it would have been nicer if Sun had put it out a little earlier than exactly when we were getting down to the last minutes of our our release! comment [] 10:23:42 PM |
|
Links Updated - Brian Duff and Gerard Davidson These two guys I think are having too much fun on the JDev team - Aspect Oriented Programming in JDeveloper from Gerard and topics all over the place like Tiger and the Magic of Synth from Brian. Fixed their links into my blogroll - check them out, they are doing cool stuff. comment [] 10:11:44 PM |
|
Oracle Lite from OC4J Another break from blogging but I am back. I've had a slew of side projects going on one of which has been getting a partner going with Oracle Lite so they could embed it into their product. The other, coming up in another blog and eventually more official writeup for OTN is using Lomboz with Eclipse for OC4J. Anyway, because I know close to zero about Oracle Lite I became a customer of Oracle rather than a know-it-all about my particular area. I had two requirements: The first challenge was getting the big download to a minimum size. The next was figuring out how the concept of a database listener on Oracle Lite worked. And the last, the easiest for me, was hooking it up to OC4J. 1. Download the zip file. I chose the latest 5.0.2 release. Run the installer, on Windows setup.exe; on Linux runInstaller, and do a custom install. On Windows install the Windows SDK. This reduces the 358 megabyte footprint to about 38 megabytes. 2. Now you're ready to build your minimal distribution. Here is the set of files you need - copy them into your new Oracle Lite distribution/runtime directory: createdb.exe msql.dll msql.exe - 'sqlplus' of Oracle Lite msql.jar OLAD2040.DLL OLITE40.JAR (thin JDBC driver) olite40.msb oljdbc40.dll olobj40.dll OLOD2040.DLL olsv2040.exe ('tns listener' of Oracle Lite) olsql40.dll
3. You will have from the install a file polite.ini in the directory c:\windows or c:\winnt. Edit it to point to your working directory and one of the Olite message file: [All Databases] DatabaseID=502 DataDirectory=c:\olite NLS_LOCALE=ENGLISH MessageFile=c:\olite\OLITE40.MSB DBCharEncoding=Native
4. You are now ready to create a Oracle Lite database:
>c:\olite\createdb.exe mikedb c:\olite\mikedb.odb
5. Next make sure you have the ODBC registry entries for OLite. Here is the screen shots of mine which I manually entered - first the node Software->ODBC->ODBCINST.INI->Oracle Lite 40 ODBC Driver:
and second the node Software->ODBC->ODBCINST.INI->ODBC Drivers->Oracle Lite 40 ODBC Driver:
6. On Windows, Oracle Lite uses ODBC, even if you come in through thin, type 4 JDBC, the Oracle Lite equivalent to Oracle mothership tnslsnr, converts those JDBC calls into ODBC calls - at least as I understand it. So, we need to go into the Microsoft ODBC administrator and create a datasource for mikedb.odb. You will find you have from the SDK install a user datasource called POLite ... you can alter that one or create a new one. Here are my properties:
Datasource Name: mikedb Data Description: Oracle Lite 40 Data Source Database: mikedb Default Isolation Level: Read Committed Default Cursor Type: Static
Here is a picture of from the Microsoft ODBC tool: 7. Now so you can handle incoming thin JDBC calls from your Servlet running on OC4J, start up the Oracle Lite listener - this is the part that had me stymied for a while: >c:\olite\olsv2040.exe /debug /wdir=c:\olite
In debug mode, above, errors will be output to the file olsv.log. This listener can also be more usefully installed as a service using the command:
>c:\olite\olsv2040.exe /install
This service listens on port 100 for JDBC calls to data sources defined in the Microsoft ODBC Administrator.
One of the tricks with this is two things need to available on the path and classpath:
a. <JDK_HOME>\jre\bin\server\jvm.dll has to be on the path b. OLITE40.jar has to be on the classpath
8. Now you need to populate that database with something. Here is how to do scott/tiger: >c:\olite\msql system/manager@jdbc:polite4@127.0.0.1:100:mikedb
SQL> CREATE USER SCOTT IDENTIFIED BY TIGER; SQL> GRANT ADMIN TO SCOTT; SQL> GRANT RESOURCE TO SCOTT; SQL> COMMIT; SQL> EXIT;
>c:olitemsql scott/tiger@jdbc:polite4@127.0.0.1:100:mikedb
SQL>CREATE TABLE DEPT (DEPTNO NUMBER(2) NOT NULL,DNAME CHAR(14),LOC CHAR(13),CONSTRAINT DEPT_PRIMARY_KEY PRIMARY KEY (DEPTNO)); SQL>INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');
SQL>INSERT INTO EMP VALUES (7839,'KING','PRESIDENT',NULL,'17-NOV-81',5000,NULL,10); 9. Now we are ready to hook up OC4J. Edit your: <oc4j_home>\j2ee\home\config\data-sources.xml
and add the following datasource: <data-source class="com.evermind.sql.DriverManagerDataSource" name="OracleLiteDS" location="jdbc/OracleLiteCoreDS" xa-location="jdbc/xa/OracleLiteXADS" ejb-location="jdbc/OracleLiteDS" connection-driver="oracle.lite.poljdbc.POLJDBCDriver" username="scott" password="tiger" url="jdbc:polite4@127.0.0.1:100:mikedb" inactivity-timeout="30" />
10. Now we have to make the Oracle Lite thin JDBC driver available for OC4J to be aware of. Copy the olite40.jar file to:
and then edit the file:
<oc4j_home>\j2ee\home\config\application.xml
and add the line: <library path="../applib/olite40.jar"/> 11. Now fire up OC4J (java -jar oc4j.jar) and you are ready to deploy a servlet. 12. I will assume folks know how to write and package servlets as wars etc. The main trick is is to make sure that you look it up correctly. The last piece of this blog is a trivial sample servlet querying the emp table [1]. And that is that. Recorded for posterity. Am also working on the Linux piece but it looks pretty much the same sans ODBC. Would be even cooler if it were native Java but we'll have to check out statement of directions and the like to see what those guys are actually up to in that space! [1] package hr; import java.rmi.RemoteException; import javax.servlet.*; import javax.servlet.http.*; import java.io.PrintWriter; import java.io.IOException; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.PreparedStatement; import java.sql.Connection; import oracle.lite.poljdbc.*; public class query extends HttpServlet { private static final String CONTENT_TYPE = "text/html; charset=windows-1252"; private Connection conn = null; private PreparedStatement ps = null; private static final String dsName = "jdbc/OracleLiteDS"; public void init(ServletConfig config) throws ServletException { super.init(config); } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(CONTENT_TYPE); PrintWriter out = response.getWriter(); String salary = ""; try { conn = getConnection(dsName); ps = conn.prepareStatement("SELECT SAL FROM EMP WHERE ENAME = ?"); ps.setString(1, "TURNER"); ps.executeQuery(); ResultSet rs = ps.getResultSet(); if (rs.next()) { salary = new String(rs.getBigDecimal(1).toString()); } } catch (SQLException e) { throw new RemoteException(e.getMessage()); } out.println("<html>"); out.println("<head><title>query</title></head>"); out.println("<body>"); out.println("<p>Turner's salary is: " + salary + "</p>"); out.println("</body></html>"); out.close(); } private Connection getConnection(String dsName) throws SQLException, RemoteException { DataSource ds = getDataSource(dsName); return ds.getConnection(); } private DataSource getDataSource(String dsName) throws RemoteException { DataSource ds = null; try { Context ic = new InitialContext(); ds = (DataSource) ic.lookup(dsName); } catch (NamingException e) { e.printStackTrace(); throw new RemoteException(e.getMessage()); } return ds; } }
comment [] 9:28:28 PM |
