Posts tonen met het label Java. Alle posts tonen
Posts tonen met het label Java. Alle posts tonen

18 okt 2008

Sync Lotus Domino calendar met Google calendar

Calendaring & Scheduling is in de huidige drukke maatschappij erg belangrijk geworden. Het bijhouden en afstemmen van ieders agenda is absoluut noodzakelijk geworden. Natuurlijk is het dan aan te raden om deze agenda digitaal bij te houden. Ieder mail pakket voorziet ook in dergelijke functionaliteit. Bijvoorbeeld Outlook, Lotus Notes en anderen kennen al jaren dzeze functionaliteit. Ook google kent deze functionaliteit met Google calendar. Een erg handige manier om je agenda met anderen te delen.

Wat ik echter vaak mis is de mogelijkheid je werk agenda te synchroniseren met je thuis agenda. Dus de mogelijkheid om het thuisfront op de hoogte te stellen van je werkzaamheden en je bezigheden.

Op het werk gebruik ik natuurlijk Lotus Domino. Het zou toch mooi zijn als ik de agenda daarvan zou kunnen synchroniseren met Google calendar.

Binnen Google calendar heb je de mogelijkheid extra kalenders aan te maken. Het is mijn bedoeling zo'n extra kalender te synchroniseren met Lots Domino.

Hiervoor heb ik een java proces geschreven die alle Lotus Domino calendar items vertaald in iCal formaat. Vervolgens maak ik gebruik van opensource software, GCaldaemon, om deze iCal te synchroniseren met Google.

Op dit moment ben ik aan het worstelen met recurrent events, maar dat gaat zeker werken.

Een mooi oplossing vind ik zelf:-)

19 jul 2008

Webservices Domino 8

Twee jaar geleden heb ik voor een klant een postcode webservice geschreven.

Deze doet hetvolgende:

 

Postcode architectuur

 

Het stuk wat ik geschreven heb zit in de middelste laag: de proxy. Deze functionaliteit had ik met behulp van Domino 7, het webservice design element, Stubby en java gerealiseerd. Stubby is een open source tool (link) die je op OpenNtf terug kan vinden. Het geeft je de mogelijkheid een Webservice consumer in Domino 7 te bouwen. Stubby maakt gebruik van het feit dat er in de Domino 7 distribitie een volledige Axis implementatie is meegeleverd. Niet alleen de server functionaliteit maar ook de client functionaliteit is daarbij inbegrepen.

In Domino 8 is de hele Axis implementatie echter veranderd.Het gevolg is dat Stubby niet meer werkt met Domino 8 en ook eerder gerealiseerde webservice consumers, gerealiseerd met behulp van Stubby, werken niet meer. Wel heeft Domino 8 een mogelijkheid gekregen om "out of the box" een webservice consumer te realiseren.(link) Toen ik dit echter probeerde kreeg ik allemaal foutmeldingen. Blijkbaar kan de functionaliteit alleen niet al te ingewikkelde WSDL bestanden aan.

Reden om te switchen naar een externe Axis approach(link). Voorgaande wil zeggen dat je de Axis jars download, stubs genereerd op basis van de te consumen webservice WSDL en deze stubs vervolgens gebruikt in je code. In mijn geval wilde ik de code gebruiken in een Webservice Design element van Domino 8. De Axis jars en Stub code had ik op het classpath gezet door de jars in het design element in te laden. In de domino designer werkt dat allemaal prima. Alles compileert en lijkt goed te werken. Bij het testen van de Webservice genereerd de webservice engine van Domino 8 echter een fout: "java.lang.reflect.InvocationTargetException" op basis van een "ClassNotFoundException".

Wat blijkt: externe jars die op het classpath gezet zijn door de jars in te laden in het webservice design element zijn tijdens runtime niet te vinden voor de webservice engine! 

Bovenstaande is een bug in Domino 8. Ik weet niet of deze ook in Domino 8.0.1 bestaat. Gelukkig is er een workaround voor:

