Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem with the 2nd Constructor of Data class

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initial Scneario:
I have my Remote server named RMIDataServer containing the Data object.
All the calls to the RMIDataServer are delegated to the Data object.
This RMIDataServer is created from a server application named FBNServer. FBNServer takes the database name as the command line argument.
Now the question:
Since the Data has two constructors, my RMIDataServer also has two constructors. The problem is with the second constructor which takes FieldInfo[] as a parameter. Since FBNServer instantiates RMIDataServer, it needs to pass this information. But how do your pass array of FieldInfo objects as input using the command line.
Please let me know what i am missing.
Thanks,
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Vivian Richards:
Initial Scneario:
I have my Remote server named RMIDataServer containing the Data object.
All the calls to the RMIDataServer are delegated to the Data object.
This RMIDataServer is created from a server application named FBNServer. FBNServer takes the database name as the command line argument.
Now the question:
Since the Data has two constructors, my RMIDataServer also has two constructors. The problem is with the second constructor which takes FieldInfo[] as a parameter. Since FBNServer instantiates RMIDataServer, it needs to pass this information. But how do your pass array of FieldInfo objects as input using the command line.
Please let me know what i am missing.
Thanks,


The second constructor is used to create a brand new database using the field names you specify. This has no usefulness in the assignment.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some people (like me) instead of getting a binary file (db.db) get a load of text that has to be converted into a binary file. That is where the extra constructor can be used. If you are one of the lucky people who already have db.db, you probably wont use it.
Catherine
 
My cellmate was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic