arief hidayat

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

Recent posts by arief hidayat

thanks.. I'll try it later
13 years ago

Mark Spritzler wrote:1) Definitely only create one instance. ApplicationContext objects are heavyweight, and could take a bit of time to create, so creating it up front is the best way.

2) Your service layer objects and DAO layer objects should never hold any state, and therefore, having the default Singleton scope should be plenty fine. Where, if you have performance issues, it becomes adding more hardware to a cluster/farm, rather than changing how code works. In my opinion.
But if you want a new instance of your objects, then changing the scope to "prototype".


Thanks mark for the advise.

steve souza wrote:You install jamon.war and you get the reports from it.

So, i need to deploy it onto weblogic.

But, the JAMon monitoring code is not inside the web application itself. It will be inside the jar file of the dependency. will the JAMon.war detect it?

I don't know how exactly jamon.war doing it's job. Hope you can help to explain.

13 years ago

I am developing J2SE library (jar file). This jar file will be a dependencies to other application deployed on Weblogic server.

The jar use Spring 2.5. I am planning to monitor the method execution using JAMon. I can create simple JAMon monitor using AOP interceptor.
So, the JAMon monitor start before execute method (@Before advice) and stop after execute the method (@After advice).

My question is how to generate all the monitor reports. XML, excel , or html. Any idea?

13 years ago

Mark Spritzler wrote:Nope that is perfect.

So it is a plain simple Java call to a POJO. So the simplest solution is create a singleton that creates the instance of the ApplicationContext, then the "dispatcher" just takes in a string. It would be best if the information passed in, "String" was the name of the bean. Then you can just take that String value and call getBean(String) and you have the Spring configured bean.

No need for some over complex logic to determine things like which controller to call. It won't be a controller, and it wouldn't be a dispatcher servlet.


Thanks mark.

Other questions.
1. which one is better: create instance of ApplicationContext, each time a request (in this case it will be BPM) comes. Or we only create one instance of ApplicationContext in the beginning and then reuse?
2. I am planning to use object pooling for some of the bean. But I don't have much knowledge on object pooling. perhaps you tell in which situation this object pooling is good to be implemented.


Mark Spritzler wrote:Well the funny thing is that Oracle uses BPEL as their web services language. So the question again, is what exactly is Oracle going to call. So you have a jar file, and it loads the classes in the jar file, and calls Java code. The real question is what is that Java Code, and can it pass Java objects, or is it passing in XML. To me it still sounds like something in JBoss Remoting, but still within maybe the same JVM. Something like Burlap or Hessian might work.

We still need more information. But definitely Spring MVC is not your solution.


I am sorry my explanation is not so clear.

let me give analogue..
It's the same like when you create a java application with logging features you need to add log4j.jar. In this analogue the java application is the BPM, and the log4j.jar is the application that I need to create.
Umm.. perhaps I should use term 'java library' instead of 'java application'.

Oracle BPM and this java library will share same set of data objects.

The process might be like this:
1. Oracle BPM will call custom dispatcher of this java library by passing some of those shared data objects. (Spring AOP interceptor will be applied for logging etc)
2. custom dispatcher will dispatch the request to one of controller (this step defined in spring configuration).
3. the controller will do business logic (do remote EJB call to other components), then it delegate to DAO level to persist the result into local DB (might use ORM like Hibernate).

there will be no XML here. Its normal method call. BPM passes object as input parameter and the java library will return java object (if any).
There will be no remoting. All in the same JVM.

It's like developing sets of J2SE API with using the power of Spring Framework (for IoC, AOP, security, etc).. and the design pattern applied would be MVC ( or any other design pattern to encapsulate business logic).

Hope I don't make you even more confuse. I am not good at explaining things , sorry


Mark Spritzler wrote:What is the client? What transport is needed. Without a GUI, things like Spring Remoting, Spring Web Services, Spring JMS and Spring Integration come to mind as solutions. Spring MVC is for Web development, and I wouldn't want to use it in some other capacity. Spring has all the other options covered with different projects, so we can help steer you in the right direction with more information.


Hi Mark,
The output of this application is jar file. So, this will be a standalone (non-web application), using MVC pattern + Spring framework.
To be more specific. The client is Oracle BPM. And this jar file will be added as one of its jar dependencies and be called from BPM process activities.
(well, I found the requirement quite strange because usually when talking about Spring, we most likely developing web apps or enterprise apps).
So, the BPM process activity will call the custom Dispatcher. It's normal java call.
Not a remote one. So, not Spring remoting, not Spring WS, not JMS. I am not sure about spring integration (never read about it).

Hope my explanation is clear.
Thanks Marks. Hope you can help

Hi guys,

I am new to Spring MVC (few experience with basic Spring IoC only).
I need to create java standalone application using Spring framework. The design will be using MVC pattern. Actually the VIEW part will be very simple ( can be ignored, no Swing no GUI).
The design will start from a custom Dispatcher to dispatch request to specific Controller, etc.
Some other design features are persistence, transaction management, security, AOP interceptor for logging and validation.

