<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10046048</id><updated>2011-04-22T07:06:34.540+02:00</updated><title type='text'>dev-blog</title><subtitle type='html'>software development blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10046048.post-113120048245885024</id><published>2005-11-05T14:56:00.000+01:00</published><updated>2005-11-05T16:00:17.256+01:00</updated><title type='text'>Desing Web Services "Contract First"</title><content type='html'>In the Web Service arena many developers have recognised that the good old software engineering principles still apply these days: First discuss and design the interface and then implement it:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt; &lt;li&gt;&lt;a id="viewpost.ascx_TitleUrl" class="posttitle" href="http://pluralsight.com/blogs/aaron/archive/2005/04/25/7729.aspx"&gt;The virtue of contract-first&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://blog.springframework.com/arjen/index.php/archives/2005/06/23/thoughts-on-a-soa-part-3-its-the-contract-stupid/"&gt;Thoughts on a SOA, part 3: It’s the Contract, stupid!&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;I somehow agree with this principle due to the following reasons:&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;Interface constraints or restrictions cannot be expressed exactly enough using programming languages. For example: "enumerations of concrete values" or "date vs time" etc.&lt;br /&gt;&lt;/li&gt;   &lt;li&gt;Interface very often contains only subset of the internal domain data, maybe even transformed, often restricted. A separate layer of mapping is usually anyway requred.&lt;/li&gt;&lt;li&gt;Designing the contract first encourages early discussion and agreement with service partners.&lt;br /&gt;&lt;/li&gt; &lt;li&gt;Designing the contract first encourages explicit considerations of interoparability compliance (for example &lt;a href="http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html"&gt;WS-I Basic Profile)&lt;/a&gt; instead of completely relying on a tool&lt;br /&gt;&lt;/li&gt;  &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Web Service toolskits on the other hand often encourage developers to use there well known programming environment and extract a the contract (WSDL) .&lt;br /&gt;&lt;br /&gt;Axis supports contract first with it's WSLD2Java tool.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The open question is how good J2EE Web services (JSR 109) support this approach?&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-113120048245885024?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/113120048245885024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=113120048245885024' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/113120048245885024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/113120048245885024'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/11/desing-web-services-contract-first.html' title='Desing Web Services &quot;Contract First&quot;'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-113006730098425767</id><published>2005-10-23T13:06:00.000+02:00</published><updated>2005-11-04T22:12:18.083+01:00</updated><title type='text'>ALPS touchpad on Ubuntu breezy for Dell 510m</title><content type='html'>These observations were made with Ubuntu Breezy which has Kernel 2.6.12-9 and the Synaptics Driver Version 0.13.6 at the time this log entry is written.&lt;br /&gt;&lt;br /&gt;The latest version and more information can be found at:&lt;br /&gt;http://web.telia.com/~u89404340/touchpad/&lt;br /&gt;&lt;br /&gt;1. check that the kernel modules are loaded:&lt;br /&gt;$ lsmod | grep psmouse&lt;br /&gt;$ lsmod | grep evdev&lt;br /&gt;&lt;br /&gt;(Ubuntu Kernel has both of them compiled as modules: see CONFIG_MOUSE_PS2 and CONFIG_INPUT_EVDEV)&lt;br /&gt;&lt;br /&gt;Unlike mentioned in the Ubuntu forums at several places (http://ubuntuforums.org/showthread.php?t=75431) I did not have to load the psmouse with any options like proto=EXPS. In fact doing this prevented the kernel from correctly detecting the ALPS touchpad.&lt;br /&gt;&lt;br /&gt;2. check that the the touchpad is detected by the kernel:&lt;br /&gt;$ cat /proc/bus/input/devices&lt;br /&gt;&lt;br /&gt;I: Bus=0011 Vendor=0002 Product=0008 Version=7321&lt;br /&gt;N: Name="AlpsPS/2 ALPS GlidePoint"&lt;br /&gt;P: Phys=isa0060/serio1/input0&lt;br /&gt;H: Handlers=mouse1 &lt;span style="font-weight: bold;"&gt;event2&lt;/span&gt; ts1&lt;br /&gt;B: EV=f&lt;br /&gt;B: KEY=420 0 70000 0 0 0 0 0 0 0 0&lt;br /&gt;B: REL=3&lt;br /&gt;B: ABS=1000003&lt;br /&gt;&lt;br /&gt;3. Configure the /etc/X11/xorg.conf:&lt;br /&gt;&lt;br /&gt;3.1 Load the synaptics driver in Section "modules":&lt;br /&gt;       Load    "synaptics"&lt;br /&gt;&lt;br /&gt;3.2 Configure the ALPS touchpad. Important is the Device (same reported before in Step 2) and the Protocol :&lt;br /&gt;&lt;br /&gt;Section "InputDevice"&lt;br /&gt; Identifier "ALPS"&lt;br /&gt; Driver "synaptics"&lt;br /&gt; Option "AlwaysCore"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  Option "Device" "/dev/input/event2"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  Option "Protocol" "event"&lt;/span&gt;&lt;br /&gt;  Option "LeftEdge" "120"&lt;br /&gt; Option "RightEdge" "830"&lt;br /&gt; Option "TopEdge" "120"&lt;br /&gt; Option "BottomEdge" "650"&lt;br /&gt; Option "FingerLow" "14"&lt;br /&gt; Option "FingerHigh" "15"&lt;br /&gt; Option "MaxTapTime" "180"&lt;br /&gt; Option "MaxTapMove" "110"&lt;br /&gt; Option "ClickTime" "0"&lt;br /&gt; Option "EmulateMidButtonTime" "75"&lt;br /&gt; Option "VertScrollDelta" "10"&lt;br /&gt; Option "HorizScrollDelta" "0"&lt;br /&gt; Option "MinSpeed" "0.45"&lt;br /&gt; Option "MaxSpeed" "0.75"&lt;br /&gt; Option "AccelFactor" "0.020"&lt;br /&gt; Option "EdgeMotionMinSpeed" "200"&lt;br /&gt; Option "EdgeMotionMaxSpeed" "200"&lt;br /&gt; Option "UpDownScrolling" "1"&lt;br /&gt; Option "CircularScrolling" "0"&lt;br /&gt; Option "CircScrollDelta" "0.1"&lt;br /&gt; Option "CircScrollTrigger" "2"&lt;br /&gt; Option "SHMConfig" "true"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;3.3 Add the ALPS touchpad to the ServerLayout section:&lt;br /&gt;&lt;br /&gt;Section "ServerLayout"&lt;br /&gt;       Identifier      "Default Layout"&lt;br /&gt;       Screen          "Default Screen"&lt;br /&gt;       InputDevice     "Generic Keyboard"&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        InputDevice     "ALPS"&lt;/span&gt;&lt;br /&gt;        InputDevice     "Configured Mouse"&lt;br /&gt;EndSection&lt;br /&gt;&lt;br /&gt;Those steps helped to get the ALPS touchpad working without having to compile a new version of the driver.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-113006730098425767?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/113006730098425767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=113006730098425767' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/113006730098425767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/113006730098425767'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/10/alps-touchpad-on-ubuntu-breezy-for.html' title='ALPS touchpad on Ubuntu breezy for Dell 510m'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110724151481077694</id><published>2005-02-01T07:57:00.000+01:00</published><updated>2005-02-01T08:12:57.600+01:00</updated><title type='text'>How to access the Spring Business Layer from Struts Web Layer</title><content type='html'>As usual with software there is not one right way to do things (Especially with open source software).&lt;br /&gt;One question is still "How to access the Spring Business Layer from the Struts Web Layer".&lt;br /&gt;&lt;br /&gt;I currently can see the following options:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Option 1: Hand code lookups by name&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ServletContext context = request.getSession().getServletContext();&lt;br /&gt;BeanFactory factory = WebApplicationContextUtils.&lt;br /&gt;      getRequiredWebApplicationContext(context);&lt;br /&gt;AccountService accountService = (&lt;br /&gt;&lt;br /&gt;      AccountService) factory.getBean("accountService");&lt;br /&gt;//...&lt;br /&gt;//use the accountService&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- This allows only access to the root WebApplicationContext loaded by the ContextLoaderListener&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Option 2: Extend Spring's ActionSupport classes instead of Struts Action classes&lt;/span&gt;&lt;br /&gt;Spring offers 4 extensions for Struts Action classes just to make the above mentioned access more convenient:&lt;br /&gt;- Spring ActionSupport extends Struts Action&lt;br /&gt;- Spring DispatchActionSupport extends Struts DispatchAction&lt;br /&gt;- Spring LookupDispatchActionSupport extends Struts LookupDispatchAction&lt;br /&gt;- Spring MappingDispatchActionSupport extends Struts MappingDispatchAction&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;BeanFactory factory = getWebApplicationContext();&lt;br /&gt;AccountService accountService = &lt;br /&gt;    (AccountService) factory.getBean("accountService");&lt;br /&gt;//...&lt;br /&gt;//use the accountService&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;+ Allows to define individual WebApplicationContext per ActionServlet (do we need that?) and falls back to the root WebApplicationContext&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Option 3: Use Spring managed Actions by using DelegetingActionProxy&lt;/span&gt;&lt;br /&gt;Spring offers the DelegatingActionProxy&lt;br /&gt;This allows to delegate the Action creation to Spring and allows to wire up the Actions with the business components directly by using Spring configuration&lt;br /&gt;&lt;br /&gt;In Struts.xml:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;action path="/doit" &lt;br /&gt;           type="org.springframework.web.struts.DelegatingActionProxy"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In the Spring context:&lt;br /&gt;&lt;blockquote&gt;   &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean name="/doit" class="my.action"&amp;gt;&lt;br /&gt;  &amp;lt;property name="..."&gt;...&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- Some generation tools do want to generate "Origanl Actions" not the Proxy Action.&lt;br /&gt;+ Any request processor can be used with this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Option 4: Use Spring managed Actions by using DelegetingRequestProcessor&lt;/span&gt;&lt;br /&gt;Similar to Option 3 but not using delegating Actions but using a Request processor.&lt;br /&gt;&lt;br /&gt;In Struts.xml:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;action path="/doit" type="my.Action"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In the Spring context:&lt;br /&gt;&lt;blockquote&gt;   &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;bean name="/doit" class="my.Action"&amp;gt;&lt;br /&gt;   &amp;lt;property name="..."&amp;gt;...&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;- only one RequestProcessor is allowed -&gt; there is "out-of-the-box" DelegatingRequestProcessor and a TilesDelegatingRequestProcessor in Spring&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110724151481077694?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110724151481077694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110724151481077694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110724151481077694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110724151481077694'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/02/how-to-access-spring-business-layer.html' title='How to access the Spring Business Layer from Struts Web Layer'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110647322579112251</id><published>2005-01-23T10:07:00.000+01:00</published><updated>2005-02-05T11:50:59.686+01:00</updated><title type='text'>Hibernate enums deprecated</title><content type='html'>One charachteristic of enumerations is that they are static. They possible enumerated values cannot be changed at run time. If the allowed values should be changeable it's problably not an enumeration but more a separate entity.&lt;br /&gt;Enumerations are that static that their values are known when coding against them.&lt;br /&gt;&lt;br /&gt;Hibernate does provide a method to &lt;a href="http://www.hibernate.org/hib_docs/reference/en/html/mapping.html#mapping-types-enum"&gt;persist enumerations&lt;/a&gt;. Nevertheless the Java Interface &lt;a href="http://www.hibernate.org/hib_docs/api/net/sf/hibernate/PersistentEnum.html"&gt;PersistentEnum&lt;/a&gt; is depricated&lt;br /&gt;I found some suggestions for how to persist enumerations with hibernate:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.hibernate.org/172.html"&gt;UserType per EnumType&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.hibernate.org/203.html"&gt;Extend PersistenEnum usertype&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://forum.hibernate.org/viewtopic.php?t=933871&amp;highlight=enum"&gt;A Forum Article&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Go for the non type save way and just use public static final int or String values&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;I'll check the first option by trying to map &lt;a href="http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/enum/Enum.html"&gt;jakarta-commons-lang enums&lt;/a&gt; with hibernate. (I'll also have to check how this will behave in  future with Java 5 enums)&lt;br /&gt;Results will be posted here as soon as possible&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110647322579112251?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110647322579112251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110647322579112251' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110647322579112251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110647322579112251'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/hibernate-enums-deprecated.html' title='Hibernate enums deprecated'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110611343641094784</id><published>2005-01-19T06:27:00.000+01:00</published><updated>2005-01-24T07:51:22.326+01:00</updated><title type='text'>Conainer Managed Auth. vs Application Managed Auth. in J2EE web applications</title><content type='html'>Authentication and Authorisation (Auth.) is part of the J2EE standard.&lt;br /&gt;&lt;br /&gt;One design question that arises in each J2ee web application project is the wheter to use Conatiner Managed Auth. (CMA) or to impement own Application Managed Auth. (AMA).&lt;br /&gt;&lt;br /&gt;CMA in pure web applications:&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;standard way for application to query if the user has given role&lt;/li&gt;   &lt;li&gt;standard way to define how the user is authenticated (Basic authengication, Form-based authentication..)&lt;/li&gt; &lt;/ul&gt; on the other hand CMA&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;does not define how an application server stores and retrieves the authentication/authorsisation information (username/password, roles). This is left to the application server provider or to the application developer.&lt;br /&gt;&lt;/li&gt;   &lt;li&gt;does not define how one plug in code into an application server to extend the authentication with more advanced authentication strategies (Captcha etc.)&lt;/li&gt;   &lt;li&gt;does not define how to maintain the Authentication/Authorisation information (e.g. how a user could change his password or how an administrator can add/remove roles)&lt;/li&gt; &lt;/ul&gt;AMA :&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;is portable across application servers&lt;/li&gt;   &lt;li&gt;can be customized to any extend (e.g. authentication based on dynamic information)&lt;br /&gt; &lt;/li&gt; &lt;/ul&gt; on the other Hand AMA:&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;introduces a security risk due to buggy implementation&lt;br /&gt; &lt;/li&gt;   &lt;li&gt;is not standardized&lt;/li&gt; &lt;/ul&gt;&lt;br /&gt;Definitly - if all use cases can be implemented with CMA one shold use it. But how often is that the case in real world web applications?&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.javaworld.com/javaworld/jw-07-2004/jw-0726-security_p.html"&gt;J2EE security: Container versus custom&lt;/a&gt;&lt;br /&gt;  &lt;/li&gt; &lt;/ul&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110611343641094784?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110611343641094784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110611343641094784' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110611343641094784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110611343641094784'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/conainer-managed-auth-vs-application.html' title='Conainer Managed Auth. vs Application Managed Auth. in J2EE web applications'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110590715691063236</id><published>2005-01-16T20:32:00.000+01:00</published><updated>2005-01-16T21:29:22.110+01:00</updated><title type='text'>UML 2.0:  semantical difference between composition and aggregation</title><content type='html'>&lt;span style="font-style: italic;"&gt;Associations&lt;/span&gt; are describing a set of tuples of typed instances.&lt;br /&gt;&lt;br /&gt;In general there is no semantic difference between the instances paricipating in such a tuple. Very often though one of the instances is playing the special role of a whole whereous the others represent the parts of that whole. As an example take the association between companies and departments. Departments are part of a company. Such forms of whole-part associations are &lt;span style="font-style: italic;"&gt;Aggregations &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;Compositions&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;An &lt;span style="font-style: italic;"&gt;Aggregation &lt;/span&gt;is adding semantic information to a general Association by defining which end is the whole and which is the part.&lt;br /&gt;A &lt;span style="font-style: italic;"&gt;Composition &lt;/span&gt;is an even stronger kind of aggregation. The instance that is composing the parts is responsible for the life-cycle of the parts i.e. a part can not live without the whole and a part can at a given time only be owned by one whole. (Nevertheless is it possible that the part can be passed to an other owner)&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Aggregation &lt;/span&gt;and&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;span style="font-style: italic;"&gt;Composition&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;/span&gt;are not represented sub types of a general &lt;span style="font-style: italic;"&gt;Association&lt;/span&gt; in UML 2.0 as one could think at the first glance. Instead an attribute of an associations member properties of the type AggerationKind is controlling this aspect.&lt;br /&gt;&lt;br /&gt;AggregationKind is an Enumeration with the following literals:&lt;br /&gt;&lt;ul&gt;   &lt;li&gt;none&lt;/li&gt;   &lt;li&gt;shared&lt;/li&gt;   &lt;li&gt;composite&lt;/li&gt; &lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110590715691063236?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110590715691063236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110590715691063236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110590715691063236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110590715691063236'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/uml-20-semantical-difference-between.html' title='UML 2.0:  semantical difference between composition and aggregation'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110582884456487421</id><published>2005-01-15T23:39:00.000+01:00</published><updated>2005-01-16T00:16:24.936+01:00</updated><title type='text'>UML 2.0: who owns properties</title><content type='html'>In UML 2.0 properties can be owned by ether a class or an association.&lt;br /&gt;&lt;br /&gt;In case the property is owned by a class it is called attribute i.e. attribute is a role a property can take. There are two notations for attributes:&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;as attribute inside a class&lt;/li&gt;   &lt;li&gt;as assiociation end (at the navigable end). The role name is the name of the attribute&lt;/li&gt; &lt;/ol&gt; Both notations are equivalent.&lt;br /&gt;&lt;br /&gt;In case an association has an association end that is not navigable the property is not owned by the class at the association end but the association itself.&lt;br /&gt;&lt;br /&gt;The navigability of an association end therefore detirmins the ownership of the property:&lt;br /&gt; &lt;table border="1"&gt;&lt;br /&gt;   &lt;tr&gt;&lt;br /&gt;     &lt;td&gt;navigable&lt;/td&gt;&lt;br /&gt;     &lt;td&gt;property is owned by the class at opposite end (attribute)&lt;/td&gt;&lt;br /&gt;   &lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;   &lt;tr&gt;&lt;br /&gt;     &lt;td&gt;not navigable&lt;/td&gt;&lt;br /&gt;     &lt;td&gt;property is owned by assiciation&lt;/td&gt;&lt;br /&gt;   &lt;/tr&gt;&lt;br /&gt; &lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110582884456487421?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110582884456487421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110582884456487421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110582884456487421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110582884456487421'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/uml-20-who-owns-properties.html' title='UML 2.0: who owns properties'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110581238497204034</id><published>2005-01-15T18:42:00.000+01:00</published><updated>2005-01-15T21:45:08.646+01:00</updated><title type='text'>Firefox ldif file processor for importing int windows address book</title><content type='html'>Firefox correctly encodes special characters like German "Umlaut" characters according to the &lt;a href="http://www.ietf.org/rfc/rfc2849.txt"&gt;LDIF RFC 2849&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In order to successfully import such ldif file into the windows address book the character encoding has to be changed from UTF-8 to iso-8859-1 (found by experiment):&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;   &lt;li&gt;filter for lines with properties separated by double colon (instead of single colon)&lt;/li&gt;   &lt;li&gt;decode the value using Base64 decoder&lt;/li&gt;   &lt;li&gt;convert the byte stream into a character stream using a UTF-8 decoder&lt;/li&gt;   &lt;li&gt;convert the character stream into a byte stream using a  ISO-8859-1 encoder&lt;/li&gt;   &lt;li&gt;encode the  byte stream with a Base64 encoder&lt;/li&gt; &lt;/ol&gt;&lt;br /&gt;After this conversion the file can be succesfully imported into the windows address book.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110581238497204034?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110581238497204034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110581238497204034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110581238497204034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110581238497204034'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/firefox-ldif-file-processor-for.html' title='Firefox ldif file processor for importing int windows address book'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110548187911244753</id><published>2005-01-11T23:12:00.000+01:00</published><updated>2005-01-15T22:03:57.120+01:00</updated><title type='text'>Can Hibernate map one class to more than one table?</title><content type='html'>One restriction with Hibernate seems to be that one java class can be  mapped to maximum one table.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;Imagine a catalog of product objects which are cloned before they are assigned to an order.&lt;br /&gt;This scenario can not be implemented with hibernate provided the ordered products should be persited into a separate table i.e. not the product-catalog table.&lt;br /&gt;&lt;br /&gt;One solution for this might be to copy the catalog product objects into objects of an other class (maybe called LineItem). Objects of this class can then be mapped into an other table.&lt;br /&gt;&lt;br /&gt;An other question is how to implement the different characteristics of different product-types:&lt;br /&gt;&lt;br /&gt;Option 1: Each product-type is modelled as a sub-class (extension) of a base Product. Properties specific to a product-type are added to the sub class. Hibernate is supporting this model by allowing to map all sub-classes to one database table.&lt;br /&gt;One specific sub-class of the product and therefore also a product-type is modelled as container for other products. This (bundle-) product can contain any type of other product object as child products.&lt;br /&gt;&lt;br /&gt;Option 2: We have only one generic product class and the product-type is modelled as an enumerated value. Properties specific to a product-type are modelled as generic containers (e.g. one string value and one numeric value) which are to be interpreted diffently depending on the product-type. This generic product can also contain other product objects as child products (i.e. each type of a product can be a bundle product).&lt;br /&gt;&lt;br /&gt;Conclusions:&lt;br /&gt;Option 1 can be considered as "cleaner" object oriented design but probably also the more complicated solution. Especially when considering the above mentioned restriction of Hibernate (a class can not be mapped to more than one table). This would result in a duplicating the complete class hierarchy. Option 2 is a more generic but less strongly typed. As long as we can live with it's restrictions I consider this solution the one with lower implementation effert.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110548187911244753?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110548187911244753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110548187911244753' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110548187911244753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110548187911244753'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/can-hibernate-map-one-class-to-more.html' title='Can Hibernate map one class to more than one table?'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110539144504286994</id><published>2005-01-10T22:10:00.000+01:00</published><updated>2005-01-16T00:24:14.790+01:00</updated><title type='text'>Howto extend xml schema types</title><content type='html'>Learned today how to extend XML schema types&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;xs:complextype name="Payment"&amp;gt;&lt;br /&gt; &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;    &amp;lt;xs:element name="paymentType" type="PaymentType"&amp;gt;&lt;br /&gt; &amp;lt;/xs:element&amp;gt;&lt;br /&gt;&amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xs:complextype name="CardPayment"&amp;gt;&lt;br /&gt; &amp;lt;xs:complexcontent&amp;gt;&lt;br /&gt;    &amp;lt;xs:extension base="Payment"&amp;gt;&lt;br /&gt;    &amp;lt;/xs:extension&amp;gt;&lt;br /&gt; &amp;lt;/xs:complexcontent&amp;gt;&lt;br /&gt;&amp;lt;/xs:complextype&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110539144504286994?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110539144504286994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110539144504286994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110539144504286994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110539144504286994'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/howto-extend-xml-schema-types.html' title='Howto extend xml schema types'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110531043649792112</id><published>2005-01-09T23:35:00.000+01:00</published><updated>2005-01-09T23:46:12.636+01:00</updated><title type='text'>Moments in the year 2004</title><content type='html'>&lt;span style="font-family:arial;"&gt;I was working for quite a while on a page &lt;a href="http://www.augenblicke-2004.ch.vu/"&gt;Moments in the year 2004&lt;/a&gt;&lt;br /&gt;Technically I tried to use css to the extend I know it at the moment.&lt;br /&gt;I could not get around Javascript due to the 2 following reasons:&lt;br /&gt;&lt;/span&gt; &lt;ol&gt;   &lt;li&gt;Opening a new browser window without menu and toolbar&lt;/li&gt;   &lt;li&gt;hover effect when moving the mouse over the images&lt;/li&gt; &lt;/ol&gt; Optically I like it...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110531043649792112?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110531043649792112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110531043649792112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110531043649792112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110531043649792112'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/moments-in-year-2004.html' title='Moments in the year 2004'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10046048.post-110529944977149637</id><published>2005-01-09T20:29:00.000+01:00</published><updated>2005-01-09T20:37:57.436+01:00</updated><title type='text'>Windows Address Book import from ldif file</title><content type='html'>&lt;span style="font-family:arial;"&gt;Still no solution found for importing the ldif file exported by Thunderbird into the Windows Address Book. Special characters (non-ASCII) are not imported correctly.&lt;br /&gt;Searched a lot on the web today - without success.&lt;br /&gt;Attributes starting with :: seem to be correctly encoded as UTF-8 byte stream and then base64-encoded. The Windows Adress Book can not read those entries correctly. Very annoying...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10046048-110529944977149637?l=dev-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dev-blog.blogspot.com/feeds/110529944977149637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10046048&amp;postID=110529944977149637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110529944977149637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10046048/posts/default/110529944977149637'/><link rel='alternate' type='text/html' href='http://dev-blog.blogspot.com/2005/01/windows-address-book-import-from-ldif.html' title='Windows Address Book import from ldif file'/><author><name>Christof</name><uri>http://www.blogger.com/profile/15618743793884383701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
