[JBoss JIRA] (FORGE-2416) Being able to send JMS messages
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2416:
----------------------------------------
Summary: Being able to send JMS messages
Key: FORGE-2416
URL: https://issues.jboss.org/browse/FORGE-2416
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.17.0.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
It would be good to have a command to quickly add code to allow sending JMS messages. The following command would create the needed code using a message of type String :
{code}
jms-add-send-message-method --named sendMessage --destinationType QUEUE --destinationName myQueue
{code}
This would inject the {{javax.jms.JMSContext}} and add a method to send JMS message :
{code}
@Inject
JMSContext context;
@Resource(mappedName = "myQueue")
Queue queue;
public void sendMessage(String message) {
context.createProducer().send(queue, message);
}
{code}
To customize the message type, we just use the {{type}} parameter :
{code}
jms-add-send-message-method --named sendMessage --type MyBean --destinationType QUEUE --destinationName myQueue
{code}
We will get the following code :
{code}
@Inject
JMSContext context;
@Resource(mappedName = "myQueue")
Queue queue;
public void sendMessage(MyBean message) {
context.createProducer().send(queue, message);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months
[JBoss JIRA] (FORGE-2415) Being able to add a JMS connection factory definition
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2415:
----------------------------------------
Summary: Being able to add a JMS connection factory definition
Key: FORGE-2415
URL: https://issues.jboss.org/browse/FORGE-2415
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.17.0.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
It would be good to have a command to quickly add a new {{JMSConnectionFactoryDefinition}} to allow sending messages :
{code}
jms-add-connection-factory-definition --named myFactory --resourceAdapter jmsra
{code}
This will create a new class called {{org.myproject.jms.MessageResources}} if it doesn't exist, and will add a new {{JMSConnectionFactoryDefinition}} :
{code}
package org.myproject.jms;
@JMSConnectionFactoryDefinitions({
@JMSConnectionFactoryDefinition(
name = "myFactory",
interfaceName = "jmsra"
)
})
public class MessageResources {
}
{code}
Tying the command a second time will add a new {{JMSConnectionFactoryDefinition}} to the exiting {{JMSConnectionFactoryDefinitions}} :
@JMSConnectionFactoryDefinitions({
@JMSConnectionFactoryDefinition(
name = "myFactory",
interfaceName = "jmsra"
),
@JMSConnectionFactoryDefinition(
...
)
})
public class MessageResources {
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months
[JBoss JIRA] (FORGE-2414) Being able to add a JMS destination definition
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2414:
----------------------------------------
Summary: Being able to add a JMS destination definition
Key: FORGE-2414
URL: https://issues.jboss.org/browse/FORGE-2414
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.17.0.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
It would be good to have a command to quickly add a new {{JMSDestinationDefinition}} to allow sending messages :
{code}
jms-add-destination-definition --named myDestination --interfaceName javax.jms.Topic --destinationName myTopic
{code}
This will create a new class called {{org.myproject.jms.MessageResources}} if it doesn't exist, and will add a new {{JMSDestinationDefinition}} :
{code}
package org.myproject.jms;
@JMSDestinationDefinitions({
@JMSDestinationDefinition(
name = "myDestination",
interfaceName = "javax.jms.Topic",
destinationName = "myTopic"
)
})
public class MessageResources {
}
{code}
Tying the command a second time will add a new {{JMSDestinationDefinition}} to the exiting {{JMSDestinationDefinitions}} :
@JMSDestinationDefinitions({
@JMSDestinationDefinition(
name = "myDestination",
interfaceName = "javax.jms.Topic",
destinationName = "myTopic"
),
@JMSDestinationDefinition(
...
)
})
public class MessageResources {
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months
[JBoss JIRA] (FORGE-2413) websocket-setup command should also have 1.1 version
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2413:
----------------------------------------
Summary: websocket-setup command should also have 1.1 version
Key: FORGE-2413
URL: https://issues.jboss.org/browse/FORGE-2413
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.17.0.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
At the moment, when setting up websocket, TAB completion only gives 1.0 version. 1.1 should also be available :
{code}
websocket-setup --webSocketVersion 1.0
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months
[JBoss JIRA] (FORGE-2412) Being able to setup Java EE concurrency
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/FORGE-2412?page=com.atlassian.jira.plugin... ]
Antonio Goncalves updated FORGE-2412:
-------------------------------------
Labels: Starter (was: )
> Being able to setup Java EE concurrency
> ---------------------------------------
>
> Key: FORGE-2412
> URL: https://issues.jboss.org/browse/FORGE-2412
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.17.0.Final
> Reporter: Antonio Goncalves
> Labels: Starter
> Fix For: 2.x Future
>
>
> The concurrency specification has been added to Java EE 7. It would be good to be able to set it up with the following command :
> {code}
> concurrency-setup
> {code}
> For the moment only the 1.0 version is available but for future customization, it would be good to have a {{concurrencyVersion}} to the command :
> {code}
> concurrency-setup --concurrencyVersion 1.0
> {code}
> This would add the following dependency to the {{pom.xml}} :
> {code}
> <dependency>
> <groupId>org.jboss.spec.javax.enterprise.concurrent</groupId>
> <artifactId>jboss-concurrency-api_1.0_spec</artifactId>
> <scope>provided</scope>
> </dependency>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months
[JBoss JIRA] (FORGE-2412) Being able to setup Java EE concurrency
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-2412:
----------------------------------------
Summary: Being able to setup Java EE concurrency
Key: FORGE-2412
URL: https://issues.jboss.org/browse/FORGE-2412
Project: Forge
Issue Type: Sub-task
Components: Java EE
Affects Versions: 2.17.0.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
The concurrency specification has been added to Java EE 7. It would be good to be able to set it up with the following command :
{code}
concurrency-setup
{code}
For the moment only the 1.0 version is available but for future customization, it would be good to have a {{concurrencyVersion}} to the command :
{code}
concurrency-setup --concurrencyVersion 1.0
{code}
This would add the following dependency to the {{pom.xml}} :
{code}
<dependency>
<groupId>org.jboss.spec.javax.enterprise.concurrent</groupId>
<artifactId>jboss-concurrency-api_1.0_spec</artifactId>
<scope>provided</scope>
</dependency>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months
[JBoss JIRA] (FORGE-2411) Being able to send emails
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2411?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2411:
-----------------------------------
Labels: Starter (was: )
> Being able to send emails
> -------------------------
>
> Key: FORGE-2411
> URL: https://issues.jboss.org/browse/FORGE-2411
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.17.0.Final
> Reporter: Antonio Goncalves
> Labels: Starter
> Fix For: 2.x Future
>
>
> It would be good to have a command to quickly add code to allow sending an email. The following command would create the needed code using all the defaults :
> {code}
> email-add-send-message-method --named sendMessage
> {code}
> This would inject the default {{javax.mail.Session}} and add a method to send an email :
> {code}
> @Resource
> Session session;
> public void sendMessage() {
> Message message = new MimeMessage(session);
> message.setFrom(new InternetAddress("from(a)email.com"));
> message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("to(a)email.com"));
> message.setSubject("Subject");
> message.setText("Body");
> Transport t = session.getTransport();
> t.connect("user", "password");
> t.sendMessage(message, message.getAllRecipients());
> }
> {code}
> We could customize optional parameters such as :
> {code}
> mail-add-send-message-method --named sendMessage --mailSession java:comp/myMailSession --from antonio.goncalves(a)gmail.com --to ggastaldi@gmail.com,lincoln(a)gmail.com --subject Here is an email subject --body And here is the body --user tiger --password scott
> {code}
> {code}
> @Resource(lookup = "java:comp/myMailSession")
> Session session;
> public void sendMessage() {
> Message message = new MimeMessage(session);
> message.setFrom(new InternetAddress("antonio.goncalves(a)gmail.com"));
> message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("ggastaldi@gmail.com,lincoln(a)gmail.com"));
> message.setSubject("Here is an email subject");
> message.setText("And here is the body");
> Transport t = session.getTransport();
> t.connect("tiger", "scott");
> t.sendMessage(message, message.getAllRecipients());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months
[JBoss JIRA] (FORGE-2410) Being able to add a mail session definition
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2410?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2410:
-----------------------------------
Labels: Starter (was: )
> Being able to add a mail session definition
> --------------------------------------------
>
> Key: FORGE-2410
> URL: https://issues.jboss.org/browse/FORGE-2410
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.17.0.Final
> Reporter: Antonio Goncalves
> Labels: Starter
> Fix For: 2.x Future
>
>
> It would be good to have a command to quickly add a new {{MailSessionDefinition}} to allow sending an email :
> {code}
> email-add-session-definition --named java:comp/myMailSession --host smtp.gmail.com --transportProtocol smtps
> {code}
> This will create a new class called {{org.myproject.email.MailResources}} if it doesn't exist, and will add a new {{MailSessionDefinition}} :
> {code}
> package org.myproject.email;
> @MailSessionDefinitions({
> @MailSessionDefinition(
> name = "java:comp/myMailSession",
> host = "smtp.gmail.com",
> transportProtocol = "smtps"
> )
> })
> public class MailResources {
> }
> {code}
> Tying the command a second time will add a new {{MailSessionDefinition}} to the exiting {{MailSessionDefinitions}} :
> {code}
> package org.myproject.email;
> @MailSessionDefinition(
> name = "java:comp/myMailSession",
> host = "smtp.gmail.com",
> transportProtocol = "smtps"
> ),
> @MailSessionDefinition(
> ...
> )
> })
> public class MailResources {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 9 months