Search Results

Search found 21 results on 1 pages for 'adisembiring'.

Page 1/1 | 1 

  • Configure USB GSM Modem

    - by adisembiring
    I want to configure EVDO Usb Modem in Ubuntu 10.10 I insert my usb modem to laptop and check the usb is detected or not using $sudo lsusb and the result is: Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 002: ID 201e:2009 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 14cd:6600 Super Top USB 2.0 IDE DEVICE Bus 002 Device 002: ID 201e:2009 is my us device. and than I execute command $dmesg | grep -e tty [ 0.000000] console [tty0] enabled [ 818.054660] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB0 [ 818.055125] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB1 [ 818.055647] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB2 [ 818.330641] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 [ 818.330743] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 [ 818.330840] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2 [ 1054.917473] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB0 [ 1054.917995] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB1 [ 1054.918481] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB2 [ 1055.214087] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 [ 1055.214221] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 [ 1055.214356] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2 Why converter disconnected from ttyUSB2 ? and than I try to execute command $sudo wvdialconf sorry, no modem was detected! Is it in use by another program ? did you configure it properly with setserials ? I change the same type usb modem from my friend, but I still get error above.

    Read the article

  • Configure EVDO USB Modem in Ubuntu 10.10

    - by adisembiring
    I want to configure EVDO Usb Modem in Ubuntu 10.10 I insert my usb modem to laptop and check the usb is detected or not using $sudo lsusb and the result is: Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 002: ID 201e:2009 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 14cd:6600 Super Top USB 2.0 IDE DEVICE Bus 002 Device 002: ID 201e:2009 is my us device. and than I execute command $dmesg | grep -e tty [ 0.000000] console [tty0] enabled [ 818.054660] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB0 [ 818.055125] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB1 [ 818.055647] usb 2-1.3: GSM modem (1-port) converter now attached to ttyUSB2 [ 818.330641] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 [ 818.330743] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 [ 818.330840] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2 [ 1054.917473] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB0 [ 1054.917995] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB1 [ 1054.918481] usb 2-1.2: GSM modem (1-port) converter now attached to ttyUSB2 [ 1055.214087] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0 [ 1055.214221] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1 [ 1055.214356] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2 Why converter disconnected from ttyUSB2 ? and than I try to execute command $sudo wvdialconf sorry, no modem was detected! Is it in use by another program ? did you configure it properly with setserials ? I change the same type usb modem from my friend, but I still get error above.

    Read the article

  • Where we should put validation for domain model

    - by adisembiring
    I still looking best practice for domain model validation. Is that good to put the validation in constructor of domain model ? my domain model validation example as follows: public class Order { private readonly List<OrderLine> _lineItems; public virtual Customer Customer { get; private set; } public virtual DateTime OrderDate { get; private set; } public virtual decimal OrderTotal { get; private set; } public Order (Customer customer) { if (customer == null) throw new ArgumentException("Customer name must be defined"); Customer = customer; OrderDate = DateTime.Now; _lineItems = new List<LineItem>(); } public void AddOderLine //.... public IEnumerable<OrderLine> AddOderLine { get {return _lineItems;} } } public class OrderLine { public virtual Order Order { get; set; } public virtual Product Product { get; set; } public virtual int Quantity { get; set; } public virtual decimal UnitPrice { get; set; } public OrderLine(Order order, int quantity, Product product) { if (order == null) throw new ArgumentException("Order name must be defined"); if (quantity <= 0) throw new ArgumentException("Quantity must be greater than zero"); if (product == null) throw new ArgumentException("Product name must be defined"); Order = order; Quantity = quantity; Product = product; } } Thanks for all of your suggestion.

    Read the article

  • com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unknown command

    - by adisembiring
    Hi .. I'm trying to create datasource for connection pooling mysql database in Websphere Application Server. I've set the JDBC Provider, I set the Implementation class name : com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource my mysql driver 5.1.6. but I got this error while I try to connect the datasource: The test connection operation failed for data source btn_itb_ds on server server1 at node qnode with the following exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Unknown command. View JVM logs for further details. I have read this http://bugs.mysql.com/bug.php?id=38388 trouble shooting. But they just suggest to upgrade mysql driver version 5.1.X and I have do that. but I've got the same error.

    Read the article

  • Error Ant Build/deploy to websphere 7.0

    - by adisembiring
    Hi I'm trying to build/deploy war to websphere process server 7.0. and I run on windows environment. I use http://illegalargumentexception.blogspot.com/2008/08/ant-automated-deployment-to-websphere.html as my reference. and http://illegalargumentexception.googlecode.com/svn/trunk/code/java/WebSphereAntFiles/ as my sample code to deployed. this is my buil.properies is ? #build properties mywebappear=D:/data/code/WebSphereAntFiles/scripts/test/mywebappEAR.ear #WAS6 install directory was_home=C:/IBM/WID7_WTE/runtimes/bi_v7 #server name (see cell/node/server; e.g. "server1") was_server=server1 #user + password; for use when security is enabled was_user=admin was_password=admin #stops scripts on problem was_failonerror=true #virtual host was_virtualhost=default_host #Absolute path to EAR file #was_ear=fooEAR.ear #Name of the enterprise application #was_appname=fooEAR this is my console while I trying to build with ws_ant.bat [wsDefaultBindings] mywebapp.war [wsDefaultBindings] <virtual-host> --> default_host [wsDefaultBindings] [wsDefaultBindings] ------------------------ [wsDefaultBindings] Saving EAR File to directory [wsDefaultBindings] Saved EAR File to directory Successfully test_wsStartServer: WAS_wsStartServer: depCheck: depCheck: [startServer] ADMU0116I: Tool information is being logged in file [startServer] C:\IBM\WID7_WTE\runtimes\bi_v7\profiles\qwps\logs\server1\startServer.log [startServer] ADMU0128I: Starting tool with the qwps profile [startServer] ADMU3100I: Reading configuration for server: server1 [startServer] ADMU3028I: Conflict detected on port 8880. Likely causes: a) An instance of [startServer] the server server1 is already running b) some other process is [startServer] using port 8880 [startServer] ADMU3027E: An instance of the server may already be running: server1 [startServer] ADMU0111E: Program exiting with error: [startServer] com.ibm.websphere.management.exception.AdminException: ADMU3027E: An [startServer] instance of the server may already be running: server1 [startServer] ADMU1211I: To obtain a full trace of the failure, use the -trace option. [startServer] ADMU0211I: Error details may be seen in the file: [startServer] C:/IBM/WID7_WTE/runtimes/bi_v7/profiles/qwps\logs\server1\startServer.log BUILD FAILED D:\data\code\WebSphereAntFiles\scripts\test\build.xml:68: The following error occurred while executing this line: D:\data\code\WebSphereAntFiles\scripts\was\wsStartServer.xml:49: Java returned: -1

    Read the article

  • mutiple database in codeigniter

    - by adisembiring
    Hi ..., I'm trying to implement mutiple database in CI. My code Is here: //database.php $active_group = "default"; $active_record = TRUE; $db['default']['hostname'] = "localhost"; $db['default']['username'] = "root"; $db['default']['password'] = "root"; $db['default']['database'] = "ravelex"; $db['default']['dbdriver'] = "mysql"; $db['default']['dbprefix'] = "rvx_"; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; $db['default']['cachedir'] = ""; $db['default']['char_set'] = "utf8"; $db['default']['dbcollat'] = "utf8_general_ci"; $db['smf']['hostname'] = "localhost"; $db['smf']['username'] = "root"; $db['smf']['password'] = "root"; $db['smf']['database'] = "smf"; $db['smf']['dbdriver'] = "mysql"; $db['smf']['dbprefix'] = "smf_"; $db['smf']['pconnect'] = TRUE; $db['smf']['db_debug'] = TRUE; $db['smf']['cache_on'] = FALSE; $db['smf']['cachedir'] = ""; $db['smf']['char_set'] = "utf8"; $db['smf']['dbcollat'] = "utf8_general_ci"; The model is //user_model.php class user_model extends Model { private $ravelex_db; function user_model() { parent::Model(); $this->ravelex_db = $this->load->database('default', TRUE); } function find_all() { print_r($this->ravelex_db); $q = $this->ravelex_db->get('users'); return $q->result(); } } //smf_user_model.php class smf_user_model extends Model { private $smf_db; function smf_user_model() { parent::Model(); $this->smf_db = $this->load->database('smf', TRUE); } function find_all() { $q = $this->smf_db->get('members'); return $q->result(); } } Controller tester class mutipledb extends Controller { function mutipledb() { parent::Controller(); $this->load->database(); $this->load->model('user_model'); $this->load->model('smf_user_model'); } function index() { print_r($this->user_model->find_all()); print_r($this->smf_user_model->find_all()); } } There are some error, The first database uses the second database name. But it still use it's prefix. The error is A Database Error Occurred Error Number: 1146 Table 'smf.rvx_users' doesn't exist SELECT * FROM (`rvx_users`)

    Read the article

  • [JDBCExceptionReporter] SQL Warning in Hibernate

    - by adisembiring
    Hi all, I'm using Hibernate 3.2.1 and database SQLServer2000 while I'm try to insert some data using my dao, some warning occurred like this: java.sql.SQLWarning: [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to BTN_SPP_DB at com.microsoft.jdbc.base.BaseWarnings.createSQLWarning(Unknown Source) at com.microsoft.jdbc.base.BaseWarnings.get(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getWarnings(Unknown Source) at org.hibernate.util.JDBCExceptionReporter.logAndClearWarnings(JDBCExceptionReporter.java:22) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:443) at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:400) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:287) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:221) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:119) at co.id.hanoman.btnmw.spp.dao.TagihanDao.save(TagihanDao.java:43) at co.id.hanoman.btnmw.spp.dao.TagihanDao.save(TagihanDao.java:1) at co.id.hanoman.btnmw.spp.dao.test.TagihanDaoTest.testSave(TagihanDaoTest.java:81) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) my hibernate initialization is: 2010-04-26 22:54:05,203 INFO [Version] Hibernate Annotations 3.3.0.GA 2010-04-26 22:54:05,234 INFO [Environment] Hibernate 3.2.1 2010-04-26 22:54:05,234 INFO [Environment] hibernate.properties not found 2010-04-26 22:54:05,234 INFO [Environment] Bytecode provider name : cglib 2010-04-26 22:54:05,234 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling 2010-04-26 22:54:05,343 INFO [Configuration] configuring from resource: /hibernate.cfg.xml 2010-04-26 22:54:05,343 INFO [Configuration] Configuration resource: /hibernate.cfg.xml 2010-04-26 22:54:05,406 DEBUG [DTDEntityResolver] trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] 2010-04-26 22:54:05,406 DEBUG [DTDEntityResolver] recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ 2010-04-26 22:54:05,406 DEBUG [DTDEntityResolver] located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.dialect=org.hibernate.dialect.SQLServerDialect 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.url=jdbc:microsoft:sqlserver://12.56.11.65:1433;databaseName=BTN_SPP_DB 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.username=spp 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.password=spp

    Read the article

  • java.sql.SQLWarning: [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to X

    - by adisembiring
    Hi all, I'm using Hibernate 3.2.1 and database SQLServer2000 while I'm try to insert some data using my dao, some warning occurred like this: java.sql.SQLWarning: [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to BTN_SPP_DB at com.microsoft.jdbc.base.BaseWarnings.createSQLWarning(Unknown Source) at com.microsoft.jdbc.base.BaseWarnings.get(Unknown Source) at com.microsoft.jdbc.base.BaseConnection.getWarnings(Unknown Source) at org.hibernate.util.JDBCExceptionReporter.logAndClearWarnings(JDBCExceptionReporter.java:22) at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:443) at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:400) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:287) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:221) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:119) at co.id.hanoman.btnmw.spp.dao.TagihanDao.save(TagihanDao.java:43) at co.id.hanoman.btnmw.spp.dao.TagihanDao.save(TagihanDao.java:1) at co.id.hanoman.btnmw.spp.dao.test.TagihanDaoTest.testSave(TagihanDaoTest.java:81) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) my hibernate initialization log is: 2010-04-26 22:54:05,203 INFO [Version] Hibernate Annotations 3.3.0.GA 2010-04-26 22:54:05,234 INFO [Environment] Hibernate 3.2.1 2010-04-26 22:54:05,234 INFO [Environment] hibernate.properties not found 2010-04-26 22:54:05,234 INFO [Environment] Bytecode provider name : cglib 2010-04-26 22:54:05,234 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling 2010-04-26 22:54:05,343 INFO [Configuration] configuring from resource: /hibernate.cfg.xml 2010-04-26 22:54:05,343 INFO [Configuration] Configuration resource: /hibernate.cfg.xml 2010-04-26 22:54:05,406 DEBUG [DTDEntityResolver] trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] 2010-04-26 22:54:05,406 DEBUG [DTDEntityResolver] recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/ 2010-04-26 22:54:05,406 DEBUG [DTDEntityResolver] located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.dialect=org.hibernate.dialect.SQLServerDialect 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.url=jdbc:microsoft:sqlserver://12.56.11.65:1433;databaseName=BTN_SPP_DB 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.username=spp 2010-04-26 22:54:05,453 DEBUG [Configuration] hibernate.connection.password=spp

    Read the article

  • Ask Basic Configurator in Apache Commong Log

    - by adisembiring
    I use log4j as logger for my web application. in log4j, I can set the level log in log4j properties or log4j.xml. in log4j, we instance logger as follows: static Logger logger = Logger.getLogger(SomeClass.class); I init log4j basic configurator in a servlet file using init method. But, I usually test application using JUnit, So I init the basic configurator in setup method. after that, I test the application, and I can see the log. Because I deployed, the web in websphere. I change all of logging instance become: private Log log = LogFactory.getLog(Foo.class); I don't know how to load basic configurator using ACL. so I can't control debug level to my JUnit test. do you have any suggestion, without changing static Logger logger = Logger.getLogger(SomeClass.class); become static Logger logger = Logger.getLogger(SomeClass.class);

    Read the article

  • How build my own Application Setting

    - by adisembiring
    I want to build a ApplicationSetting for my application. The ApplicationSetting can be stored in a properties file or in a database table. The settings are stored in key-value pairs. E.g. ftp.host = blade ftp.username = dummy ftp.pass = pass content.row_pagination = 20 content.title = How to train your dragon. I have designed it as follows: Application settings reader: interface IApplicationSettingReader { read(); } DatabaseApplicationSettingReader { dao appSettingDao; AppSettings read() { List<AppSettingEntity> listEntity = appSettingsDao.findAll(); Map<String, String> map = new HaspMap<String, String>(); foreach (AppSettingEntity entity : listEntity) { map.put(entity.getConfigName(), entity.getConfigValue()); } return new AppSettings(map); } } DatabaseApplicationSettingReader { dao appSettingDao; AppSettings read() { //read from some properties file return new AppSettings(map); } } Application settings class: AppSettings { private static AppSettings instance; private Map map; Public AppSettings(Map map) { this.map = map; } public static AppSettings getInstance() { if (instance == null) { throw new RuntimeException("Object not configure yet"); } return instance; } public static configure(IApplicationSettingReader reader) { instance = reader.read(); } public String getFtpSetting(String param) { return map.get("ftp." + param); } public String getContentSetting(String param) { return map.get("content." + param); } } Test class: AppSettingsTest { IApplicationSettingReader reader; @Before public void setUp() throws Exception { reader = new DatabaseApplicationSettingReader(); } @Test public void getContentSetting_should_get_content_title() { AppSettings.configure(reader); Instance settings = AppSettings.getInstance(); String title = settings.getContentSetting("title"); assertNotNull(title); Sysout(title); } } My questions are: Can you give your opinion about my code, is there something wrong? I configure my application setting once, while the application start, I configure the application setting with appropriate reader (DbReader or PropertiesReader), I make it singleton. The problem is, when some user edit the database or file directly to database or file, I can't get the changed values. Now, I want to implement something like ApplicationSettingChangeListener. So if the data changes, I will refresh my application settings. Do you have any suggestions how this can be implemented?

    Read the article

  • NoSuchMessageException: No message found

    - by adisembiring
    Hi .... I try to learn Spring MVC 3.0 validation. but I got NoSuchMessageException: No message found under code 'name.required' for locale 'en_US' error message when form submted. I have create message.properties in src/message.properties and the content of that file is: name.required = User Name is required password.required = Password is required gender.required = Gender is required I have set ResourceBundleMessageSource in my app-servlet.xml <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource" p:basename="messages" /> My validator code is: @Component("registrationValidator") public class RegistrationValidator implements Validator { @Override public boolean supports(Class<?> clazz) { return RegistrationCommand.class.isAssignableFrom(clazz); } @Override public void validate(Object target, Errors errors) { RegistrationCommand registrationCommand = (RegistrationCommand) target; ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "name.required"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "password.required"); ValidationUtils.rejectIfEmpty(errors, "gender", "gender.required"); ValidationUtils.rejectIfEmpty(errors, "country", "country.required"); //ValidationUtils.rejectIfEmpty(errors, "community", "community.required"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "description", "description.required"); if (registrationCommand.getCommunity().length == 0) { errors.rejectValue("community", "community.required"); } } } and JSP Page is: <form:form commandName="registrationCommand"> <p class="name"> <label for="name">Name</label> <form:input path="name" /> <form:errors path="name" cssClass="error"></form:errors> </p> <p class="password"> <label for="password">Password</label> <form:password path="password" /> <form:errors path="password" cssClass="error"></form:errors> </p> <p class="gender"> <label>Gender</label> <form:radiobutton path="gender" value="M" label="M" /> <form:radiobutton path="gender" value="F" label="F" /> <form:errors path="gender" cssClass="error"></form:errors> </p> <p class="submit"> <input type="submit" value="Submit" /> </p> </form:form>

    Read the article

  • seting ODBC Datasource in IBM AIX server

    - by adisembiring
    Hi ..... I have develop IBM Message broker flow database application in windows xp environment. the database accessed using ODBC datasource. basically, I use compute node with esql programming to select query in database, and I set the datasource in the compute node properties. Now want to deployed my project to AIX server. but, I dont know how to set ODBC datasource in AIX server. can you help me to how to set odbc in AIX server, can you help me to solve my problem ?? Thanks

    Read the article

  • Design Pattern for Server Emulator

    - by adisembiring
    I wanna build server socket emulator, but I want implement some design pattern there. I will described my case study that I have simplified like these: My Server Socket will always listen client socket. While some request message come from the client socket, the server emulator will response the client through the socket. the response is response code. '00' will describe request message processed successfully, and another response code expect '00' will describe there are some error while processing the message request. IN the server there are some UI, this UI contain check response parameter such as. response code timeout interval While the server want to response the client message, the response code taken from input parameter response form UI check the timeout interval, it will create sleep thread and the interval taken from timeout interval input from UI. I have implement the function, but I create it in one class. I feel it so sucks. Can you suggest me what class / interface that I must create to refactor my code.

    Read the article

  • Server Emulator Design Pattern

    - by adisembiring
    I wanna build server socket emulator, but I want implement some design pattern there. I will described my case study that I have simplified like these: My Server Socket will always listen client socket. While some request message come from the client socket, the server emulator will response the client through the socket. the response is response code. '00' will describe request message processed successfully, and another response code expect '00' will describe there are some error while processing the message request. IN the server there are some UI, this UI contain check response parameter such as. response code timeout interval While the server want to response the client message, the response code taken from input parameter response form UI check the timeout interval, it will create sleep thread and the interval taken from timeout interval input from UI. I have implement the function, but I create it in one class. I feel it so sucks. Can you suggest me what class / interface that I must create to refactor my code.

    Read the article

  • hibernate Query by primary key

    - by adisembiring
    Hi ... I wanna create query by primary key. Supposed I have class primary key, PersonKey, the properties is name and id. I have Person class, the property is PersonKey, address, DOB. Now, I wanna search person by primary key. First, I create instance of PersonKey, and set the name become: joe, and id become:007 can I get the person by ID, by pass the key variable ??? person.findByKey(someKey); , but the logic do not criteria

    Read the article

  • ConnectJDBCDataStoreHelper Jar File

    - by adisembiring
    Hi ... I'm trying to create mysql datasource in websphere. I have setup the data source and test the data source from the admin console. I used ConnectJDBCDataStoreHelper as datasource helper. Now, I'm trying to access the datasource from desktop application using Hibernate. I've set the JNDI URL, ContextFactory and etc. And I have reference was 7 library in my project. While I try to run, there are some error occurred. com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper not found.

    Read the article

1