Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Thomas Heiss

Greenhorn
+ Follow
since Feb 20, 2008
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 Thomas Heiss

Dear Martin, dear valued rancher,

Why did you choose to implement reading the file suncertify.properties with the ResourceBundle classes?

Personally I am going for (or at least I want to) with java.util.Properties.

But what I did not find:
Java Util class to read key/value pairs per section.

So what I would like to have is three sections in suncertify.properties:
[SERVER]
SERVER.host (optional if RMI supports multi network homed servers)
SERVER.port
SERVER.dblocation

[CLIENTSERVER]
CLIENTSERVER.host
CLIENTSERVER.port

[STANDALONE]
STANDALONE.dblocation=

Properties seems to read all keys into ONE HashMap.
I would have to implement the filtering on SERVER/STANDALONE/CLIENTSERVER on my own (what a crap and this is not spec conform as java JDK classes will be preferred by SUN).

Ranchers: Is there any way to read the whole Props file per section in a Properties instance out of the box?

Best regards

Thomas
Dear Talib,

Unfortunately this is wrong.

Data.java must be in src\suncertify\db folder.

Data.java MUST contain the statement "package suncertify.db".

You have to go to folder src and then call:

javac -d . suncertify\db\Data.java which will place your Data.class inside src\suncertify\db folder.

Regards

Thomas
Dear rocky,

Unfortunately I have not tested Eclipse with JBoss nor with some special JBoss plugins.

From my past BEA WLS integration experience the plugin might be very good or just very poor.

What I am using is MyEclipse which offers very good connectors to any app server like Tomcat, BEA, JBoss where it makes fun to develop because of
hot-sync / hot-deploy of your Java code into the app server.

It also supports starting the app server with configuration in the Eclipse IDE.

The professional version of MyEclipse only costs some $ / year subscription and offers a 30 days trial.

So I think you would like to compare the special JBoss plugin for Eclipse with the MyEclipse app server connectors.

Good luck!

Thomas
Isn't the recno the contractor id (for B&S)?

Well, I am not too sure as my parsing of the db file has not started yet

But how else would you know what to lock for an update?

If the recno is the primary key of the data which is modelled in the database as a row, I would display it in the table, too.
Please accept my congratuations Daniel.

You are now a BEA AquaLogic specialist too?

Just for interest: Did you have any special preparation besides books, BEA documentation. I wonder if for SOA/AquaLogic there is any special prep software / books out like it is for SCJD, SCEA, SCBCD, SCJP?

Best regards

Thomas

BTW: I am quite into the field of BEA WLS and JMS
Hello ranchers,

From my last post about ConfigurationGUI I got to the point of class instantiations which I currently only do in constructors.
There I thought it is a good way to extract this from my 2nd post to the old thread.

1. Is there any way for me to get around the multiple dbLocation constructor passing from the left to the right class?

E.g 1 Application (main) - 2 ServerImpl - 3 RemoteDatabaseImpl - 4 BusinessImpl - 5 Data (implements DBMain) - 6 RandomAccessFile

How could ServerImpl.init() create 3, 4, 5 and 6 without having to pass around the database location path from constructor to constructor?

e.g ServerImpl.init(): new RemoteDatabaseImpl(dbLocation).
in RemoteDatabaseImpl(String) constructor: new BusinessImpl(String).
and then over to Data to RandomAccessFile.

There seems to be much coupling.

BusinessImpl does this:
DBMain data = new Data(dbLocation) (isn't that good interface hiding implementation practice?)

1.1 So BusinessImpl CAN ONLY use use the DBMain interface provided by SUN, which does not provide openDatabase(String) or initDatabase(String).

1.2 Maybe I have to to create my own database interface which I should also use in BusinessImpl?

2. How may SUN even auto test (JUnit test or concurrency test) the Data class when they do not know how to open the database with it (which may be different implemented per assignment)?

So leaving out the String argument in the Data constructor gives me no more any possibility to pass over the location information.

3.1 Another one solution I was thinking about:


But again, BusinessImpl can not use anymore the interface DBMain as there is no DbMain.setDbLocation() method.

3.2 OR (maybe like the Spring container does as central configuration point):



Reading my own posting over again get's me the feeling that I should opt out for solution 3.2 which does not have tight class coupling (and in the setXXX() methods I would use the interfaces.

4. Had a talk on telephone with my colleague who suggested to move the 3.2 object construction/wiring code into a strategy to cut down init() (whatever that may look like).

Regards

Thomas

[ February 22, 2008: Message edited by: Thomas Heiss ]
[ February 22, 2008: Message edited by: Thomas Heiss ]
Hello all,

New server? Or was just the Germany->US Internet link broken yesterday?

I have a question regarding B&S server startup / client standalone startup, as an configuration GUI should prompt for the database location (at least one time).

My problem is right now, that for a good multi-tier architecture with layering I am using several classes which get instantiated UNTIL finally Data() with RAF reads the file with path from disc.

1. As the DBMain interface provides no setDBLocation(String) method, I wanted to go for the constructor Data(String dbLocationPath) way.

1.1 Usually this is no problem, when the ServerImpl creates in init() it's RMI RemoteDatabaseImpl, which would call thru another class the Data(String) constructor.
The requirement would be, that no exeption happens loading the database file (call path is from Main to Data including 5 classes).

Otherwise: The Application main class may not be able to startup. ServerImpl.init() could fail with FileNotFoundException.

Before calling in init() "new MyRMIRemoteDatabaseImpl(String dbLocationPath)" the requirement of course is, that the ConfigurationGUI asks for the correct location path (or reading from suncertify.properties).

1.2 But shouldn't I check, that Data class is actually able to load the database (and check it's magic cookie value), before I try to start in init() the full class hierachy including RMI, business object, Data and RandomAccessFile?

