This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Eric Haskins

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

Recent posts by Eric Haskins

Here is the part of the java code that execs the commands


8 years ago
Hey All,

I have a java socket server I wrote to allow me to keep a web clusters code base in sync. When I run the init.d script from a shell login like so



Logout and all will work fine but if the server reboots or I run the init.d using services like so



Any of the exec() commands passed to the socket server will not get executed on the linux box. I am assuming it has to do with the JVM having no real shell. If I login and run

[root@web11 www]# /etc/init.d/servermngr start ...and logout all runs nice all CVS commands are executed.

Another note when run as a service the socket server responds to status checks so it is running along with the log showing it received commands
[root@web11 ~]# tail -f /www/logs/ServerManager.log
Server Started on ip 192.168.56.151
Server Started on port 4444
MaxConnections:0
CVS Update Received: cd /www;cvs up -d htdocs/;cvs up -d phpinclude/

They just dont get executed on the OS. I get no errors in Linux or Java

Here is the init.d script



Thanks for any help
8 years ago
Dave,


Thanks alot!! I can read and read but it I come across so many ways to do things in Java I get bogged down. I have always been a learn by doing type so I will take a look. Great part is my app uses Barcodes for tracking Pharma Return (and items in the return) from the time they enter the building to the time they leave so +10 for your app :-)

Thanks
Eric
9 years ago
I am porting over a web app I wrote to Java Swing mainly as I am a hands on learner. I am wondering what is best practice and if I am on the right track most of the java I write currently are to make use of java's sockets (tying php into an windows inventory management soft) since php's sockets are terrible. Along with Android Dev

My app has a couple different parts

Admin (configuration,add users, view Admin reports etc)

Accounting (Reports, Authorizations, etc)

Shipping (Reports, Mark Packages shipped)

Now it How do you handle these different views in swing. Can I have a base view consisting of one jframe with a top toolbar (File,Returns,Accounting,Admin) Then when the user selects the Admin -> New User render the NewUserView? Login is required which I am handling with swingx and a custom LoginService utilizing mysql (since my web app db is already built)

Also the Main file how do you manage the changes between these parts in Android we use new Intent() I guess it would be handled by the commands for the toolbar??

Thanks for any pointers.


Eric
9 years ago
Hey Everyone,

I am a web developer by trade but one of my Apps I am porting to Java Desktop per customer requests. I cant find any good examples of using Authentication & Roles in a swing app. I am still planning on deploying the app with MySQL which contains a users table and their roles.

Thanks for any pointers

Eric
9 years ago
Hi Guys/Gals,

Forgive me for some of my terminology I have worked with mostly PHP and Perl up till now. I have an app that consumes 15 feeds and it is threaded. Main spawns 15 threads making URLRequests. Now I am trying to figure out how to store the data from each feed allowing me to parse the 15 results into 1 XML result.

I am having a hard time finding any good tutorials on getting the 15 results into a container so I can parse. In PHP I would use a associative array

$feeds['ask.com'] = "Result in here";
$feeds['search.com'] = "result in here";

Thanks for any links or info.

Eric
I have a Java App I am using to get 15 different Feeds. PHP was too linear so I am whipping this up to help speed my app.

I need to make the 15 Requests and say I pass a timeout of 500 milliseconds. I want all threads to die and then I work with what data I get

It just doesnt seem to be interrupting what would be the best way to Stop all the Threads and get any data they have??? Here is my code I am testing with now.