This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!

Solo Chiang

Greenhorn
+ Follow
since Sep 14, 2005
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 Solo Chiang

In the project I am working on , Excel file is the only choice they have at this point, and database is managed by another company so there will be political obstacle that has to be overcome in order to run SQL Loader directly on Oracle server. In this case, the solution has to be constrained to Excel file on J2EE container itself. Any choice other than JMS queue?

Solo

Hi

My project has a high-priority requirement that would require bulk data processing, be more specific, we need to parse an Excel file with 500,000 rows by POI and insert these 500,000 rows into database. Since this would be a time-consuming task for the application server. My strategy is

1) Use JMS queue to process the JDBC operation, so once file upload is completed. An event will be sent to the listener and put the database operation into JMS queue
2) Instead of regular JDBC operation, batch update will be applied when actually updating the database
3) An email will be sent to the user when the update is completed

The question I have is
1) Will POI 3.2 be able to able to handle 500,000 rows at a time?
2) More important, is there any other alternative design what you could recommend to process bulk data from Excel to database?

Thank you

Solo
Does anyone know the answer?Iam having the same problems too here.
Lookup forever without returning anything.


10 years ago
Hello to all

I need to create a object to hold some cached data for access in a clustered environment, and this object will need to be refreshed from time to time.
Given this requirement, I am wondering if it is good decision decision to use a EJB to hold the object in order to be distributed.

My plan is write a stateless session bean, put the object to hold cached data as it's object variable.
This object's value will be refreshed periodically, while others will access the value by calling its access method.

What I need to know is will the refreshed data take effect on all instances in the cluster (since it is a EJB)?
Also, is this the best decision strategy? or you guys have a better idea to meet the same requirement?

Thank you for your input in advance


Hello to all Spring expert,
I am learning Spring framework and try to get some on-hand experience by following the tutorial at
http://static.springframework.org/docs/Spring-MVC-step-by-step/index.html

My environment is followed
IDE: Eclipse 3.4.2
Server: Tomcat-6.0.18
JDK:1.6.0

But for some unknown reason, when I start Tomcat server and
My /springapp/WebContent/WEB-INF/springapp-servlet.xml seems to have some problem




Instead of start making use of the bean, I have the following error instead



Does anyone know what cause this and how to fix it?

12 years ago
I found the answer myself,
it is web.xml who take the precedence if both web.xml and weblogic.xml has set the session time out
12 years ago
Hi

I like to know if I have web.xml and weblogic.xml both define the session time out
which file is the one which actually dominate the application session time?
Anyone get an idea?

Using the following as the example, session will be expired in 10 minutes or 40 minutes?

======== web.xml ========
<session-config>
<session-timeout>10</session-timeout>
</session-config>


======== weblogic.xml ========
<session-descriptor>
<timeout-secs>2400</timeout-secs>
<cookie-name>AFSSESSIONID</cookie-name>
<cookie-comment>AFWEB Session Tracking Cookie</cookie-comment>
<persistent-store-type>replicated_if_clustered</persistent-store-type>
<url-rewriting-enabled>false</url-rewriting-enabled>
<encode-session-id-in-query-params>true</encode-session-id-in-query-params>
</session-descriptor>
12 years ago
Not sure why my SQL is not working properly after I set parameters in the SQL instead of put variable .

The following is my new code.

String HOLDINGS_QUERY = "select holding_name, holding_value, as_of_date " + "from fund_grp_holding "
+ "where holding_type = ? " + " and fund_grp = ? order by ? " ;

stmt = conn.prepareStatement(HOLDINGS_QUERY);
stmt.setInt(1, type); // type is 6
stmt.setInt(2, fundGroupNumber); // fundGroupNumber is 31
stmt.setString(3, orderyBy); // orderBy is "HOLDING_VALUE DESC"


The search result just ignore "order by" and have a result without ordering my the holding value



The following code will fix the problem and give the search result order by holding value by if I just concat the variable into the query

String HOLDINGS_QUERY = "select holding_name, holding_value, as_of_date " + "from fund_grp_holding "
+ "where holding_type = ? " + " and fund_grp = ? order by " + orderyBy;

stmt = conn.prepareStatement(HOLDINGS_QUERY);
stmt.setInt(1, type); // type is 6
stmt.setInt(2, fundGroupNumber); // fundGroupNumber is 31




WHY? What happened? Anybody can tell me?





Yes

It is entity bean with bean managed persistence.
What is the difference between 1.1 and 2.0?


Jeanne Boyarsky wrote:Solo,
Do you have any entity beans? If so, they look different in EJB 1.1 and 2.0.

Also, this article lists a bunch of changes. If you have any of those, it is EJB 2.0.

Hi

I am reviewing some legacy code of my organization and I know they are using BMP entity bean.
What I like to know is how do I determine it is EJB 1.1 or EJB 2.0?
We don't have local interface so that cannot be used as an indicator...

Hi

Does anyone know a tool that will scan all the source code and list all exceptions which got eaten without notice?

I am maintaining legacy code for my client and I noticed they have a bad habit of writing code like

} catch (Exception e) {
// Do nothing....
}

As I remember, there are tools like this which will tell you all those bad coding style, but I cannot remember the name. Would someone recommend a handy tool for me? Thanks
13 years ago
Hi to all

I just joined a company and figured out their "standard" eclipse configuration really make my jaw hit on the floor.

They have one J2EE application, which contains 3 web module, 1 ejb module.
In the project I worked before, we usually have 3 dynamic web projects for these 3 web modules, 1 ejb project for this ejb module. And another J2EE project which defines which modules is included in this project.

But in this company that I just joined, they have a big fat J2EE project and Dynamic Web project pointing to the same directory UNDER their weblogic installation folder. And this two projects are actually pointing to the same directory. In another words, they don't need to do any real deployment, since their work is done right under server installation directory.

I tried to tell them it is not good that they coupled everything together but I am wondering if somebody could give me a more systematic explanation why they are not doing things in the right way? I need more bullets, thank you.
Hi to all

I just joined a company and figured out their "standard" eclipse configuration really make my jaw hit on the floor.

They have one J2EE application, which contains 3 web module, 1 ejb module.
In the project I worked before, we usually have 3 dynamic web projects for these 3 web modules, 1 ejb project for this ejb module. And another J2EE project which defines which modules is included in this project.

But in this company that I just joined, they have a big fat J2EE project and Dynamic Web project pointing to the same directory UNDER their weblogic installation folder. And this two projects are actually pointing to the same directory. In another words, they don't need to do any real deployment, since their work is done right under server installation directory.

Would somebody could give me a more systematic explaination why they are not doing things in the right way?
Here is my question, I am trying to have a transaction propagated from JTA to CMT, will it work?

I have two entity beans adopted CMT for one of its business method.
I have a Struts Action class that will call these two entity bean one by one for two database update respectively.

In order to put these two database changes into a single transaction,
can I use JTA (ut.begin() & ut.commit()) to enclose two method invocation for these two entity bean and specify transaction attribute as "Required" in these two business method to achieve my goal?
[ October 12, 2007: Message edited by: Solo Chiang ]
Hi,

I am having problem to lookup JMS factory and resource from a stand-alone Java application.
Executing the following code will throw NameNotFoundException,

jndiContext = new InitialContext();
connectionFactory = (ConnectionFactory) jndiContext.lookup(
"jms/myQueue");

I know I have to set some System property like JMS provider URL ... etc,
and I like to set those properties and content in the Java Class instead of an other property file,

Would someone tell me how to do that?
I am very frustrated on Sun J2EE 1.4 tutorial's instruction that they have very limited information on this, not sure if they want to teach you or just get you confused....