1.3 If there would be any error, init() would completely fail, making Main App with ServerImpl fail to startup (would abandon start completely).

1.4 On the other hand, I find it quite complicated, if I tried to create a Data(String dbLocation) instance in ConfigurationGUIController, just to see if loading the database file works here.

If it does, closing the configuration GUI, jumping back to ServerImpl.init() and call "new MyRMIRemoteDatabaseImpl(String dbLocationPath)" next; the already verified database location could then not cause the full class hierachy (constructors) to fail, aborting the successful application/server startup.

1.5 If I do not verify the given database location in the configuration gui panel before, I seem to run into the problem, how to handle the possibly upcoming errors while staying in the init() method (I also do not want to catch and loop).

1.6 My idea basically was to construct the object class hierachy (5 classes) from main() to ServerImpl.init() and if done, calling execute() from my main application, which would finally launch the RMI server.

2.1 Would it be the better way to call the configuration GUI in ServerImpl.init() but to let the GUI stay as long as the server is running (making a shutdown with button possible too)?
This would mean that the ConfigurationGUIController (inside ServerImpl) listens for the "Start"-ActionEvent and calls ServerImpl.execute() itself.
Wouldn't it be then the only requirement to move my call "new MyRMIRemoteDatabaseImpl(dbLocationPath)" from ServerImpl.init() to execute(), catching appropriate exceptions and letting the user to re-try to hit "Start" again?

2.2 Again, I would really appreciate a solution where I could instantiate all the required classes with dbLocationPath information in the ServerImpl.init() method and not in ServerImpl.execute(). But my constructor passing from one class to another seems to make it impossible, to correctly react on file I/O exception inside ServerImpl.init() and being able to re-try to call Data(String dbLocation) when the FileNotFoundException (or magic cookie not valid) exception was thrown.

2.3 A think a really weird solution would be to catch the exceptions in ServerImpl.init(), to re-try, which means to close and open the configuration GUI panel all the time, when an exception occured after closing the panel, to provide a successful "final startup"???!

2.4 Same happens for me in the client standalone mode, where instead of ServerImpl.init(), ...ClientStandaloneImpl.init() get's called, which also has to pass the String "dbLocation" thru another class to the constructor of Data(String dbLocation).

3. Hmm. Of course there is another solution.
Getting rid of the String "dbLocation" in all the class constructors and having a method like "initDatabase" in the Data class (which we are required to implement from SUN, which also implements DBMain).

But, that would mean on the other hand that I can not work with DBMain/Data directly as the interface and Data class DO NOT HAVE something like "initDatabase(String)" / "openDatabase(String").
I really think that my classes are already enough to refuse to introduce another DataAdapter class.

Anyone with any valuable ideas on this?

4. Searching for similar posts showed me that most seem to have a start/stop/connect GUI button, which seem to start the creation of the bunch of classes by calling their constructors.

But well, I am not sure enough, if that could fit quite good into my current class design and startup architecture.
Maybe it is okay for the client, but for the server side I usually dislike having up an GUI all the time (hmm well, which points me how to stop the RMI server without an GUI; maybe ShutdownHook?).
Hmm, all that stuff just because "-Dsuncertify.dblocation=xxx" is not allowed in spec

5. Should I really risk that the assessor chooses an invalid database location which my application is not able to automatically handle error for a re-try without having stopped the complete server and standlone client from startup? The assessor would then need to start the main application again

I can't believe it. SUN says 20h for a good programmer to a solution, 40h for a middle programmer and max 80h for a junior.
If >2 weeks something is wrong.

To be honest, it took me several days with great help postings on this forum to try to understand their specification

Best regards

Thomas

Pardon for my English and hey, already too many coffees and it is soo late here
Dear Amit,

Would it be possible to use MyEclipse which has deployment options available for WLS 10?
Probably it would be advisable to build your own war file which contains an web.xml configuration and use MyEclipse, ANT/Maven to call "wldeploy" task or the weblogic admin console to deploy your web application.

If none helps you could simply copy the war or class files to the application directory. If WLS is running in development mode, it checks this directory for "auto re-deployment".

Sorry to say that I have not used WLS 10 gui builder tools to auto generate the web.xml configuration file from scratch.

Good luck!

Thomas
12 years ago
Dear Dinesh,

>I am new to this weblogic world and don't know much about it.
>Can some answer my questions or suggest me some good study material.

You are welcome.

Try http://e-docs.bea.com/wls/docs100/index.html.
For deployment: http://e-docs.bea.com/wls/docs100/deployment.html

You could also go for WLS 8.1 or WLS 9.2 docs.

It is best first to create a weblogic domain and then use the weblogic admin console to deploy. Second choice is to configure your server to accept deployments in the "applications" directory (WLS can do an auto-deployment while running in devlopment mode too!). Third choice would be to use MyEclipse with deployment utility or an ANT script which calls the Weblogic "wldeploy" ANT task.

>1. How are we deploy the jar file in weblogic

If it is an EJB (the jar) you must deploy it as an EJB.

>2. What is difference between Tomcat apache server and weblogic

Tomcat is only a server with a servlet and jsp engine.
WebLogic is a full blown application server with clustering, EJB, JMS, etc.

>3. Jar is collection of JSp, classes and wht other .
Then you should try to package it as a WAR and not JAR file which contains your web.xml, servlet class, servlet definition, mapping url addresses.

If you are also using EJB jar files besides your web application, then you MUST package your application as an EAR, which contains your ejb jar's and war file.

Good luck.

Thomas
[ February 20, 2008: Message edited by: Thomas Heiss ]