roger wong

Ranch Hand
+ Follow
since Oct 21, 2009
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by roger wong

Bear Bibeault wrote:Order should not be important. Why do you feel that the order is important?



Because the frontend developer uses some js component which depends on the order.
4 years ago
//output is json, I use springMVC and Jackson
@ResponseBody UserInfo getUserInfo(){
}

Class UserInfo{
private String name;
private String country;
private String city;
}

the json I get is
{
"citry","xx",
"country":"yy"
"name":"a",
}

How can I define the order of the attributes like name, city, country? It doesn't work the reorder the attributes in the UserInfo class.

Anybody could help? Thanks.
4 years ago

Tim Holloway wrote:

roger wong wrote:

Tim Holloway wrote:I just create a "version.txt" file in the webapp root and serve it up when someone wants to know the app version. You can, of course make a "version.jsp" that reads your build properties and displays the build version if you like. In my case, Maven is automcatically stuffing the build version into the deployed version.txt, so I don't need runtime logic.



Do you mean you put build.properties in your war so that version.jsp can read it in runtime?

Since I do not use maven, could you please tell how to use ant the way maven stuffs the build version into deployed version txt.

Thank you.



No, I have a model "version.txt" file in a special directory that Maven copies and does variable substitutions on to produce a file in the form "webappname version x.y.x" in the root of the WAR. Where "x.y.x" is the version number that's in the Maven pom.xml (build) file. Since I put the file in the WAR root, I can use the URL "http://www.myserver.com:8080/mywebapp/version.txt" to retrieve it. Although Internet Explorer has a lamentable tendancy to want to open this file using Notedpad instead of simply displaying it as a page.

Then again, IE doesn't run under Linux.

For Ant, there's a revision number "bumping" task that can be used in much the same way, although I forget the details.



It really helps. Did not find bumping task in ant, but found below in ant mannual:

<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
<filterset>
<filter token="DATE" value="${TODAY}"/>
</filterset>
</copy>

Tim Holloway wrote:I just create a "version.txt" file in the webapp root and serve it up when someone wants to know the app version. You can, of course make a "version.jsp" that reads your build properties and displays the build version if you like. In my case, Maven is automcatically stuffing the build version into the deployed version.txt, so I don't need runtime logic.



Do you mean you put build.properties in your war so that version.jsp can read it in runtime?

Since I do not use maven, could you please tell how to use ant the way maven stuffs the build version into deployed version txt.

Thank you.
e.g., First I tag the web project with version 1.0. I will set the version in the build.properties so that the build will get the version from the cvs.

Besides, the user of the webapp want to see the version of the running webapp. What the best practice to do so?

Thank you.
And there is another thing strange about the same comercial platform. In the installation guide it says it uses the rmi-iiop while it requires rmid. I don't find anything in rmi-iiop related to activation using rmid in authority specification.

So I propose another three questions. Could you please help answer them?
1. can rmi-iiop use activation?
2. how is rmi-iiop server impl exported as rmi-jrmp?
3. can rmi-iiop use rmid or rmiregistry?

Really Thanks!
8 years ago
Thank u.

I am working on a comercial platform of which the installation guide says that it can be deployed in such a mode as rmi server and client are in one process and the performance is good for there is no marshalling and unmarshalling.

I doubt it so much for I didn't find any such thing in the rmi specification.

So I propose the questions.
8 years ago
Can rmi server and client be in one java process?

If can, does the rmi internal implementation remove the marshalling or unmarshalling so that the performance is improved?

Thank you.
8 years ago
I am studying rmi. There are so many confusing topics which seem to be related.
1. can rmi-iiop use activation?
2. how is rmi-iiop server impl exported as rmi-jrmp?
3. can rmi-iiop use rmid or rmiregistry?

Really Thanks!
8 years ago
I think the activatable remote object stub(get from registry 1099) contains the reference of the Activation System(rmid 1098).

It lies in the internal activation rmi architecture.
8 years ago
I've been dedicated to delivery projects since graduation. I found in delivery field, there is little cutting-edge and deep technology, and technology is not deemed very important. Delivery is all about customization using a comercial product like a tool. You do not need to know what it is but only need to know how to use it.

So I've always wanted to do product r&d to improve my technical background. But there is less r&d opportunities than in delivery field. And the r&d salary is somewhat low. As I am new to r&d, I'll have to give up my delivery experience and the management role.

Shall I pertain to my interest or comprise to the reality? People around me say I am idealism and think strange.

Which do you prefer? Do you face the same thing?
8 years ago
I am studying junit. Currently there are many ways(jmock, easymock, virtualmock, java proxy, and blah blah blah) to mock a class.

I just wonder how to write a class so that it can be mocked?

Thank you.
8 years ago
In oracle

1. Is select one kind of DML?

2. Does a select start a transaction?
8 years ago

Jeanne Boyarsky wrote:

roger wong wrote:

Jeanne Boyarsky wrote:Ram,
I recommend making each J2EE module (jar, ejb jar, framework module, etc) into a separate CVS project. This allows you to version each separately. You can manage dependencies through IDE files if you are all using the same IDE. For example, Eclipse provides the .classpath file. Either way, you will want to update your build script (ant, maven, make) to build the app from modules into an ear.



HI,

Does cvs support that modules have their versions?

Or is their a workround to do so use modules rather than cvs projects?


You tag the CVS projects. An application requires certain tagged versions. CVS doesn't have this concept of submodules within a project. Instead, you have projects within a repository. Which is what you have in Eclipse as well. Projects in a workspace.



Clear. Many Thanks!
9 years ago