Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

Monday, July 13, 2015

GrooveIP, RingTo - Calling and Especially: Receiving Calls

Intro

From Android, you can and receive voice calls within continental US over VoIP, even from abroad.  The app, I use is called GrooveIP.  It's a paid but not expensive app.  Since Google Voice stopped providing free calling to continental US, GrooveIP entered into a collaboration with a company called RingTo.

How to start?

You need to open a GV account, buy and install GrooveIP, set in GV your RingTo number as forwarding number.  Contrary to suggestions found on internet, I have not setup forwarding to Google Chat, but only to my RingTo number. It looks like this:

How to send a call?

Open GrooveIP, login to RingTo, if it doesn't do it automagically (often it does) and punch the destination number.  Just like on a regular phone dialer.  The rest is straightforward as well.

How to receive a call?

Open GrooveIP and wait for the ring. If it doesn't ring, but instead you receive a voicemail email from RingTo into you gmail, there are two things to check:
  • GV forwards your call to the last active gmail login. So, don't open your gmail app after you open GrooveIP (I'm guessing, GrooveIP actually logs into gmail, too).
  • Open GrooveIP settings. Make sure the "Dial 1 on Answer" option is checked.

Wednesday, February 17, 2010

Configure Hibernate to Use A Datasource

I'm using Glassfish application server, on which (using its Console) I have created a JDBC datasource (JDBC Resource). I'd like configure the hibernate framework to use it. The resons:
  • Connection pooling (it's true that I could use the Hibernate's own connection pooling)
  • Portability: moving the application to another application server is easy, as long as they both provide a datasource with the same name (Hibernate dialect may still need to be changed appropriately).
hibernate.cfg.xml File
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory name="hibernate/sessionFactory">
        <property name="connection.datasource">jdbc/derbydb</property>
        <property name="dialect">org.hibernate.dialect.DerbyDialect</property>
        <property name="current_session_context_class">thread</property>
        <property name="hbm2ddl.auto">create</property>
    
     <mapping resource="olcc/entity/Person.hbm.xml"/>
    </session-factory>
</hibernate-configuration>


HibernateUtil.java File
private static SessionFactory buildSessionFactory() {
    return new Configuration().configure().buildSessionFactory();
}


The Application Code
Session session = HibernateUtil.getSessionFactory().getCurrentSession();

Monday, September 28, 2009

Start An Application When Linux, RedHat, Starts

Here you go:
  • Create a control script in /etc/init.d folder that responds to at least start and stop commands.
  • In this script, include a comment line: chkconfig 35 80 20 (there is a meaning to it: for which runlevels the process is to be off or on).
  • Run the chkconfig --add your_control_script command. Run it with --list option to verify that the control script has been added to the list of processes to start at boot time.
  • If there are any problems during boot time, they are recorded in the /var/log/boot.log and/or /var/log/messages files.
Note:
Global environ variables are usually defined in the /etc/profile script. This script is automatically run by every interactive shell process (or a shell process with --login argument). The /etc/profile doesn't seem to be executed automatically during the boot process, though. You may need to do:
. /etc/profile
in your control script if you need to use any of the global environ variables.

Friday, September 18, 2009

Glassfish Enterprise Server: Changing Port

I couldn't find a straight and good answer easily. So, here's what you to change the port your server is listening on:
  • start the server
  • go to admin console (default: http://localhost:4848)
  • Open: Configuration -> HTTP Service -> Network Config -> Network Listeners
  • The main port is listed as the listener1, I believe.
That's it. Simple. You don't even need to restart the server for the change to take effect.

Changing it by editing the domain.xml file is possible, but the server always chokes for a while to accept it. You can also use asadmin get server and asadmin set ... but this is still more messy than just doing it in the console.