Development

ActiveMQ Configuration under JBoss AS7

Update 11.7.2013: New version for JBoss 7.2.0.Alpha1 / EAP 6.1.0.Alpha1 can be found here: https://blog.coffeebeans.at/?p=606 ———————– JBoss 7 and ActiveMQ finally work together. Download the latest snapshot of activemq.rar. Unzip the file and name the resulting folder activemq.rar. Place the folder in you deployments folder of jboss. Place the files ra.xml and ironjacamar.xml into the […]

ActiveMQ Configuration under JBoss AS7 Read More »

Simple Bash Backup Script

I just started a backup script to maintain a simple configurable, daily backup script for linux that holds 1 month history of backuped data and has host dependant configuration to update the script in a central repository. I published it under github: https://github.com/mbogner/backup_script Features: logging of all output configuration file in /etc/backup.conf to override default

Simple Bash Backup Script Read More »

Magento – Column ‘option_id’ in where clause is ambiguous.

This problem should be fixable by changing app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Option/Collection.php line 117. Just insert “main_table.” (without “) before option_id. The line shoul look like the following after that: return $this->addFieldToFilter(‘main_table.option_id’, array(‘in’ => $optionId));

Magento – Column ‘option_id’ in where clause is ambiguous. Read More »

JBoss AS 7.1.0 Mail

Since version 7.1.0 JBoss AS includes a mail subsystem by default and it seems to work with a local postfix installation out of the box. Here is a simple mailer bean: import javax.annotation.security.RolesAllowed; import javax.enterprise.inject.Model; import javax.inject.Inject; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import org.jboss.logging.Logger; /** * * @author

JBoss AS 7.1.0 Mail Read More »

JEE6 Schedulers

Creating a scheduler in JEE6 is very simple. Just use @Schedule annotation. Here is an example of a simple bean logging all 30 seconds. import javax.ejb.Schedule; import javax.ejb.Stateless; import javax.inject.Inject; import org.jboss.logging.Logger; /** * @author manuel * */ @Stateless public class ApplicationScheduler { @Inject private Logger log; /** * Do something when fired. @Schedule can

JEE6 Schedulers Read More »

JBoss AS 7.1 Eclipse Startup Warning

Since 7.1 the following warning appears during server startup: WARNING: -logmodule is deprecated. Please use the system property ‘java.util.logging.manager’ or the ‘java.util.logging.LogManager’ service loader. This can be fixed be removing the following part from the launch configuration in the “Program arguments” section: -logmodule org.jboss.logmanager

JBoss AS 7.1 Eclipse Startup Warning Read More »

include wsimport into maven build process

to include the source-code-generation wsimport does for you into your maven build you can use the cxf-codegen-plugin as follows: <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>2.5.2</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot>src/main/java</sourceRoot> <wsdlOptions> <wsdlOption> <wsdl>http://localhost:8080/SoapService?wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> </extraargs> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> This adds the generated resources to your maven source folder. Eclipse

include wsimport into maven build process Read More »

JAX-WS + Apache CXF + Maven

to use apache CXF to consume webservices in a maven project you have to inlcude the following dependencies – of course you can change the logging part if you don’t use log4j like me. <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.5.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>2.5.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.4</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId>

JAX-WS + Apache CXF + Maven Read More »