My questions:
1. Is there any way so that I could reuse Spring MVC?
So, far I read, MVC is meant for web application. Can I make (modify) the spring MVC application to be non-web application (normal java).
2. Is there any suggestion how to design and what features of spring can be used?
3. Will other modules of Spring works on the non-web application? such as Spring security, AOP, etc.

Thanks. Looking forward any helpful idea from you guys.

Well, I have read that page.
I filter the classloader and set the apps NOT to use some weblogic libraries. One of the filter is "javax.xml.*".
All the configuration I have set is working on weblogic 9.2.
But failed in weblogic 10 (as I have state in previous post).
14 years ago

Originally posted by Paul Clapham:
Having two, or three, or any number of classes named QName will not be a problem at all if they are in different packages.

Oh ic. But it's all under same package javax.xml.namespace. Just different jar files.

You didn't say whether the classes in question were part of the Weblogic distribution and I don't know what a "yg" application library is. But isn't Weblogic something you pay for support for? I would ask them.

Sorry "yg" is a typo. It should "my".
Which means the application I developed, it use Spring-WS, Axiom, JAXB 2.

And the classes appears in my application (inside xml-apis.jar and stax-api.jar) and also from weblogic server lib (api.jar).

And now that I have gone through that thought process, let's move this to the Weblogic forum.

And thanks for moving this post to the right place.

[ August 04, 2008: Message edited by: arief hidayat ]
[ August 04, 2008: Message edited by: arief hidayat ]
14 years ago
Hi guys,

I am developing spring-ws on top of weblogic.
Inside yg application libraries. I found there are more than one jar file that contains QName class.
1. stax-api.1.0.1.jar -> used by spring-ws libraries
2. xml-apis-1.3.2.jar -> used by Xalan, and Xerces

If I run the application on weblogic 9.2, so far it works fine.
However, will there be any possibility in future that let set deep inside the code maybe some class need to access the QName but it found 2 classes of QName?

I try to deploy the same EAR file onto weblogic 10.0. when I try to access the application, it throws error:

I found in weblogic 10 library, there's api.jar that contains javax.xml.QName also.
So, now I total there are 3 jars containing QName.
I try to remove two Qname, but its not solved the problem.
Any idea?

14 years ago
Hi I develop spring-ws on weblogic 9.2 and the application will call EJB which is deployed on BES 5.2.1.

I don't understand about RMI-IIOP concept. After google here and there, I write..

I have few questions to ask.

1. if we want to call EJB on BES are we restricted to use implementation from BES library?
e.g. com.inprise.vbroker.rmi.CORBA.PortableRemoteObjectImpl for javax.rmi.CORBA.PortableRemoteObjectClass

Can we use other implementation? because weblogic log error as shown below..

anyone know the implementation class that is Weblogic server-compatible and can be used perfectly to call EJB on BES 5.2?

14 years ago
Hi I tried to access my Spring-WS application (web service) deployed on weblogic.

I encounter StackOverFlow exception, seems like some application keep printing..
Unable to open property file: [null]java.lang.NullPointerException
Unable to open property file: [null]java.lang.NullPointerException
Unable to open property file: [null]java.lang.NullPointerException

here are the log..

The Spring-WS was developed using maven. And I don't use any property file inside my application

Any Idea what are the possible causes of this error?

[ July 22, 2008: Message edited by: arief hidayat ]
14 years ago
Hi all,

I need to create axis web service to wrap existing EJB components (these EJB is deployed in BES 5.2).

The thing is that the EJB components use user-defined data object classes that does not follow java bean standard. e.g. the get-set method naming, etc.

Lets assume, we don't need to touch any existing code (so we won't change the DO's to meet java bean standard).

Will this issue (DO's does not follow java bean standard) create problem when we use Axis as web service?

Some resources, suggest to create custom serializer and deserializer for each DO (data object).
Is it the right solution?

if yes,

is there anyone willing to share your knowledge on how to create serializer and deserializer for the DO?

lets say, the DO is as follow..

Account {
private String name;
private java.sql.TimeStamp activationDate; //some resource said that Axis does not support TimeStamp. Is it true??
// other methods etc..

Thanks everyone


I will use Axis 1.2.1
The components (EJB and the web services) will be deployed on BES 5.2 (Borland Enterprise Server)
The web service client would be ALSB 3.0 (BEA Aqualogic Service Bus).
And I'm newbie on all of this things.
[ June 26, 2008: Message edited by: arief hidayat ]
14 years ago

Originally posted by Jeremy Wilson:
check for a persistence.xml file on the classpath. There may be a hibernate reference in there.

No hibernate.. it's all using TopLink, and the references are all from TopLink.

Never mind.. I solve my problem without disabling Hibernate..

I disable TopLink cache, and the error does not show up anymore.
I don't know why it could be like that. My deadline approaching, the most important thing is that the component working fine now. hehehe..

Anyway thanks.