Re: auto discovery activemq ?

2013-04-01 Thread Sule BASOL
Okay but how can i use it on InitializedContext constructor on JEE?
I did not see any sample


26 Mar 2013 tarihinde 03:25 saatinde, SuoNayi  şunları 
yazdı:

> Yes, take a look at 
> http://activemq.apache.org/discovery-transport-reference.html
> 
> 
> 
> 
> 
> At 2013-03-25 19:00:29,"Sule BASOL"  wrote:
>> hello , i'm having trouble on activemq , our network is dhcp , even server 
>> ip changes dynamically.Our customers also same.So we need auto activemq 
>> discovery needed.But i did not see any way to do it ? How can i connect to 
>> ActiveMQ by auto discovery ip.On OpenEJB , there is 
>> "multipulse://239.255.2.3:6142?group=default&timeout=250" but i donno how to 
>> connect activemq server ? is there any service like multi pulse on activemq 
>> ? ctxProps.put(Context.INITIAL_CONTEXT_FACTORY, 
>> "org.apache.activemq.jndi.ActiveMQInitialContextFactory"); 
>> ctxProps.put(Context.PROVIDER_URL, "what should i put here?"); <= and how to 
>> configure server for auto discovery ?


auto discovery activemq ?

2013-03-25 Thread Sule BASOL
hello , i'm having trouble on activemq , our network is dhcp , even server ip 
changes dynamically.Our customers also same.So we need auto activemq discovery 
needed.But i did not see any way to do it ? How can i connect to ActiveMQ by 
auto discovery ip.On OpenEJB , there is 
"multipulse://239.255.2.3:6142?group=default&timeout=250" but i donno how to 
connect activemq server ? is there any service like multi pulse on activemq ?   
  ctxProps.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.activemq.jndi.ActiveMQInitialContextFactory"); 
ctxProps.put(Context.PROVIDER_URL, "what should i put here?"); <= and how to 
configure server for auto discovery ?

Re: [RESULT][VOTE] Release Apache Apollo 1.6

2013-02-26 Thread Sule BASOL
1+

On 26 Şub 2013, at 00:57, Hiram Chirino  wrote:

> Results of the Apache Apollo 1.6 vote: Vote passes with 8 +1 votes.
> 
> Thanks to all who reviewed.  I'll push out the artifacts shortly.
> 
> -- 
> 
> **
> 
> *Hiram Chirino*
> 
> *Engineering | Red Hat, Inc.*
> 
> *hchir...@redhat.com  | fusesource.com | redhat.com*
> 
> *skype: hiramchirino | twitter: @hiramchirino
> *
> 
> *blog: Hiram Chirino's Bit Mojo *



replace data ( delete old from persistence queue ) possible ?

2013-02-13 Thread Sule BASOL
Hello , i can publish news to all clients by using 
publish , but i want to replace old persistence object.

The problem is , the server sends clients new settings.
When admin changes settings again , it should replace old settings.

But i donno how to delete old settings object and push new or directly replace ?





help on topic and queue communication please

2013-02-13 Thread Sule BASOL
Hi , i'm using openejb with activemq but they run on separate jvms.

i tried ;

on openejb jvm : 

@Singleton
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
public class MonitoringTimerService {
@PostConstruct
private void init() {
final Hashtable ctxProps = new Hashtable(2);
ctxProps.put("java.naming.factory.initial", 
"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
ctxProps.put("java.naming.provider.url", "tcp://localhost:61616");

final InitialContext activeMQInitialContext = new 
InitialContext(ctxProps);

final javax.jms.ConnectionFactory factory = 
(javax.jms.ConnectionFactory)activeMQInitialContext.lookup("ConnectionFactory");
final Connection connection = factory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

connection.start();

topic = session.createTopic( "screenNotifications" );
producer = session.createProducer(topic);
}

@Lock(LockType.WRITE)
@Schedule(second="*/15", minute="*",hour="*",dayOfMonth = "*", 
persistent=false)
public void deleteLogs(){
//check if...
System.out.println("checking");


try {
TextMessage message = session.createTextMessage("Test 1 2 3");
producer.send(message);
} catch (JMSException e) {
e.printStackTrace();  //To change body of catch statement use File 
| Settings | File Templates.
}


System.out.println("done");

}
}



This code opens screenNotifications jms topic and sends message every 15 
seconds like that :





Then i've second java swing client that listens for messages from 
"screenNotifications" like shown below :


InitialContext activeMQInitialContext = getActiveMQInitialContext();

javax.jms.ConnectionFactory factory = 
(javax.jms.ConnectionFactory)activeMQInitialContext.lookup("ConnectionFactory");
final Connection connection = factory.createConnection();

final Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);

Destination destination = 
session.createQueue("screenNotifications");

// MessageConsumer is used for receiving (consuming) messages
MessageConsumer consumer = session.createConsumer(destination);

consumer.setMessageListener( this );



@Override
public void onMessage(Message message) {
//To change body of implemented methods use File | Settings | File 
Templates.
System.out.println("Deneme");
}





But i dont get any message from openejb server although queue name with topic 
is same , whats wrong ?