<commit_before>package org.wildfly.swarm.examples.messaging;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.wildfly.swarm.container.Container;
import org.wildfly.swarm.container.JARArchive;
import org.wildfly.swarm.jaxrs.JAXRSArchive;
import org.wildfly.swarm.messaging.MessagingFraction;
import org.wildfly.swarm.messaging.MessagingServer;
import org.wildfly.swarm.msc.ServiceActivatorArchive;

/**
 * @author <NAME>
 */
public class Main {

    public static void main(String[] args) throws Exception {
        Container container = new Container();

        container.subsystem(new MessagingFraction()
                        .server(
                                new MessagingServer()
                                        .enableInVMConnector()
                                        .topic("my-topic")
                                        .queue("my-queue")
                        )
        );

        // Start the container
        container.start();

        JAXRSArchive appDeployment = ShrinkWrap.create(JAXRSArchive.class);
        appDeployment.addResource(MyResource.class);

        // Deploy your app
        container.deploy(appDeployment);

        JARArchive deployment = ShrinkWrap.create( JARArchive.class );
        deployment.addClass(MyService.class);
        deployment.as(ServiceActivatorArchive.class).addServiceActivator(MyServiceActivator.class);

        // Deploy the services
        container.deploy(deployment);

    }
}<commit_msg>Update messaging example to use the new config api bits.<commit_after>package org.wildfly.swarm.examples.messaging;

import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.wildfly.swarm.config.messaging_activemq.Server;
import org.wildfly.swarm.config.messaging_activemq.server.*;
import org.wildfly.swarm.container.Container;
import org.wildfly.swarm.container.JARArchive;
import org.wildfly.swarm.jaxrs.JAXRSArchive;
import org.wildfly.swarm.messaging.MessagingFraction;
import org.wildfly.swarm.messaging.MessagingServer;
import org.wildfly.swarm.msc.ServiceActivatorArchive;

import java.util.Arrays;

/**
 * @author <NAME>
 */
public class Main {

    public static void main(String[] args) throws Exception {
        Container container = new Container();

        final String serverName = "default";

        final ConnectionFactory connectionFactory = new ConnectionFactory("InVmConnectionFactory")
                .connectors(Arrays.asList("in-vm"))
                .entries(Arrays.asList("java:/ConnectionFactory"));

        final PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory("activemq-ra")
                .entries(Arrays.asList("java:jboss/DefaultJMSConnectionFactory"))
                .connectors(Arrays.asList("in-vm"))
                .transaction("xa");

        final MessagingFraction fraction = MessagingFraction.createDefaultFraction()
                .server(new Server(serverName)
                        .inVmConnector(new InVmConnector("in-vm").serverId(1))
                        .inVmAcceptor(new InVmAcceptor("in-vm").serverId(1))
                        .connectionFactory(connectionFactory)
                        .pooledConnectionFactory(pooledConnectionFactory)
                        .jmsTopic(new JmsTopic("my-topic").entries(Arrays.asList("java:/jms/topic/my-topic")))
                        .jmsQueue(new JmsQueue("my-queue").entries(Arrays.asList("java:/jms/queue/my-queue"))));


        container.subsystem(fraction);

        // Start the container
        container.start();

        JAXRSArchive appDeployment = ShrinkWrap.create(JAXRSArchive.class);
        appDeployment.addResource(MyResource.class);

        // Deploy your app
        container.deploy(appDeployment);

        JARArchive deployment = ShrinkWrap.create( JARArchive.class );
        deployment.addClass(MyService.class);
        deployment.as(ServiceActivatorArchive.class).addServiceActivator(MyServiceActivator.class);

        // Deploy the services
        container.deploy(deployment);

    }
}
{'fraction_non_alphanumeric': 0.10260223048327137, 'fraction_numerical': 0.0004956629491945477, 'mean_word_length': 2.6491862567811935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4045833', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1078, 'n_words': 167}