文章列表
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import org.apache.commo ...
public class ImageOperation {
/**
* 将数据写入文件
*
* @param data
* byte[]
* @throws IOException
*/
public static void writeFile(byte[] data, String filename)
throws IOException {
File file = new File(filename);
file.getParentFile().mkdirs();
BufferedOutpu ...
1. JBOSS中数据源的配置(mysql-xa-ds.xml支持分布式的事务),如下:
<datasources>
<xa-datasource>
<jndi-name>test1</jndi-name>
<track-connection-by-tx>true</track-connection-by-tx>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</ ...