Is there a way to specify Doctrine2 Entitymanager implementation class in Symfony2?

After Doctrine 2.4 (Doctrine 2.4 release) you need to use decorator for this. Do not extend EntityManager directly. First you need to implement you own entity manager decorator that extends Doctrine\ORM\Decorator\EntityManagerDecorator (like @Dana) But you can’t just change doctrine.orm.entity_manager.class to your new decorator because EntityManagerDecorator requires EntityManagerInterface in it’s constructor: public function __construct(EntityManagerInterface $wrapped) You … Read more

notepad++ user defined regions with folding

For version 6.5.5 and above: Under the menu “Language” there is a menuitem called “Define your language…“ In the tab “Folder & Default” is a group called “Folding in code” where you can enter an “Open”- and a “Close”-Keyword. For versions older than 6.5.5: Under the menu “View” there is a menuitem called “User-Defined Dialog…“ … Read more

Externalizing Grails Datasource configuration

You can use a properties file specified in the grails.config.locations as a way to externalize the datasource configuration. Below is how I typically set up a Grails project: In my DataSource.groovy I specify this for the production environment: …. …. production { dataSource { dbCreate = “update” driverClassName = “com.myorg.jdbcDriverNotExists” url = “” username = … Read more

Disable Maven central repository

Agreed. No direct downloads from external repositories should be allowed in your release builds. The specific answer to your question is the second part of my answer 🙂 Setup a repository manager I’d recommend setting up a local Maven repository manager. Good options are the following: Nexus Artifactory Archiva Reposilite All of these are capable … Read more

How to change Vagrant ‘default’ machine name?

I found the multiple options confusing, so I decided to test all of them to see exactly what they do. I’m using VirtualBox 4.2.16-r86992 and Vagrant 1.3.3. I created a directory called nametest and ran vagrant init precise64 http://files.vagrantup.com/precise64.box to generate a default Vagrantfile. Then I opened the VirtualBox GUI so I could see what … Read more

How to share common properties among several maven projects?

What you can do is to use the Properties Maven plugin. This will let you define your properties in an external file, and the plugin will read this file. With this configuration : <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> <version>1.0-alpha-1</version> <executions> <execution> <phase>initialize</phase> <goals> <goal>read-project-properties</goal> </goals> <configuration> <files> <file>my-file.properties</file> </files> </configuration> </execution> </executions> </plugin> </plugins> </build> … Read more

How do I prevent a Gateway Timeout with FastCGI on Nginx

Proxy timeouts are well, for proxies, not for FastCGI… The directives that affect FastCGI timeouts are client_header_timeout, client_body_timeout and send_timeout. Edit: Considering what’s found on nginx wiki, the send_timeout directive is responsible for setting general timeout of response (which was bit misleading). For FastCGI there’s fastcgi_read_timeout which is affecting the FastCGI process response timeout.

tech