In a Spring MVC project I have inserted the GenericObjectPool of Apache commons. This library has done what it should for several months, until the visitor counts reached a big number. Since this time, the Jetty server breaks down with heapspace exhausted.
Kategorie: Java
Apache commons GenericObjectPool
In einem Spring MVC Projekt habe ich den GenericObjectPool von Apache commons eingebaut. Dieser hat einige Monate scheinbar getan, was er sollte, bis das Projekt Zugriffszahlen erreicht hat, die ein gewisses Limit überschritten haben. Seit dem ist der Server, ein Jetty, regelmäßig mit Heapspace exhausted abgeschmiert.
Textdateien mit Spring Batch erzeugen
Wir wollen eine Datei über Spring batch erzeugen. Hierfür benötigen wir einen Marshaller mir „Reader“ und „Writer“.
Der Reader:
<bean id="fileReader">
<property name="dataSource" ref="dataSource" />
<property name="sql" value="SELECT * FROM table" />
<property name="rowMapper">
<bean class="de.package.rowmapper.FileRowMapper" />
</property>
</bean>
Read More
Create text files with spring batch
To create a file over spring batch, first you need a marshaller with a Reader and a Writer.
The Reader:
<bean id="fileReader">
<property name="dataSource" ref="dataSource" />
<property name="sql" value="SELECT * FROM table" />
<property name="rowMapper">
<bean class="de.package.rowmapper.FileRowMapper" />
</property>
</bean>
Read More
Daten sicher versenden mit SFTP und Spring Batch
Datenversand mit spring batch in auf viele Weisen möglich. Der bekannteste Weg ist der Versand von XML-Dateien aber das Springframework bietet auch eine Menge anderer Möglichkeiten an. Einer Dieser Wege ist der sichere Datenversand über SFTP. Für diesen Fall müssen wir das Spring integration Framework verwenden.Read More
Secure data sending with sftp and spring batch
It is possible to send data with spring batch in several ways. The most used case is sending XML files, but the spring framework offers you a lot of other ways too. One of these ways is to send your data files secure by using SFTP. For this use case you can use the spring integration framework.Read More
Send Email by Spring batch with variable attachments
It is very simple to send an Email with attachments by Spring batch framework.
Firstly you need 3 beans for handling the email:
– The first bean initializes JavaMail and sets all needed properties
<property name="host" value="smtp.yourEmailDomain.de"/>
<property name="port" value="25"/>
<property name="username" value="yourUserName"/>
<property name="password" value="yourPassword"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
</props>
</property>
</bean>