AKAI TSUKI

System development or Technical something

Java

install openjdk14 on win10

procedure download "openjdk-14_windows-x64_bin.zip" from https://jdk.java.net/14/ extract the zip file set a "PATH" variable PATH="C:\path\to\jdk-14\bin" execute "java -version" command to check > java -version openjdk version "14" 2020-03…

When we study java and spring boot and docker.

When we study java and spring boot and docker, please check. https://blog.docker.com/2018/03/video-series-modernizing-java-apps-developers-part-1/ https://blog.docker.com/2018/03/video-series-modernizing-java-apps-developers-part-2/ https:…

hello world by springboot

I uploaded hello world sorce code to github. github.com After I executed app, I use curl command as follows: # curl http://192.168.0.6:8080/hello {"message":"Hello world"}

start Java and Eclipse

新しく環境を用意してみた。 1. download java jdk-8u112-windows-x64.exe http://www.oracle.com/technetwork/jp/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 2. download ecl…

Java install on CentOS 7

インストールして、JAVA_HOMEを設定 # yum search java-1.8 # yum install -y java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-debug.x86_64 java-1.8.0-openjdk-devel.x86_64 # vi /etc/profile.d/java.sh # cat /etc/profile.d/java.sh export JAVA_HOME=/u…

Create and Deploy war file

作成したHello Worldのアプリケーション (Hello World (web app) by Java, Maven, SpringBoot and Eclipse - あかいつき) ですが、今度はTomcatにデプロイしてみます。80.1 Create a deployable war file(Spring Boot Reference Guide) を参考に。 Creat…

Hello World (web app) by Java, Maven, SpringBoot and Eclipse

今回はJava、Maven、SpringBoot、Eclipseを使ってHello Worldを試したいと思います。 バージョン Java version "1.8.0_92" Apache Maven 3.3.9 Spring Boot 1.3.3 Mars.2 Release (4.5.2) です。 ブランクプロジェクト SPRING INITIALIZRを利用してベースと…

Tomcat サービス。こんなかんじ?

[root@localhost bin]# cd /usr/local/tomcat/bin/ [root@localhost bin]# ls bootstrap.jar commons-daemon.jar daemon.sh shutdown.bat tomcat-native.tar.gz catalina.bat commons-daemon-native.tar.gz digest.bat shutdown.sh tool-wrapper.bat catalin…

Findbugsのレポートが出ない!

mavenを利用して、Findbugsのレポートページ作成を実施! mvn siteしかーし!CheckStyleのレポートは出るのに。。。Findbugsのレポートがでない。。。 orz 聞いてみたところによると Findbugsのレポートは先にコンパイルしておく必要があるとのこと。 mvn co…

Sonar

あらためてみたが、 「コード探知機「Sonar」でプロジェクトの深海を探れ!」 http://www.atmarkit.co.jp/fjava/rensai4/devtool17/devtool17_1.html よさげですね。 画面がぱっとみいいかんじ。 http://nemo.sonarsource.org/ ここからお試しでみれます。こ…

ビルド〜できた。

っていうかですよ。 READMEにmavenでビルドせよと書いてあった。。。orz 読まずにantたたきました。。。 mvn packageで、、、BUILD SUCCESS出ましたよ。 うむ。

mavenをインストール

いつのまにか3.0.3が出てた。 とりあえずダウンロードして展開。 MAVEN_HOME=C:\Java\apache-maven-3.0.3を設定 C:\Java\apache-maven-3.0.3\binにパスを設定 Eclipseにm2eclipseを入れてみる。 http://koimo.dip.jp/ieserver/index.php?windows%e3%81%a7mav…

ビルド〜

https://github.com/msgpack/msgpack/downloads 上記の場所から java-0.5.2.zip ― java: version 0.5.2-devel ファイルを取得してみた。さらに、antでビルドを試みる!しかーし、BUILD FAILED T_T

良いコードを書く技術

amazon:良いコードを書く技術を読んでみた。 コードを書くときに必須なことが満載ですね。ただ、この一冊で内容を深めるのは難しそうなので 参考文献を見てみることも必要そうですな。

ネットワークの切断

