users@glassfish.java.net

Re: No RESPONSE in 10 days???

From: Jane Young <Jane.Young_at_Sun.COM>
Date: Mon, 15 Sep 2008 15:26:05 -0700

Thanks!
You should be able to use the set command using these dotted-notations:

asadmin set --user admin --passwordfile password.txt --host canario
--port 10048 --secure
collector-cluster-config.jms-service.start-args="-Dimq.autocreate.queue=false
-Dimq.autocreate.topic=false"



Daniel Cavalcanti wrote:

> Sure:
>
>
> [collector_at_canario bin]$ asadmin get --user admin --passwordfile
> password.txt --host canario --port 10048 --secure
> "*.jms-service.start-args"
> canarioInstance.jms-service.start-args =
> collector-cluster-config.jms-service.start-args =
> collector-cluster.jms-service.start-args =
> default-config.jms-service.start-args =
> server-config.jms-service.start-args =
> server.jms-service.start-args =
>
>
> On Mon, Sep 15, 2008 at 2:40 PM, Jane Young <Jane.Young_at_sun.com
> <mailto:Jane.Young_at_sun.com>> wrote:
>
> Hi Daniel,
>
> Can you try this?
> asadmin get / /-user admin --passwordfile password.txt --host
> canario --port 10048 --secure "*.jms-service.start-args"
>
> and see if you get anything back.
>
> Jane
>
>
> Daniel Cavalcanti wrote:
>
> Here are some more list outputs:
>
> [collector_at_canario bin]$ asadmin list --user admin
> --passwordfile password.txt --host canario --port 10048 --secure
> collector-cluster
> collector-cluster-config
> default-config
> domain
> server
> server-config
> [collector_at_canario bin]$ asadmin list --user admin
> --passwordfile password.txt --host canario --port 10048
> --secure collector-cluster.jms-service
> collector-cluster.jms-service.jms-host.default_JMS_host
> [collector_at_canario bin]$ asadmin list --user admin
> --passwordfile password.txt --host canario --port 10048
> --secure collector-cluster-config.jms-service
> collector-cluster-config.jms-service.jms-host.default_JMS_host
>
>
> On Mon, Sep 15, 2008 at 12:14 PM, Jane Young
> <Jane.Young_at_sun.com <mailto:Jane.Young_at_sun.com>
> <mailto:Jane.Young_at_sun.com <mailto:Jane.Young_at_sun.com>>> wrote:
>
> Hi Daniel,
>
> This is because you do not have "cluster-config". You need to
> create this config and a cluster that references this config.
> Looks like the config is called "collector-cluster".
> Try this:
> asadmin set --user admin --passwordfile password.txt --host
> canario --port 10048 --secure
>
> collector-config.jms-service.start-args="-Dimq.autocreate.queue=false
> -Dimq.autocreate.topic=false"
>
>
> HTH,
> Jane
>
>
> Daniel Cavalcanti wrote:
>
> Hi Jane,
>
> This dotted name is not defined. Here is the output of the
> command in my case.
>
> [collector_at_canario bin]$ asadmin set --user admin
> --passwordfile
> password.txt --host canario --port 10048 --secure
>
> cluster-config.jms-service.start-args="-Dimq.autocreate.queue=false
> -Dimq.autocreate.topic=false"
> No object matches the specified name
> "cluster-config.jms-service.start-args"
> CLI137 Command set failed.
>
> [collector_at_canario bin]$ asadmin list --user admin
> --passwordfile
> password.txt --host canario --port 10048 --secure
> collector-cluster.jms-service
> collector-cluster.jms-service.jms-host.default_JMS_host
>
>
>
> On Thu, Sep 11, 2008 at 12:02 PM, Jane Young
> <Jane.Young_at_sun.com <mailto:Jane.Young_at_sun.com>
> <mailto:Jane.Young_at_sun.com
> <mailto:Jane.Young_at_sun.com>>> wrote:
>
> Hi Daniel,
>
> Here's how you can disable JMS queue/topic auto
> creation in
> the broker using CLI, asadmin:
>
> asadmin set
>
> cluster-config.jms-service.start-args="-Dimq.autocreate.queue=false
> -Dimq.autocreate.topic=false"
>
> HTH,
> Jane
>
>
>
> Daniel Cavalcanti wrote:
>
> Hi,
>
> I posted a couple of questions more than 10
> days ago and I
> am still waiting for a response.
> I used to post questions in this mailing list
> before and
> would get answers within a day.
> I'd be nice to get a response for this question...
>
> Here are the original messages:
>
>
>
> Hi...
>
> I want to disable the JMS queue/topic auto creation in
> the broker.
> I know I can accomplish this by setting the following
> in the Configuration -> {cluster}-config -> Java
> Message Service -> Start
> Arguments field: -Dimq.autocreate.queue=false
> -Dimq.autocreate.topic=false
>
> But I want to be able to do this in a different way:
> CLI and AMX/JMX.
> What is the equivalent command for CLI. How about the
> MBean?
>
>
> AND
>
> Hi...
>
> I have something very strange happening.
> In an enterprise application that contains an ejb
> module and a war module (JSF), a managed bean calls a
> business method from the ejb module. However, the
> returned object is always null.
>
>
> When I put some printout statements inside the managed
> bean method and the session bean business method, I
> get that in the session bean, the object being
> returned is not null. But the object assigned in the
> managed bean is null.
>
> This seems like a bug, or am I doing something wrong?
>
> Here are the classes...
>
> Session Bean (with its local interface):
>
> @Local
> public interface AdvertisingLocal {
>
>
> public byte[] getAdvertising();
>
> }
>
>
> @Stateless
> public class AdvertisingBean
> implements AdvertisingLocal {
>
> private static final long HOUR = 3600000L;
>
> private static Object lock = new Object();
>
>
> @Resource
> private TimerService timerService;
>
> @Resource(name="timer-interval")
> private int interval;
>
> private Timer timer;
>
> @EJB
> private AdsFacadeLocal adsFacade;
>
>
> private Iterator<Ads> iterator;
>
> public AdvertisingBean() {
> }
>
> @PostConstruct
> private void construct() {
>
> int count = 0;
> List<Ads> results = adsFacade.findAll();
>
> for (Ads ad : results)
> count += ad.getTokens();
>
> List<Ads> rotation = new ArrayList<Ads>(count);
> for (Ads ad : results)
> for (int i = 0 ; i < ad.getTokens() ; i++)
>
> rotation.add(ad);
>
> synchronized (lock) {
> iterator = rotation.iterator();
> }
>
> }
>
> @PreDestroy
> private void destroy() {
> if (timer != null)
>
> timer.cancel();
> }
>
> @Timeout
> private void timeout(Timer timer) {
> construct();
> }
>
> @AroundInvoke
> private void createTimer(InvocationContext context) {
>
>
> try {
> if (timer == null) {
>
> // set expire for the next hour turn
> Calendar calendar = Calendar.getInstance();
>
> calendar.setTimeInMillis(System.currentTimeMillis() +
> HOUR);
> calendar.set(Calendar.MINUTE, 0);
> calendar.set(Calendar.SECOND, 0);
>
> timer =
> timerService.createTimer(calendar.getTime(), interval,
> null);
>
> }
>
> } catch (Exception ex) {
> ex.printStackTrace();
> } finally {
> try {
> context.proceed();
> } catch (Exception ex) {
> ex.printStackTrace();
>
> }
> }
> }
>
> public byte[] getAdvertising() {
>
> synchronized (lock) {
>
> if (!iterator.hasNext())
> construct();
>
> byte[] buffer = iterator.hasNext()
>
> ? iterator.next().getContent()
> : "Advertising...".getBytes();
>
> System.out.println("buffer: " + buffer);
>
> return buffer;
>
>
> }
>
> }
>
> }
>
> Here the "buffer" printout is NOT null.
>
>
> Managed Bean:
>
> public class AdvertisingBean {
>
> @EJB
> private AdvertisingLocal advertisingService;
>
>
> public AdvertisingBean() {
> }
>
> public String getContent() {
> System.out.println("service: " +
> advertisingService);
> System.out.println("content: " +
> advertisingService.getAdvertising());
> return
> String.valueOf(advertisingService.getAdvertising());
> }
>
> }
>
> Here "service" is NOT null, and "content" IS null.
>
> Any help is greatly appreciated.
>
>
> I'm using glassfish version Sun Java System
> Application Server 9.1.1 (build b24c-fcs). This is
> from the admin GUI.
>
> thanks,
> Daniel.
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> <mailto:users-unsubscribe_at_glassfish.dev.java.net>
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> <mailto:users-help_at_glassfish.dev.java.net>
>
>