mojo lai

Greenhorn
+ Follow
since Sep 09, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mojo lai

I have tried <param="java_arguments" value="-Dsun.boot.class.path=some.jar;">

It does not work, but -Xmx128 works

so I think it's a restriction

but I want to use "MY" java.io.File class in my applet

how can I achieve this goal ?

Any suggestions including hacking will be appreciated,

thanks :-)
15 years ago
OK, but can I change it BEFORE executing a applet ?
[ November 24, 2008: Message edited by: mojo lai ]
15 years ago
Applet's default working directory is at "Desktop"

Is there any way to change the working directory to another directory ?
15 years ago
JConsole use perm-gen as the abbreviation for "permanent generation"

so I use the word, too. Sorry about that.
15 years ago
I know that perm gen including Class and Method object,

but I also see the perm gen shared-ro / shared-rw field in JConsole

What does the "shared" mean ? what are contained in the perm gen shared-ro/rw ?
[ November 19, 2008: Message edited by: mojo lai ]
15 years ago
I have an EJB called "RemoteEJB1Bean" deployed on 140.112.91.185
Server is Sun Application Java Server 9.1 with Java EE 5

I write an application client on 140.112.91.185 like this

public static void main(String[] args) throws Exception {
InitialContext ic=new InitialContext();
RemoteEJB1Remote my=(RemoteEJB1Remote)ic.lookup("RemoteEJB1Bean");
System.out.println(my.sayHello());
}
It works well.

BUT I want to write an application client on DIFFERENT HOST using iiop, exception occured, here is my code :

public static void main(String[] args) throws Exception {
Properties props1 = new Properties();
props1.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props1.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props1.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props1.setProperty("org.omg.CORBA.ORBInitialHost", "140.112.91.185");
props1.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
InitialContext ic = new InitialContext(props1);
System.out.println(ic.lookup("RemoteEJB1Bean"));
}

exception is :
javax.naming.NameNotFoundException: RemoteEJB1Bean not found

What should I do ?
[ February 02, 2008: Message edited by: mojo lai ]
Among Servlet, JSP, JAX-WS, EJB

which component can use "client-cert" authentication ?

only JSP and Servlet ? or ALL?

thank you.
16 years ago
Hello,

if I want to setup mutual authentication by client-cert

I must install certificate in the IE's certificate "Personal" Tab ?

Am I right ?
16 years ago
Hello everyone,

I want to try "mutual authentication" by using "client-cert" method in deployment describer

I follow the Java EE 5 tutorial at
http://java.sun.com/javaee/5/docs/tutorial/doc/bnbxw.html#bnbyi

then I got the client.cer file,

How do I use this file to achieve the "mutual authentication" ?

thank you.
16 years ago
thank you, one more question about Transaction scope PersistenceContext,

when Transaction end, the PersistenceContext ends,too

then I do the following on a detach object

utx.begin();
em.merge(object);
utx.commit();

it will create a new PersistenceContext and then destroy it after commit() ??
thank you, I still have a question,
How do I use application-managed EntityManager with EXTENDED PersistenceCotext in my Servlet ?
I don't see any getEntityManager() on a factory in java EE 5 api
so I do the following , but It acts like TRANSACTION scope type

@PersistenceUnit
EntityManagerFactory emf;
EntityManager em;


public void method(){
Map map=new HashMap();
map.put("type",PersistenceContextType.EXTENDED);
em = emf.createEntityManager(map);
}
[ November 20, 2007: Message edited by: mojo lai ]
When I try to use @PersistenceContent(type=PersistenceContentType.EXTENDED)

in my Servlet or stateless session bean I will get a NullException

Does that mean that I can use only TRANSACTION type in both servlet and stateless session bean ?
[ November 20, 2007: Message edited by: mojo lai ]
thank you , one more question

The reason why I don't call EntityTransaction.begin(),EntityTransaction.commit()
in EJB is that EJB container use "container-demarcated transactions" for me ?
When I use JPA in servlet

I must explicit call commit() / rollback() /begin();

While I use JPA in Session Bean

I don't ask to do that

IS that because ejb container support transaction but web container doesn't ??

thank you.
I think I have examined the SOAP that gets sent over the wire

by using System.out.println(msg.countAttachments())

am I wrong ?? thank you.
16 years ago