ネットワークが切断した、つまりLANが切れたりした場合に どういった動作を取るのか!?TCP/IPレベルでは?Javaではどうやった扱うの?うむ〜〜。

メール送受信

JavaMailを使ってメール送受信! ここが参考になる。http://homepage2.nifty.com/igat/igapyon/diary/2007/ig070904.html http://homepage2.nifty.com/igat/igapyon/diary/2007/ig070905.html

別スレッドからのアクセスはできない。。。

トランザクション試してみました。 別のスレッドから横槍いれられるのか!?で、結局だめみたいです。 トランザクションの状態が別スレッドからだとアクセスできない。ってかトランザクションがThreadLocalで管理されてる。。。 System start Status.STATUS_…

S2Dao トランザクション:auto commit

S2Daoを使った場合のトランザクションについて S2Daoではauto commitの状態がデフォルトみたい。updateを実行した直後に UserTransactiong#getStatus();から得られる値は Status.STATUS_NO_TRANSACTIONでした。これって、 トランザクションが終わっちゃった…

S2Daoとトランザクションを学ぶ

参考にさせていただきました。 http://d.hatena.ne.jp/aki193/20090220/1235094187

ESBを利用するなら

Apache Synapse と Muleどちらがよいのかしら?

トランザクションを管理する

下ような感じでUserTransactionクラスを利用することで トランザクションの管理できそう。 private UserTransaction ut_ = null; public void initialize() { // コンテナの初期化 this.container_ = S2ContainerFactory.create(this.path_); this.container…

updateModifiedOnlyを使う

更新した箇所のみUpdateしてほしい場合。 daoのupdateModifiedOnlyを利用すればよさそう。 通常update System start DEBUG 2011-02-15 06:25:56,550 [main] S2Containerを作成します。path=jp/person/akai/tsuki/samplechecker/dicon/alldao.dicon DEBUG 201…

今度はUpdate

こんな感じでUpdateしてみる。 public void doUpdate() { SampleInfo entity = new SampleInfo(); entity.setCheckNumber("12345679"); entity.setResendTime(400L); entity.setResendCounter(10); this.dao_.update(entity); } System start DEBUG 2011-02-…

S2DaoとPostgresqlで困った。

S2Dao-CodeGenでPostgresqlのテーブルから生成した コードを使ってテーブルにinsertしてみた。but ERROR: リレーション"sample_info"は存在しませんというエラーメッセージが出力されて、 テーブルにinsertできないじゃないかーーー!原因は・・・Postgresql…

S2Dao Code-genで生成した

package jp.person.akai.tsuki.samplechecker.entity; import jp.person.akai.tsuki.samplechecker.entity.AbstractSampleInfo; /** * SAMPLE_INFOテーブルのEntityです。 * @author S2Dao-CodeGen */ public class SampleInfo extends AbstractSampleInfo {…

S2Dao-CodeGenを試す

dicon/CodeGen.diconを修正 <components> <include path="j2ee.dicon"/> <include path="internal.dicon"/> </include></include></components>

SAStruts/S2Daoで作成!

JavaとEclilpseを用意したらプラグインをインストール seasar3.3 - http://eclipse.seasar.org/updates/3.3/Cannot complete the install because one or more required items could not be found. Software currently installed: SAStrutsPlugin 0.0.14 (or…

SAStrutsのフォルダ構成

SAStrutsのtutorialみるとlibのディレクトリは以下の場所になってる。 sa-struts-tutorial\src\main\webapp\WEB-INF\libただし、 sa-struts-tutorial\lib というディレクトリもある。実際のアプリケーションはwebappsの下になるから? アプリケーションに必…

SAStrutsのプラグイン

使ってみた。 なるほど。Actionから遷移するのに、 jspファイル名が記述された行を選択して、遷移するっていうのが ちょっとトリッキーな感があったが、 まぁ、でも、そうしないとどこにいくか分かんないか。jspからはActionに遷移してくれるし、 これは便利…

S2JunitでDBデータをExcel出力

S2JunitでDBデータをExcel出力 String tablename = "hoge"; //DBからのExcelファイル出力 SqlReader sqlReader = new SqlReader(getDataSource()); sqlReader.addTable(tablename); DataSet dataSet = sqlReader.read(); XlsWriter xlsWriter = new XlsWrite…