Cassie and Ellie.

[After she had fired a message back to Ellie to let her know she would be up soon, she tossed the mostly untouched bagel in front of her into the nearest trash bin and threw her empty soda can into the recycling bin. She had no appetite, and had only snuck down to get food because she knew she needed to, it was almost breakfast time and she needed to put something into her system so she didn’t faint. It had failed two bites in, though, and she had simply at there until she was summoned. As quickly as she could, she made her way through the hospital and up to Ellie’s floor, only pausing to allow a nurse and a patient by, before walking right into her daughter’s room.] Hey, Princess.

About EJB JUnit test on NetBeans 6.9.1

NetBeans上でMaven WebプロジェクトのEJBのJUnitのテストを実施する場合。

例えば次のようなEJBクラスを作ります。

@Singleton
public class NewSessionBean {
    public String sayHello() {
        return "Hello!";
    }
}

NetBeansを使っている場合、このクラスを選択して右クリック、[ツール]->[JUnitテストを作成]とすれば、下記のようなテストクラスが自動で作成されます。(テストがOKになるように自動生成されたソースを多少変更)

public class NewSessionBeanTest {
    @Test
    public void testSayHello() throws Exception {
        System.out.println("sayHello");
        String name = "java:global/classes/NewSessionBean";
        EJBContainer container = EJBContainer.createEJBContainer();
        NewSessionBean instance =
            (NewSessionBean) container.getContext().lookup(name);
        String expResult = "Hello!";
        String result = instance.sayHello();
        assertEquals(expResult, result);
    }
}

この状態のままテストを実行すると、次のようなエラーが発生します。

Absent Code attribute in method that is not native or abstract in class file javax/ejb/embeddable/EJBContainer

これが発生するのはEJBContainerの実体クラスがパス上に存在しないため。そこでpom.xmlに下記dependencyを追加するわけです。

<dependency>
    <groupId>org.glassfish.extras</groupId>
    <artifactId>glassfish-embedded-all</artifactId>
    <version>3.0</version>
    <scope>test</scope>
</dependency>

ただ、ここで注意しなければならないのはversion。2011/02/17時点の最新のversionは3.0.1なんですが、これを指定してもエラーは解消されません。ここで指定すべきversionは3.0みたい。あともう一つ注意しなければならないのは、glassfish-embedded-allは最初からあるjavaee-web-apiよりも前で宣言しないといけないようです。順番を間違えるとこれまたエラーは解消されません。私はこれでほぼ丸一日なやんでしまいました :’(

ここまでできれば後はテストを実行するだけ。たぶんうまくいくと思います。

He make's me happy.

He genuinely make’s me happy. All it takes is for me to look at his face and i just smile because out of all the men in the world i got one that is not far from perfect as my boyfriend. The farther this journey goes the more i just fall in love with him. 3 year’s & we live like were married. I sit around and just think about us and i can honestly say i am happy with my relationship. I love him so much.

So I was having this conversation..

“Mom”: It feels like I’m never good enough no matter how hard I try, I always feel like no matter what I do.. it never cuts it.

So. What makes me happy about talking to my “Mom” is how easily we can drift from joking and fucking around with each other to such a topic that is just.. it requires full on intellectual attention. Especially when it’s coming from someone like him.

And it just poses that very concept that we’re never good enough. But honestly.. sometimes people just try too hard to do something. Sometimes you jus gotta let it wash over you, like a subtle snowball effect. In time, it’ll come to you. And.. sometimes, you have to take that as a place to start off; to actually start working your ass off for what you want. Not because you want to impress someone else. I mean, work your ass off for you. Work for it because you want it, not to show someone else up.

Patience is a virtue and skill is merely a fruit of your labor.

PrimeFaces

primefaces.org

PrimeFaces is an open source JSF component library featuring 100+ rich set of components.

Ang cute kaya malaman na si TEDDY BEAR na inlove kay BARBIE DOLL ^o^

Loading more posts...