пятница, 3 февраля 2012 г.

Hibernate search migration to new version.

    Have you got "SearchException: Unable to perform work. Entity Class is not @Indexed nor hosts @ContainedIn: class java.lang.String" ? I guess  yes, so try to use FieldBridge to sovle you problems with embeded indexes.

    I am migrate from 3.1.0.GA to 3.4.1.Final and collect a lot of errors. I am pretty sure, that hibernate search team dont event think about backward compatibility. Hibernate search unit test cover only simple cases , documentation is also weak.


среда, 21 декабря 2011 г.

Pay Pal

Why deside to add express to  pay pal express checkout ?
The slowest payment gateway from integration point of view. The pay pal nvp much more simply for integration.

воскресенье, 25 сентября 2011 г.

Methodology vs brain

Follow TDD, BDD, MDA, DDD, DDD again, RDD, some other driven development and simple "Hello world" become "Hell to world". So try to use your brain first.

пятница, 2 сентября 2011 г.

Write custom FaceletFactory. Returns to implementation

    The previous post was incomplete, becaue lack of time. So lets finish. Implementation of DefaultFaceletFactory in mojara jsf2 as well as the whole jsf2 not implies, that DefaultFaceletFactory may be subclassed. The set of changes from 1.x complicate sucj kind of customization - getters for compiler and cache field were removed.

    To achive desirable result and substitute the DefaultFaceletFactory with devived class need to make a small dirty hack. First of all create or use any existing reflection util to access the private field in parent class. Second subclass DefaultFaceletFactory with following constructor

public class MultiStoreFaceletFactory extends DefaultFaceletFactory {

    /**
     * Construct subclass of {@link DefaultFaceletFactory}
     * @param root  parent to decorate
     * @throws IOException  in case of error
     */
    public MultiStoreFaceletFactory(final FaceletFactory root) throws IOException {
        super(
                (Compiler) ReflUtil.getFieldValue(DefaultFaceletFactory.class, root, "compiler"),  
                ((DefaultFaceletFactory) root).getResourceResolver(),
                -1,
                (FaceletCache) ReflUtil.getFieldValue(DefaultFaceletFactory.class, root, "cache") );
        // Your code is here
    }

    // Your code is here

}

пятница, 24 июня 2011 г.

The simplicity in code much more better than complex stupidity covered by enterprise patterns.

The simplicity in code much more better than complex stupidity covered by enterprise patterns.

понедельник, 20 июня 2011 г.

Write custom FaceletFactory

It can be done via following steps:

  1.  Create class, that dirived from DefaultFaceletFactory
  2.  Overwrite logic
  3.  Configure jsf to use created class.
    <context-param>
            <param-name>com.sun.faces.faceletFactory</param-name>
            <param-value>org.yes.cart.web.application.view.MultiStoreFaceletFactory</param-value>
    </context-param>
    




воскресенье, 15 мая 2011 г.

Patch for svnwcrev

Hi there !
For people who use svnwcrev this patch http://dl.dropbox.com/u/26657232/svnwcrev-2011-05-15.diff bring necessary functionality from SubWCRev. I had a few hours to porting C code from one project to another. Nice to try again KDevelop and C. Was impressed by C APR. I hope that patch will be accepted by Oliver (maintainer of svnvcrev)
Cheers