Plaats de externe jars in de ext folder van de Domino 8 jvm.

13 jul 2008

Virtualisatie

Ons bedrijfje maakt roerige tijden door. Voor diegenen die het niet wisten:

We doen consultancy en implementatie met betrekking tot proces management. Dit alles verdeelt, tot heden, in twee technologien: Lotus Domino en Microsoft ( C# en .net ).

In deze roerige tijden is het belangrijk een gedegen infra stuctuur neer te zetten. Hiervoor hebben we de volgende servers in het leven geroepen:

Gehuurde windows 2003 server ( STRATO )

  • Mail server ( Domino 8.0 )
  • Sametime server
  • Applicatie server ( Domino 8.0 )
  • Subversion version control

Een eigen server met daarop een gevirtualiseerde Domino development omgeving (Domino 8.0.1) en een Quickr 8.1, (gevirtualiseerd) omgeving.

Het host OS draait op Win 2003 professional. Hiervoor is gekozen omdat deze versie van windows gebruik kan maken van de aanwezige 8 gig aan geheugen.

De guests OS'en draaien op Win 2003 standard.

Voor de virtualisatie hebben we gekozen voor Virtual Server 2005 van Microsoft. De voornaamste reden hiervoor is de eenvoud van gebruik van dit product. Binnen no time heb je een server up and running.

De beide domino 8.0.1 servers hebben beiden 1 gig geheugen en 2 HDD ( 10 gig en 100 gig ) tot hun beschikking.

Omdat we maar een publiek ip adres tot onze beschikking hebben hebben we een reverse proxy geimplementeerd met host header routing functionaliteit. Windows ISA server zou dit kunnen doen maar dat is wellicht een overkill voor de functionaliteit die wij willen. Uiteindelijk hebben we gekozen voor Puakma webbooster. Deze software is gratis als je het niet voor commerciele doeleinden wil gebruiken. Bovendien is het erg eenvoudig in gebruik en installatie en we krijgen er gratis gzip compressie techniek bij. Een perfect product en dus een aanrader. Zomaar een greep uit de functionaliteit die we krijgen:

  • Routing op basis van host header
  • Caching van statische content
  • Gzip compressie
  • Load balancing
  • Failover
  • SSL voor achterliggende domeinen dmv een wildcard certificaat.

Voor de gzip functionaliteit zijn we tegen een aantal issues aangelopen:

Het gzippen van xml ( text/xml ) gaat vaak niet goed. De browser handeld dit niet goed af. Ook de response van een webservice call is in xml en mag dus niet gegzipped worden. Met name Quickr met zijn Lotus Quickr connectoren heeft daar last van. Puakma Webbooster moet dus geconfigureerd worden zodat xml content niet gegzipped wordt.

Verder hadden we wat problemen met Quickr te draaien op een niet standaard Notes poort. Vanwege het feit dat we maar 1 ipadres tot onze beschikking hebben had ik de Virtuele Domino servers op twee niet standaard poorten laten lopen zodat de router NRPC verkeer naar de goede server kon routeren obv poort nummer ( portforwarding ).

Quickr werkt echter niet op een andere poort dan 1352. Hier is geen workaround voor en de enige oplossing is Quickr gebruik te laten maken van 1352.

Uiteindelijk hebben we nu dus een gevirtualiseerde omgeving met twee domino servers en een productie server met mail, sametime en applicaties.

30 mrt 2008

Hoeveel Domino servers

Ik als Domino man ben natuurlijk erg geinteresseerd in de penetratie van Domino in de nederlandse markt. Nu zijn deze lijsten erg moeilijk te verkrijgen.

Om toch enig inzicht te verkrijgen in hoveel bedrijven er nu Domino draaien heb ik het volgende gedaan:

ik heb een java programmaatje geschreven die alle!! ip adressen in nederland afloopt en checkt of er op poort 1352 ( de domino poort ) een server luistert. Als dat zo is dan logt hij het ip adres en de dns naam in een csv bestandje.

Voor de liefhebbers:

Je kan hem hier downloaden. Het bijbehorende ipranges bestand voor nederland kun je hier vinden.

Je start het programma door:

java -jar dominofinder.jar <iprangebestand> <logbestand> <logginglevel 1-4> <max connecties>

image

9 jan 2008

JasperReports

Bedrijven hebben vaak behoefte aan management informatie. Vele bedrijven gebruiken daar Crystal reports voor. Een alternatief is JasperReports.

Een OpenSource product gebaseerd op java.

Het product bestaat uit verschillende componenten:

  • TomCat : als application server
  • iReports: als client applicatie voor het modelleren van je rapporten
  • JasperReports: voor het genereren van de rapporten
  • JasperServer: voor het managen van rapporten

Alle componenten zijn in een installer te downloaden van jaspersoft. Na installatie is het vrij eenvoudig datasources aan te maken en vervolgens rapporten te genereren. De rapporten kunnen in .csv, .xls, .pdf, .doc vormgegeven worden en distributie kan plaatsvinden dmv mail.

Allemaal erg mooi en relatief eenvoudig. Na een avondje spelen had ik al rapportages uit een MySQL db. In mijn beleving een aanrader!

( de volgende stap is: rapporteren uit Lotus Notes databases )

2 okt 2007

Java en Notes.ini

01 Nov 2001

In response to a number of programming related questions, Professor INI decided to run through all the programming related NOTES.INI variables. Last month, we looked at variables associated with LotusScript, Lotus Connectors, and the formula language. This month, we move on to variables that relate to Java and answer the question:
Q: I'm a Notes/Domino applications developer just starting to use Java. What Designer NOTES.INI variables can I use that will help me with my programming?

Java access to Domino objects (through CORBA), although not actually part of the Designer Integrated Development Environment, relies on Designer for compilation and a Domino server at runtime (for applications). This article addresses the NOTES.INI variables affecting Java/CORBA and the JVM.

Note: NOTES.INI variables related to debugging are not addressed in this article. For more information concerning NOTES.INI debug variables, see the Ask Professor INI column, Using debugging variables.

Most of the variables discussed in this article are Notes and Domino R5 NOTES.INI variables. We've included some Rnext-only variables (these are so noted), but please keep in mind that Rnext-only variables are works in progress and, therefore, are subject to change before Rnext is released.

Much of the information contained in this article can be found in Domino R5 Designer Help. However, additional details were gleaned through discussions with the developers and are not documented.

A few of the variables mentioned here are set through the client's user interface (these are so noted), but most are set by modifying the NOTES.INI file directly (for example, by using a text editor). In general, we discourage editing the NOTES.INI file directly because of the damage that can be done by modifying it incorrectly. If you find you need to edit the NOTES.INI file directly, do so with caution and great care.

Variables and Java/CORBA

Using Java to access Domino Objects requires that a few NOTES.INI variables be set. Also, see the section on Variables and the JVM for more Java-related NOTES.INI variables.

Note: Do not confuse this interface with the Lotus Domino Toolkit for Java/CORBA, which will be discussed in a subsequent article.

Allow_Notes_Package_Applets

This variable allows you to use Notes packages in your Java applications. Its syntax is:

Allow_Notes_Package_Applets=1

This variable is set in the client's NOTES.INI file.

JavaDlgSettings

To assist you in creating a Java agent, this variable, when set to 1, is used to "remember" the last set of options you used in the Edit Project dialog box. Its syntax is:

JavaDlgSettings=1

This variable is set in the client's NOTES.INI file.

JavaUserClasses

If your Java agent calls another class that has native methods, you must make sure that that class is loaded via the JVM's system loader. To ensure this, set this variable to the file name of the class file that contains the native methods. The variable's syntax is:

JavaUserClasses=< directory/filename >

By setting this variable, you override a security restriction contained in the agent class loader that does not allow classes with native methods to be loaded. This variable may be set in either or both the client and the server NOTES.INI file.

Note that you should not enter more than one JavaUserClasses entry in a NOTES.INI file. If you have more than one, only the first will be used; all others will be ignored. If you have multiple uses for JavaUserClasses, enter all the parameters on the same line. For example:

JavaUserClasses=< directory1 >;< directory2\jarfile >;< zipfile1 >;…

Keep in mind that there is a 256-byte limit for NOTES.INI entries. Use JavaUserClasses sparingly.

EnableJavaApplets

This variable enables Java applets if set to 1 or disables them if set to 0. You set this variable to 1 by selecting the Enable Java applets option in the Additional Options section of the Basics panel of the User Preferences dialog box. Deselecting Enable Java applets sets the variable to 0.

LaunchDIIOPOnPreview

DIIOP (Domino Internet Inter-ORB Protocol) is a server task that works with the Domino Object Request Broker. When set to 1, this variable launches the DIIOP server task when Preview In a Browser is selected from Domino Designer.

You set this variable to 1 by selecting "Launch the CORBA (DIIOP) server on Preview in a web browser" option in the Additional Options section of the Basics panel of the User Preferences dialog box. Deselecting "Launch the CORBA (DIIOP) server on Preview in a web browser" causes this variable to be removed from the NOTES.INI file.

ServerTasks

In general, this variable must be set for anything to run on the server. Setting it to http and diiop ensures that the server tasks HTTP and DIIOP are running. Java/CORBA requires that these server tasks be running. Its syntax is:

ServerTasks=< any other tasks >, http, diiop

where < any other tasks > are any other needed server tasks. This variable is set in the server NOTES.INI file.

Environment variables

Java/CORBA classes include the following NOTES.INI variable-related functionality:

The getEnvironmentString (for strings and numeric values) and getEnvironmentValue (for numeric values) methods of the Session class retrieve the value of an environment variable from the current user's NOTES.INI file.
The setEnvironmentVar method of the Session class sets the value of a string or numeric environment variable.



Back to top





Variables and the JVM

There are several variables used to control the behavior of the Java Virtual Machine (JVM). All of these variables can be set in either or both the client and server NOTES.INI file. The client's NOTES.INI values rule the JVM executing on the client, such as local Java agents and applets. The server's NOTES.INI values rule all the JVM's running on the server-one each in http, amgr, server, router, runjava, and so on, or in some combination. It is unlikely, however, that you will ever need to set any of these variables (except for perhaps JavaUserClasses). As ever, proceed with caution when editing a NOTES.INI file.

JavaEnableJIT

By default, Notes disables the JVM default JIT (Just-In-Time) functionality because of its instability (see the caution below). Setting this variable to 1 turns on the default JIT functionality, if one is provided; so the JVM will allow normal loading of the default JIT. The variable's syntax is:

JavaEnableJIT=1

Caution: JIT functionality can be unstable and lead to unexpected crashes.

JavaJITName

Setting this variable turns on the JIT specified in the parameter. Its syntax is:

JavaJITName=< jit_name >

where < jit_name > is the specific JIT to use. You must provide the named JIT or an error is reported by the JVM, although execution of the application or agent will continue without it.

You can specify the default JIT name here, such as symcjit on Win32 or jitcompiler on alpha; that is equivalent to using JavaEnableJIT=1.

Note: The name of the JIT on Win32 differs depending on what version of Notes you are referring to. On 5.0.x, the JIT name is symcjit. On Rnext, its name is jitc.

JavaMaxHeapSize

Use this variable to specify the maximum size the Java heap can grow to in bytes. Its syntax is:

JavaMaxHeapSize=< number_of_bytes >

The default number of bytes is 67,108,864 (64MB). Note that this is the maximum size, not the initial size. (Currently, there is no way to set the initial size.) The JVM starts out at 1MB of heap space, most of it uncommitted. If the JVM needs more heap space than it currently has, it expands the heap in increments, although it will not exceed the maximum. An exception like java.lang.OutOfMemoryError is an indication of maxed-out heap space.

JavaNoClassGC

Use this variable to turn off the garbage collection (GC) of unreferenced classes. Its syntax is:

JavaNoClassGC=1

For example, you might turn garbage collection of classes off to protect static fields. If a class has static fields that are used by others, and garbage collection is performed on that class, it could lead to potential unintended changes in the static fields.

You can use this variable to stop failures due to poorly written code, for instance, code that relies on static fields with no continuity of class referencing. Properly designed code will work properly regardless of the state of this variable.

JavaStackSize

You can use this variable to specify the size of each Java thread's execution stack. Its syntax is:

JavaStackSize=< number_of_bytes >

The default size of a Java thread's execution stack is 409,600 (or 400K), which is fine for most purposes. However, if you need to use deeply nested call stacks (such as recursion), then you may need to increase the stack size.

JavaUserClasses

The variable is set to a list of directories or JAR or ZIP files that are added to the CLASSPATH at JVM startup so that classes can be found via the system loader rather than attached to the agent or applet. This allows code sharing across databases. The variable's syntax is:

JavaUserClasses=< directory1>;;;...

The list is semicolon ( ; ) delimited on Win32 and OS/2 system and colon ( : ) delimited on Unix systems. For example, the following is a valid list on a Win32 system:

JavaUserClasses=c:\classes;d:\appxyz\stuff.jar

Be aware that one drawback to using this variable is that, because it is in the NOTES.INI file, it doesn't replicate. If you have an agent, applet, or servlet that relies on JavaUserClasses, and the database that contains that item replicates somewhere, you have to manually add JavaUserClasses to the NOTES.INI file on the target system or the agent, applet, or servlet won't run. Another drawback is that the variable requires that the user have access to the file system on the server.

Note that you should not enter more than one JavaUserClasses entry in a NOTES.INI file. If you have more than one, only the first will be used; all others will be ignored. If you have multiple uses for JavaUserClasses, enter all the parameters on the same line, as shown in the syntax above.

Keep in mind that there is a 256-byte limit for NOTES.INI entries. Use JavaUserClasses sparingly.

JavaVerbose

Use this variable to turn on the verbose setting of the JVM. Its syntax is:

JavaVerbose=1

This causes numerous messages to be issued by the JVM during its execution, which can be helpful in narrowing down runtime problems.

JavaVerboseGC

Use this variable to turn on extra messages from the GC mechanism in the JVM. Its syntax is:

JavaVerboseGC=1

During garbage collection, the JVM issues many informational messages about memory use. These can be helpful for debugging heap allocation problems, such as the unbounded growth of the heap leading to OutOfMemoryErrors.

JavaVerboseJNI

This is a new variable in Rnext. Use this variable to turn on extra messages from the Java Native Interface mechanism in the JVM. Its syntax is:

JavaVerboseJNI=1

During calls to JNI functions, the JVM issues many informational messages about what is happening. These can be helpful for debugging native code and for getting extended JNI-related information out of the JVM at runtime.

Variables related to the JVM verifier

The verifier is a piece of the JVM that inspects a given piece of bytecode to make sure it complies with the spec and doesn't do anything that code shouldn't do. The default behavior of the JVM is to verify just bytecode that is loaded remotely. These next three variables control verifier behavior.

JavaVerify
Use this variable to tell the JVM to verify all bytecode it loads, not just the bytecode loaded remotely. Its syntax is:

JavaVerify=1

Because this verification of non-remotely loaded code results in a performance hit, it is not the default behavior.

JavaNoVerify
Use this variable to turn off all bytecode verification. Its syntax is:

JavaNoVerify=1

Caution: The verifier is an essential part of Java's security mechanism. Turning it off will improve performance, but it will also leave you with a gaping security hole and no protection against code inadvertently getting corrupted in transfer. Although available and supported, this variable should seldom, if ever, be used.

JavaVerifyRemote
Use this variable to tell the JVM to run verification on classes that are loaded remotely, for example, via a classloader. Its syntax is:

JavaVerifyRemote=1

Although the current default for the JVM is to have verification of remotely loaded bytecode on, this variable has been included to ensure that this option can be enabled if the default setting ever changes.

Conclusion

This concludes the second part of our exploration of NOTES.INI variables and programmability. In a future column, we will discuss NOTES.INI variables and the Notes & Domino programming toolkits.

Do you have a NOTES.INI question? Send it in to Professor INI. We'll answer as many questions as we can in future "Ask Professor INI" columns. Keep in mind, however, that we may not be able to answer every question, nor can we quickly respond to requests that require immediate attention. If you need an immediate response to a question, we recommend you post it in the Iris Cafe Notes/Domino Gold Release Forum where someone from the general Notes community might be able to help, or contact Lotus Customer Support.

26 sep 2007

SOA

Klik hier PDF voor een pdf die het transformeren van legacy applicaties naar SOA behandelt.

20 jul 2007

DXLImporter

Wat mij deze week ook opviel is hetvolgende:
Na het importeren van dxl in een nieuwe database blijkt dat Lotusscript en java design element niet zijn te openen in de designer!
De gebruiker krijgt dan een fout die ongeveer hetvolgende zegt: 'Document is not signed'.

De workaround voor dit probleem is het verzamelen van die design elementen met behulp van een NoteCollection en vervolgens alle documenten in de collection the signen met een Document.sign().

Er is duidelijk nog een hoop werk nodig voordat de dxlimport functionaliteit binnen domino volwassen is.

DXLImporter en error handling

Deze week druk geweest met java en Dxlimporter in Lotus Domino.
Met name de error status van de dxlimporter hebben me met verbazing vervuld.

Op het dxlimporter object kun je aangeven of de import bij het optreden van een fatal error moet stoppen of dat het proces dan moet doorgaan. De dxlimporter kent echter 3 gradaties van errors:
warning
error
fatalerror.

Je zou denken dat alleen bij het ontstaan van een fatalerror een exception gethrowd word. Echter, ook een error throwt een Exception van het type NotesException. Rare van dit laatste is echter dat de import wel gewoon goed gaat!

Bovenstaande heeft me een poosje beziggehouden voordat ik daar achter was. Gevolg was dat ik mijn errorhandling in de java classes drastisch moest aanpassen en ik had weer eens een diepe zucht over voor Lotus Domino:-(

29 jun 2007

JAXB java en xml

In de huidige development van applicaties kun en wil je niet meer om xml als datasource heen.
Veelvuldig is bijvoorbeeld het gebruik van xml als dataopslag, en het tonen van de data regelen we dan met xsl(t).

Nu ben ik geen grote liefhebber van xsl, maar dat is een ander verhaal. Dit verhaal gaat over xml en wat doe je er dan mee in de verscheidene backend processen.

In mijn geval maak ik gebruik van Java in de verschillende backend processen. Wat is dan het meest praktische om met de xml data te kunnen werken?

Natuurlijk kun je met de standaard Dom of SAX parser door de xml heen en de verschillende waarden uit de xml gebruiken. Je kan zelfs, om het jezelf makkelijker te maken, XPath gebruiken om snel bij de verschillende data te komen. Na het verwerken van de data moet je dan weer de nieuwe waarden in de xml opslaan en klaar ben je.

Een andere mogelijkheid is gebruik maken van xml binding. Omdat xml qua structuur heel veel overeenkomt met objecten in een programmeer taal zou het mooi zijn als je de xml zou kunnen transformeren naar objecten. Nog mooier zou het zijn als dit proces ook vice versa zou werken.
Bovenstaande noemen we xml binding.

Voor Java zijn er verschillend xml binding mogelijkheden maar ik kwam uit op JAXB van Sun.
(Java Architecture for Xml Binding ). De oudere versies zijn opensource met een licentie die het toestaat het vrijelijk te gebruiken in je eigen software.

Omdat ik op Domino 7.02 werk en dus een jvm 1.4 tot mijn beschikking heb, heb ik gekozen voor JAXB versie 1.6.

Na het downloaden en installeren ( het is een Class bestand die je met java -cp kunt installeren ) krijg je een geinstalleerde JAXB omgeving op je machine. In de bin dir van deze software staan een aantal .bat programma's die je in staat stellen snel met JAXB aan de slag te gaan.

De werkwijze is als volgt:
Zorg ervoor dat je een schema van je xml hebt ( xsd ). Als je die niet hebt dan kunnen programma's als
OxYgen of XmlSpy je daar heel goed bij ondersteunen. Mijn voorkeur ligt trouwens bij OxyGen vanwege de, in mijn beleving, betere userinterface. Met behulp van deze programma's kun je je xml bestand converteren naar xsd. Kijk nog wel even handmatig naar de xsd en controleer de minOcc en maxOcc attributen van alle elementen. Zorg er ook voor dat de beschrijving van de elementen op dezelfde chronologische volgorde plaatsvind als in de xml.

Waarom nu xsd en geen dtd? Voor ons als domino developers zou dat makkelijker zijn omdat domino alle domino xml beschrijft in dtd's. De JAXB site schrijft hier hetvolgende over:




Why W3C XML Schema Language?
The W3C XML Schema Language is not the only schema language. In fact, the XML specification describes document-type definitions (DTDs) as the way to express a schema. In addition, pre-release versions of the JAXB Reference Implementation worked only with DTDs -- that is, not with schemas written in the XML Schema Language. However, the XML Schema Language is much richer than DTDs. For example, schemas written in the XML Schema Language can describe structural relationships and data types that can't be expressed (or can't easily be expressed) in DTDs. There are tools available to convert DTDs to the W3C XML Schema Language, so if you have DTD-based schemas that you used with an earlier version of the JAXB Reference Implementation, you can use these tools to convert the schemas to XML Schema Language.




Ok, xsd dus en nu we deze hebben kunnen we verder in het proces om onze applicatie JAXB compliant te maken. De truc is nu Java classes te genereren vanuit deze xsd. Het xjc.bat bestand in de bin directory gaat je hier bij helpen. Als je in een commandbox de volgende commandline invoert "xjc.bat -p " zal het programma een directory structuur voor je aanmaken met daarin alle benodigde classes.



In eclipse kun je vervolgens deze directory importeren in je java project. Wel heeft eclipse dan nog een aantal jar bestanden nodig om de geimporteerde code te kunnen compileren. Deze jar bestanden kun je vinden in de lib directory van JAXB en zijn:


  • jax-qname.jar,

  • namespace.jar,

  • relaxngDatatype.jar

  • jaxb-api.jar

  • jaxb-impl.jar

  • jaxb-libs.jar

  • jaxb-xjc.jar

Het onderstaaande schema geeft de bovenstaande stappen schematisch weer:





Nu we alles in eclipse hebben zitten kunnen we gaan werken met de javaclasses. Dit doen we via de meegeleverde JAXB Api. De eerste stap is het unmarshallen( i= het inlezen van de xml in java objecten ). Met deze objecten kun je aan de slag. Properties kun je wijzigen data kun je aanpassen en als je klaar bent kun je de objecten marshallen ( = terugschrijven naar xml ).

Al met al een krachtige manier om met xml te werken binnen domino.

11 mei 2007

Open Source Workflow Engines in Java

java-source.net heeft een mooi overzicht van vele opensource workflow engines.
Van jBPM weet ik dat het ook een mooie UI heeft voor het modelleren van processen, een aanrader om eens te bekijken.


Verder is ofBiz ( open for business) het zeker waard om eens te bekijken.
http://ofbiz.apache.org/